19
19
20
20
jobs :
21
21
mac :
22
+ name : macOS (${{ matrix.os }} ${{ matrix.otp }})
22
23
strategy :
23
24
fail-fast : false
24
25
matrix :
26
+ os :
27
+ - macos-13
28
+ - macos-14
29
+ - macos-15
25
30
otp :
26
31
- " 26.2.5.14-1"
27
32
- " 27.3.4.2-1"
28
33
rebar3 :
29
34
- " 3.22.0"
30
- os :
31
- - macos-13
32
- - macos-14
33
- - macos-15
34
35
runs-on : ${{ matrix.os }}
35
36
steps :
36
37
- uses : emqx/macos-erlang@f744c98139c0db83a10619587d4bae4fc49765a8 # v1.0.0
@@ -58,17 +59,10 @@ jobs:
58
59
_packages/*.tar.gz.sha256
59
60
60
61
linux :
62
+ name : linux (${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.builder.otp }})
61
63
strategy :
62
64
fail-fast : false
63
65
matrix :
64
- builder :
65
- - vsn : " 5.5-5:1.15.7-26.2.5.14-1"
66
- otp : " 26.2.5.14-1"
67
- - vsn : " 5.5-5:1.18.3-27.3.4.2-1"
68
- otp : " 27.3.4.2-1"
69
- arch :
70
- - amd64
71
- - arm64
72
66
os :
73
67
- ubuntu24.04
74
68
- ubuntu22.04
@@ -82,10 +76,17 @@ jobs:
82
76
- el8
83
77
- el9
84
78
- alpine3.15.1
79
+ arch :
80
+ - amd64
81
+ - arm64
82
+ builder :
83
+ - vsn : " 5.5-5:1.15.7-26.2.5.14-1"
84
+ otp : " 26.2.5.14-1"
85
+ - vsn : " 5.5-5:1.18.3-27.3.4.2-1"
86
+ otp : " 27.3.4.2-1"
85
87
86
- runs-on : ubuntu-latest
87
- env :
88
- IMAGE : ghcr.io/emqx/emqx-builder/${{ matrix.builder.vsn }}-${{ matrix.os }}
88
+ runs-on : ubuntu-24.04${{ matrix.arch == 'arm64' && '-arm' || '' }}
89
+ container : ghcr.io/emqx/emqx-builder/${{ matrix.builder.vsn }}-${{ matrix.os }}
89
90
90
91
steps :
91
92
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -94,21 +95,75 @@ jobs:
94
95
fetch-depth : 0
95
96
ref : ${{ github.event.inputs.build_from }} # when input is not given, the event tag is used
96
97
97
- - uses : docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
98
- - uses : docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
98
+ - run : git config --global --add safe.directory $GITHUB_WORKSPACE
99
+
100
+ - name : build release
101
+ env :
102
+ BUILD_RELEASE : 1
103
+ CI_RELEASE_VERSION : ${{ github.event.inputs.release_as }}
104
+ run : ./build.sh
105
+
106
+ - uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
107
+ with :
108
+ name : packages-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.builder.otp }}
109
+ path : |
110
+ _packages/*.tar.gz
111
+ _packages/*.tar.gz.sha256
112
+
113
+ linux-old :
114
+ # el7 does not work when using 'container' due to old nodejs version
115
+ # same with amzn2, plus it needs even more handholding
116
+ name : linux (${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.builder.otp }})
117
+ strategy :
118
+ fail-fast : false
119
+ matrix :
120
+ os :
121
+ - amzn2
122
+ - el7
123
+ arch :
124
+ - amd64
125
+ - arm64
126
+ builder :
127
+ - vsn : " 5.5-5:1.15.7-26.2.5.14-1"
128
+ otp : " 26.2.5.14-1"
129
+ - vsn : " 5.5-5:1.18.3-27.3.4.2-1"
130
+ otp : " 27.3.4.2-1"
131
+
132
+ runs-on : ubuntu-24.04${{ matrix.arch == 'arm64' && '-arm' || '' }}
133
+
134
+ steps :
135
+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
99
136
with :
100
- platforms : ${{ matrix.arch }}
137
+ submodules : recursive
138
+ fetch-depth : 0
139
+ ref : ${{ github.event.inputs.build_from }} # when input is not given, the event tag is used
101
140
102
141
- name : build release
103
142
if : matrix.os == 'amzn2'
143
+ env :
144
+ CI_RELEASE_VERSION : ${{ github.event.inputs.release_as }}
145
+ CONTAINER : ghcr.io/emqx/emqx-builder/${{ matrix.builder.vsn }}-${{ matrix.os }}
104
146
run : |
105
- docker build --platform=linux/${{ matrix.arch }} --build-arg FROM=$IMAGE -t emqx-builder:amzn2 -f .ci/Dockerfile.amzn2 .
106
- docker run -i --rm --user 1001 -v $(pwd):/wd --workdir /wd --platform=linux/${{ matrix.arch }} -e BUILD_RELEASE=1 -e CI_RELEASE_VERSION=${{ github.event.inputs.release_as }} emqx-builder:amzn2 bash -euc './build.sh'
147
+ docker build --build-arg FROM=$CONTAINER -t emqx-builder:amzn2 -f .ci/Dockerfile.amzn2 .
148
+ docker run -t --rm --user 1001 \
149
+ -v $(pwd):/wd \
150
+ --workdir /wd \
151
+ -e BUILD_RELEASE=1 \
152
+ -e CI_RELEASE_VERSION=$CI_RELEASE_VERSION \
153
+ emqx-builder:amzn2 bash -euc './build.sh'
107
154
108
155
- name : build release
109
156
if : matrix.os != 'amzn2'
157
+ env :
158
+ CI_RELEASE_VERSION : ${{ github.event.inputs.release_as }}
159
+ CONTAINER : ghcr.io/emqx/emqx-builder/${{ matrix.builder.vsn }}-${{ matrix.os }}
110
160
run : |
111
- docker run -i --rm --user 1001 -v $(pwd):/wd --workdir /wd --platform=linux/${{ matrix.arch }} -e BUILD_RELEASE=1 -e CI_RELEASE_VERSION=${{ github.event.inputs.release_as }} $IMAGE bash -euc './build.sh'
161
+ docker run -t --rm --user 1001 \
162
+ -v $(pwd):/wd \
163
+ --workdir /wd \
164
+ -e BUILD_RELEASE=1 \
165
+ -e CI_RELEASE_VERSION=$CI_RELEASE_VERSION \
166
+ $CONTAINER bash -euc './build.sh'
112
167
113
168
- uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
114
169
with :
@@ -122,6 +177,7 @@ jobs:
122
177
needs :
123
178
- mac
124
179
- linux
180
+ - linux-old
125
181
if : startsWith(github.ref, 'refs/tags/') || inputs.release_as
126
182
steps :
127
183
- uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
0 commit comments