@@ -23,12 +23,20 @@ jobs:
2323 include :
2424 - artifact : qjs-rust-x86_64-unknown-linux-gnu
2525 runner : ubuntu-latest
26+ target : x86_64-unknown-linux-gnu
27+ smoke : true
2628 - artifact : qjs-rust-aarch64-unknown-linux-gnu
2729 runner : ubuntu-24.04-arm
30+ target : aarch64-unknown-linux-gnu
31+ smoke : true
2832 - artifact : qjs-rust-x86_64-apple-darwin
29- runner : macos-13
33+ runner : macos-14
34+ target : x86_64-apple-darwin
35+ smoke : false
3036 - artifact : qjs-rust-aarch64-apple-darwin
3137 runner : macos-14
38+ target : aarch64-apple-darwin
39+ smoke : true
3240
3341 steps :
3442 - name : Checkout
@@ -40,30 +48,41 @@ jobs:
4048 - name : Setup Rust
4149 uses : ./.github/actions/setup-rust
4250
51+ - name : Install Rust target
52+ run : rustup target add ${{ matrix.target }}
53+
4354 - name : Build CLI
4455 # Release binaries include the optional agents feature so the standalone
4556 # CLI has the same Atomics/$262.agent support as the conformance runner.
46- run : cargo build --locked --release -p qjs-cli --features agents
57+ run : cargo build --locked --release -p qjs-cli --features agents --target ${{ matrix.target }}
4758
4859 - name : Package CLI
4960 shell : bash
5061 run : |
5162 set -euo pipefail
5263 package="${{ matrix.artifact }}"
5364 mkdir -p "dist/$package"
54- cp target/release/qjs "dist/$package/qjs-rust"
65+ cp " target/${{ matrix.target }}/ release/qjs" "dist/$package/qjs-rust"
5566 chmod +x "dist/$package/qjs-rust"
5667 cp README.md LICENSE "dist/$package/"
5768 tar -C dist -czf "dist/$package.tar.gz" "$package"
5869
5970 - name : Smoke test packaged binary
71+ if : ${{ matrix.smoke }}
6072 shell : bash
6173 run : |
6274 set -euo pipefail
6375 "dist/${{ matrix.artifact }}/qjs-rust" --version
6476 actual="$("dist/${{ matrix.artifact }}/qjs-rust" --raw -e '1 + 2')"
6577 test "$actual" = "3"
6678
79+ - name : Inspect cross-built binary
80+ if : ${{ !matrix.smoke }}
81+ shell : bash
82+ run : |
83+ set -euo pipefail
84+ file "dist/${{ matrix.artifact }}/qjs-rust"
85+
6786 - name : Upload release artifact
6887 uses : actions/upload-artifact@v6
6988 with :
0 commit comments