File: runtime.yml

package info (click to toggle)
ejabberd 26.02-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 15,396 kB
  • sloc: erlang: 122,646; sh: 4,258; sql: 3,633; perl: 869; makefile: 559; javascript: 216; python: 48
file content (278 lines) | stat: -rw-r--r-- 7,303 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
name: Runtime

on:
  push:
    paths:
    - '*'
    - '!*.md'
    - '.github/workflows/runtime.yml'
    - 'checkouts/**'
    - 'config/**'
    - 'lib/**'
    - 'm4/**'
    - 'plugins/**'
    - 'rel/**'
  pull_request:
    paths:
    - '*'
    - '!*.md'
    - '.github/workflows/runtime.yml'
    - 'checkouts/**'
    - 'config/**'
    - 'lib/**'
    - 'm4/**'
    - 'plugins/**'
    - 'rel/**'

jobs:

  ################################################################ Rebars #####

  rebars:
    runs-on: ubuntu-24.04-arm
    strategy:
      matrix:
        otp: ['25', '26', '27', '28']
        rebar: ['rebar', 'rebar3']
        exclude:
        - otp: '27'
          rebar: 'rebar'
        - otp: '28'
          rebar: 'rebar'
    container:
      image: public.ecr.aws/docker/library/erlang:${{ matrix.otp }}

    steps:

    - uses: actions/checkout@v6

    - name: Get recent compatible Rebar binaries
      if: matrix.otp < 25
      run: |
        rm rebar
        rm rebar3
        wget https://github.com/processone/ejabberd/raw/24.12/rebar
        wget https://github.com/processone/ejabberd/raw/24.12/rebar3
        chmod +x rebar
        chmod +x rebar3

    - name: Prepare libraries
      run: |
        apt-get -qq update
        apt-get -q -y install libexpat1-dev libgd-dev libpam0g-dev \
                              libsqlite3-dev libwebp-dev libyaml-dev

    - name: Cache rebar3
      if: matrix.rebar == 'rebar3'
      uses: actions/cache@v5
      with:
        path: |
          ~/.cache/rebar3/
          _build/default/lib/
        key: runtime-${{ matrix.otp }}-${{matrix.rebar}}-${{hashFiles('rebar.config')}}

    - name: Compile
      uses: ./.github/actions/manage-ejabberd
      with:
        for: prod
        do: compile
        tool: ${{ matrix.rebar }}
        configure: --disable-elixir

    - run: make hooks
    - run: make options
    - run: make xref
    - run: make dialyzer
    - run: make elvis
      if: matrix.otp > '25' && matrix.rebar == 'rebar3'

    - name: Production
      uses: ./.github/actions/manage-ejabberd
      with:
        for: prod
        do: deploy, start, register, stop, check, logs
        tool: ${{ matrix.rebar }}
        username: user1

    - name: Development
      uses: ./.github/actions/manage-ejabberd
      with:
        for: dev
        do: deploy, start, register, stop, check, logs
        tool: ${{ matrix.rebar }}
        username: user2

    - name: Installed
      uses: ./.github/actions/manage-ejabberd
      with:
        for: install
        do: deploy, start, register, stop, check, logs
        tool: ${{ matrix.rebar }}
        username: user3

  ####################################################### Rebar3 + Elixir #####

  rebar3-elixir:
    runs-on: ubuntu-24.04-arm
    strategy:
      matrix:
        elixir: ['1.14', '1.18', '1.19']
    container:
      image: public.ecr.aws/docker/library/elixir:${{ matrix.elixir }}

    steps:

    - uses: actions/checkout@v6

    - name: Prepare libraries
      run: |
        apt-get -qq update
        apt-get -q -y install libexpat1-dev libgd-dev libpam0g-dev \
                              libsqlite3-dev libwebp-dev libyaml-dev

    - name: Enable Module.Example and an Elixir dependency
      run: |
        sed -i "s|^modules:|modules:\n  'Ejabberd.Module.Example': {}|g" \
                ejabberd.yml.example
        cat ejabberd.yml.example
        sed -i 's|^{deps, \[\(.*\)|{deps, [{decimal, ".*", {git, "https://github.com/ericmj/decimal", {branch, "main"}}},\n \1|g' rebar.config
        cat rebar.config

    - name: Cache hex.pm
      uses: actions/cache@v5
      with:
        path: |
          ~/.cache/rebar3/
        key: runtime-${{matrix.elixir}}-${{hashFiles('rebar.config')}}

    - name: Install Hex and Rebar3 manually on older Elixir
      if: matrix.elixir < '1.15'
      run: |
        mix local.hex --force
        mix local.rebar --force

    - name: Compile
      uses: ./.github/actions/manage-ejabberd
      with:
        for: prod
        do: compile
        tool: ./rebar3

    - name: Test scripts, deps, eunit
      run: |
        make scripts deps
        ./rebar3 eunit --verbose

    - run: make hooks
    - run: make options
    - run: make xref
    #- run: make dialyzer
    - run: make elvis
      if: matrix.otp > '25'

    - name: Production
      uses: ./.github/actions/manage-ejabberd
      with:
        for: prod
        do: deploy, start, register, stop, check, logs
        username: user1

    - name: Release
      uses: ./.github/actions/manage-ejabberd
      with:
        for: dev
        do: deploy, start, register, stop, check, logs
        username: user2

    - name: Installed
      uses: ./.github/actions/manage-ejabberd
      with:
        for: install
        do: deploy, start, register, stop, check, logs
        username: user3

  ################################################################### Mix #####

  mix:
    runs-on: ubuntu-24.04-arm
    strategy:
      matrix:
        elixir: ['1.14', '1.18', '1.19']
    container:
      image: public.ecr.aws/docker/library/elixir:${{ matrix.elixir }}

    steps:

    - uses: actions/checkout@v6

    - name: Prepare libraries
      run: |
        apt-get -qq update
        apt-get -q -y install libexpat1-dev libgd-dev libpam0g-dev \
                              libsqlite3-dev libwebp-dev libyaml-dev

    - name: Remove Elixir matchers
      run: |
        echo "::remove-matcher owner=elixir-mixCompileWarning::"
        echo "::remove-matcher owner=elixir-credoOutputDefault::"
        echo "::remove-matcher owner=elixir-mixCompileError::"
        echo "::remove-matcher owner=elixir-mixTestFailure::"
        echo "::remove-matcher owner=elixir-dialyzerOutputDefault::"

    - name: Enable Module.Example and an Elixir dependency
      run: |
        sed -i "s|^modules:|modules:\n  'Ejabberd.Module.Example': {}|g" \
                ejabberd.yml.example
        cat ejabberd.yml.example
        sed -i 's|^{deps, \(.*\)|{deps, \1\n  {decimal, ".*", {git, "https://github.com/ericmj/decimal", {branch, "main"}}}, |g' rebar.config
        cat rebar.config

    - name: Cache hex.pm
      uses: actions/cache@v5
      with:
        path: |
          ~/.hex/
        key: runtime-${{matrix.elixir}}-${{hashFiles('mix.exs')}}

    - name: Install Hex and Rebar3 manually on older Elixir
      if: matrix.elixir < '1.15'
      run: |
        mix local.hex --force
        mix local.rebar --force

    - name: Compile
      uses: ./.github/actions/manage-ejabberd
      with:
        for: prod
        do: compile
        tool: mix

    - run: make hooks
    - run: make options
    - run: make xref
    - run: make dialyzer
    - run: make elvis
      if: matrix.otp > '25'

    - run: make edoc

    - name: Production
      uses: ./.github/actions/manage-ejabberd
      with:
        for: prod
        do: deploy, start, register, stop, check, logs
        username: user1

    - name: Development
      uses: ./.github/actions/manage-ejabberd
      with:
        for: dev
        do: deploy, start, register, stop, check, logs
        username: user2

    - name: Installed
      uses: ./.github/actions/manage-ejabberd
      with:
        for: install
        do: deploy, start, register, stop, check, logs
        username: user3