1111 workflow_dispatch :
1212
1313permissions :
14+ actions : read
1415 contents : read
1516
1617env :
2526 WASMTIME_VERSION : v33.0.2
2627
2728jobs :
28- build-and-verify :
29+ build-and-smoke :
30+ name : Build module and verify CLI parity
2931 runs-on : ubuntu-24.04
30- timeout-minutes : 360
32+ timeout-minutes : 240
3133
3234 steps :
3335 - name : Check out source
@@ -125,13 +127,7 @@ jobs:
125127 set -euxo pipefail
126128 bash wasm/verify/cli-smoke.sh
127129
128- - name : Verify an end-to-end assembly against the native image
129- shell : bash
130- run : |
131- set -euxo pipefail
132- bash wasm/verify/end-to-end.sh
133-
134- - name : Write provenance
130+ - name : Write build provenance
135131 if : always()
136132 shell : bash
137133 run : |
@@ -151,12 +147,12 @@ jobs:
151147 } | tee wasm/dist/PROVENANCE.txt
152148 docker inspect "$FLYE_NATIVE_IMAGE" > wasm/dist/native-image-inspect.json 2>/dev/null || true
153149
154- - name : Publish the complete WebAssembly package
150+ - name : Publish the complete WebAssembly package before the long assembly test
155151 if : always()
156152 uses : actions/upload-artifact@v4
157153 with :
158154 name : flye-2.9.6-complete-wasm
159- if-no-files-found : error
155+ if-no-files-found : warn
160156 compression-level : 0
161157 retention-days : 30
162158 path : |
@@ -167,12 +163,125 @@ jobs:
167163 wasm/dist/container2wasm-flye.Dockerfile
168164 wasm/dist/container2wasm-flye.Dockerfile.sha256
169165 wasm/dist/verification/**
170- wasm/dist/parity/native/assembly.fasta
171- wasm/dist/parity/native/assembly_graph.gfa
172- wasm/dist/parity/native/assembly_info.txt
173- wasm/dist/parity/wasm/assembly.fasta
174- wasm/dist/parity/wasm/assembly_graph.gfa
175- wasm/dist/parity/wasm/assembly_info.txt
176166 wasm/run-flye-wasi.sh
177167 wasm/README.md
178168 LICENSE
169+
170+ assembly-parity :
171+ name : Verify native versus WebAssembly assembly
172+ needs : build-and-smoke
173+ runs-on : ubuntu-24.04
174+ timeout-minutes : 300
175+
176+ steps :
177+ - name : Check out source
178+ uses : actions/checkout@v4
179+
180+ - name : Download the verified WebAssembly package
181+ uses : actions/download-artifact@v4
182+ with :
183+ name : flye-2.9.6-complete-wasm
184+ path : .
185+
186+ - name : Validate the downloaded module
187+ shell : bash
188+ run : |
189+ set -euxo pipefail
190+ test -s "$FLYE_WASM_MODULE"
191+ test "$(head -c 4 "$FLYE_WASM_MODULE" | od -An -tx1 | tr -d ' \n')" = "0061736d"
192+ sha256sum --check wasm/dist/SHA256SUMS
193+
194+ - name : Build the pinned native Flye baseline image
195+ shell : bash
196+ run : |
197+ set -euxo pipefail
198+ docker build \
199+ --platform linux/amd64 \
200+ --progress plain \
201+ --tag "$FLYE_NATIVE_IMAGE" \
202+ --file wasm/Dockerfile \
203+ .
204+ docker run --rm "$FLYE_NATIVE_IMAGE" /opt/flye/bin/flye --version
205+
206+ - name : Reclaim disk and add emergency swap
207+ shell : bash
208+ run : |
209+ set -euxo pipefail
210+ sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc /usr/local/share/boost || true
211+ docker builder prune --all --force || true
212+ docker image prune --force || true
213+ docker image inspect "$FLYE_NATIVE_IMAGE" >/dev/null
214+
215+ if ! sudo swapon --show=NAME --noheadings | grep -q .; then
216+ sudo fallocate -l 8G /swapfile
217+ sudo chmod 600 /swapfile
218+ sudo mkswap /swapfile
219+ if ! sudo swapon /swapfile; then
220+ echo "warning: this runner does not permit enabling swap" >&2
221+ fi
222+ fi
223+
224+ free -h
225+ sudo swapon --show || true
226+ df -h
227+
228+ - name : Install Wasmtime
229+ shell : bash
230+ run : |
231+ set -euxo pipefail
232+ archive="wasmtime-${WASMTIME_VERSION}-x86_64-linux.tar.xz"
233+ url="https://github.com/bytecodealliance/wasmtime/releases/download/${WASMTIME_VERSION}/${archive}"
234+ curl --fail --location --retry 5 --output "/tmp/${archive}" "$url"
235+ tar -xJf "/tmp/${archive}" -C /tmp
236+ sudo install -m 0755 "/tmp/wasmtime-${WASMTIME_VERSION}-x86_64-linux/wasmtime" /usr/local/bin/wasmtime
237+ wasmtime --version
238+
239+ - name : Verify an end-to-end assembly against the native image
240+ shell : bash
241+ env :
242+ WASMTIME_BACKTRACE_DETAILS : " 1"
243+ run : |
244+ set -euo pipefail
245+ diagnostics=wasm/dist/parity/runner-diagnostics.log
246+ mkdir -p "$(dirname "$diagnostics")"
247+
248+ heartbeat() {
249+ while :; do
250+ printf '\n===== runner heartbeat %s =====\n' "$(date --utc --iso-8601=seconds)"
251+ free -m || true
252+ df -h / "$PWD/wasm/dist" || true
253+ cat /proc/pressure/memory 2>/dev/null || true
254+ cat /proc/pressure/io 2>/dev/null || true
255+ ps -eo pid,ppid,ni,stat,%cpu,%mem,rss,vsz,comm,args --sort=-rss | sed -n '1,12p' || true
256+ sleep 30
257+ done
258+ }
259+
260+ heartbeat > >(tee -a "$diagnostics") 2>&1 &
261+ heartbeat_pid=$!
262+ cleanup() {
263+ kill "$heartbeat_pid" 2>/dev/null || true
264+ wait "$heartbeat_pid" 2>/dev/null || true
265+ }
266+ trap cleanup EXIT INT TERM
267+
268+ if command -v ionice >/dev/null 2>&1; then
269+ ionice -c 3 nice -n 10 \
270+ timeout --signal=TERM --kill-after=5m 240m \
271+ bash wasm/verify/end-to-end.sh
272+ else
273+ nice -n 10 \
274+ timeout --signal=TERM --kill-after=5m 240m \
275+ bash wasm/verify/end-to-end.sh
276+ fi
277+
278+ - name : Publish assembly parity results and runner diagnostics
279+ if : always()
280+ uses : actions/upload-artifact@v4
281+ with :
282+ name : flye-2.9.6-assembly-parity
283+ if-no-files-found : warn
284+ compression-level : 0
285+ retention-days : 30
286+ path : |
287+ wasm/dist/parity/**
0 commit comments