@@ -58,11 +58,11 @@ jobs:
5858# =============================
5959
6060 build :
61- name : " ubuntu-${{ matrix.os }}, GHC: ${{ matrix.ghc }}"
61+ name : " ubuntu-${{ matrix.os }}-${{ matrix.arch }} , GHC: ${{ matrix.ghc }}"
6262 needs : maybe-release
6363 env :
6464 apps : " smp-server xftp-server ntf-server xftp"
65- runs-on : ubuntu- ${{ matrix.os }}
65+ runs-on : ${{ matrix.runner }}
6666 services :
6767 postgres :
6868 image : postgres:15
@@ -81,16 +81,34 @@ jobs:
8181 matrix :
8282 include :
8383 - os : 22.04
84+ os_underscore : 22_04
85+ arch : x86-64
86+ runner : " ubuntu-22.04"
8487 ghc : " 8.10.7"
85- platform_name : 22_04-8.10.7
8688 should_run : ${{ !(github.ref == 'refs/heads/stable' || startsWith(github.ref, 'refs/tags/v')) }}
8789 - os : 22.04
90+ os_underscore : 22_04
91+ arch : x86-64
92+ runner : " ubuntu-22.04"
8893 ghc : " 9.6.3"
89- platform_name : 22_04-x86-64
9094 should_run : true
9195 - os : 24.04
96+ os_underscore : 24_04
97+ arch : x86-64
98+ runner : " ubuntu-24.04"
99+ ghc : " 9.6.3"
100+ should_run : true
101+ - os : 22.04
102+ os_underscore : 22_04
103+ arch : aarch64
104+ runner : " ubuntu-22.04-arm"
105+ ghc : " 9.6.3"
106+ should_run : true
107+ - os : 24.04
108+ os_underscore : 24_04
109+ arch : aarch64
110+ runner : " ubuntu-24.04-arm"
92111 ghc : " 9.6.3"
93- platform_name : 24_04-x86-64
94112 should_run : true
95113 steps :
96114 - name : Clone project
@@ -127,11 +145,7 @@ jobs:
127145 context : .
128146 load : true
129147 file : Dockerfile.build
130- tags : build/${{ matrix.platform_name }}:latest
131- cache-from : |
132- type=gha
133- type=gha,scope=master
134- cache-to : type=gha,mode=max
148+ tags : build/${{ matrix.os }}:latest
135149 build-args : |
136150 TAG=${{ matrix.os }}
137151 GHC=${{ matrix.ghc }}
@@ -143,18 +157,21 @@ jobs:
143157 path : |
144158 ~/.cabal/store
145159 dist-newstyle
146- key : ${{ matrix.os }}-${{ hashFiles('cabal.project', 'simplexmq.cabal') }}
160+ key : ubuntu- ${{ matrix.os }}-${{ matrix.arch }}-ghc${{ matrix.ghc }}-${{ hashFiles('cabal.project', 'simplexmq.cabal') }}
147161
148162 - name : Start container
149163 if : matrix.should_run == true
150164 shell : bash
151165 run : |
152166 docker run -t -d \
167+ --device /dev/fuse \
168+ --cap-add SYS_ADMIN \
169+ --security-opt apparmor:unconfined \
153170 --name builder \
154171 -v ~/.cabal:/root/.cabal \
155172 -v /home/runner/work/_temp:/home/runner/work/_temp \
156173 -v ${{ github.workspace }}:/project \
157- build/${{ matrix.platform_name }}:latest
174+ build/${{ matrix.os }}:latest
158175
159176 - name : Build smp-server (postgresql) and tests
160177 if : matrix.should_run == true
@@ -183,7 +200,7 @@ jobs:
183200 id : prepare-postgres
184201 shell : bash
185202 run : |
186- name="smp-server-postgres-ubuntu-${{ matrix.platform_name }}"
203+ name="smp-server-postgres-ubuntu-${{ matrix.os_underscore }}-${{ matrix.arch }}"
187204 docker cp builder:/out/smp-server $name
188205
189206 path="${{ github.workspace }}/$name"
@@ -215,9 +232,9 @@ jobs:
215232 printf 'bins<<EOF\n' > bins.output
216233 printf 'hashes<<EOF\n' > hashes.output
217234 for i in ${{ env.apps }}; do
218- mv ./out/$i ./$i -ubuntu-${{ matrix.platform_name }}
235+ name="$i -ubuntu-${{ matrix.os_underscore }}-${{ matrix.arch }}"
219236
220- name="$i-ubuntu-${{ matrix.platform_name }}"
237+ mv ./out/$i ./$name
221238
222239 path="${{ github.workspace }}/$name"
223240 hash="SHA2-256($name)= $(openssl sha256 $path | cut -d' ' -f 2)"
0 commit comments