88 workflow_dispatch :
99
1010jobs :
11- x86_64- linux :
12- name : linux- ${{ matrix.arch }}
11+ linux :
12+ name : ${{ matrix.arch }}-linux
1313 runs-on :
14- - X64
14+ - ${{ matrix.runner_tag }}
1515 - Linux
1616 - podman
1717 strategy :
18- fail-fast : false
1918 matrix :
20- arch :
21- - x86_64
19+ include :
20+ - arch : x86_64
21+ runner_tag : X64
22+ - arch : aarch64
23+ runner_tag : ARM64
2224 steps :
2325 - name : checkout
2426 uses : actions/checkout@v4
2527
26- - name : build-linux
27- uses : ./.github/actions/linux
28+ - name : build-image
29+ run : |
30+ podman rmi --ignore rust:alpine-mimalloc
31+
32+ pushd "$(mktemp -d)"
33+ curl -f -L --retry 5 https://github.com/tweag/rust-alpine-mimalloc/archive/refs/heads/master.tar.gz | tar xz --strip-components=1
34+ podman build \
35+ --network host \
36+ --pull \
37+ --squash-all \
38+ --tag rust:alpine-mimalloc \
39+ .
40+ popd
2841
29- aarch64-linux :
30- name : linux-${{ matrix.arch }}
31- runs-on :
32- - ARM64
33- - Linux
34- - podman
35- strategy :
36- fail-fast : false
37- matrix :
38- arch :
39- - aarch64
40- steps :
41- - name : checkout
42- uses : actions/checkout@v4
42+ - name : build
43+ run : |
44+ podman run \
45+ --env RUSTFLAGS="-C target-feature=+crt-static" \
46+ --init \
47+ --network host \
48+ --rm \
49+ --tmpfs /tmp:exec \
50+ --volume $PWD:/workspace \
51+ --workdir /workspace \
52+ rust:alpine-mimalloc \
53+ sh -c 'TARGET=$(rustc -vV | sed -n "s|host: ||p") && exec ./build.sh --target $TARGET'
54+
55+ MIMALLOC_VERBOSE=1 ./bin/wasm-component-ld --help
56+ MIMALLOC_VERBOSE=1 ./bin/wasm-tools --version
57+ MIMALLOC_VERBOSE=1 ./bin/wasmtime --version
58+ MIMALLOC_VERBOSE=1 ./bin/wit-bindgen --version
59+ MIMALLOC_VERBOSE=1 ./bin/wizer --version
4360
44- - name : build-linux
45- uses : ./.github/actions/linux
61+ file ./bin/wasm-component-ld
62+ file ./bin/wasm-tools
63+ file ./bin/wasmtime
64+ file ./bin/wit-bindgen
65+ file ./bin/wizer
66+
67+ mkdir wasm-tools-${{ github.ref_name }}-${{ matrix.arch }}-linux
68+ mv bin wasm-tools-${{ github.ref_name }}-${{ matrix.arch }}-linux
69+ tar \
70+ --sort=name \
71+ --owner=0 --group=0 --numeric-owner \
72+ --use-compress-program="zstd --ultra -22 --threads=0" \
73+ -cf wasm-tools-${{ github.ref_name }}-${{ matrix.arch }}-linux.tar.zst \
74+ wasm-tools-${{ github.ref_name }}-${{ matrix.arch }}-linux
75+
76+ - name : upload-artifact
77+ uses : actions/upload-artifact@v4
78+ with :
79+ name : wasm-tools-${{ github.ref_name }}-${{ matrix.arch }}-linux
80+ path : wasm-tools-${{ github.ref_name }}-${{ matrix.arch }}-linux.tar.zst
4681
4782 darwin :
4883 name : darwin-${{ matrix.arch }}
4984 runs-on :
5085 - ARM64
5186 - macOS
5287 strategy :
53- fail-fast : false
5488 matrix :
5589 arch :
5690 - x86_64
6195
6296 - name : install-deps
6397 run : |
98+ rustup update
6499 rustup target add ${{ matrix.arch }}-apple-darwin
65100
66101 - name : build
92127 - X64
93128 - Windows
94129 strategy :
95- fail-fast : false
96130 matrix :
97131 arch :
98132 - x86_64
@@ -102,6 +136,7 @@ jobs:
102136
103137 - name : install-deps
104138 run : |
139+ rustup update
105140 rustup target add ${{ matrix.arch }}-pc-windows-msvc
106141
107142 - name : build
@@ -115,11 +150,16 @@ jobs:
115150 --git https://github.com/haskell-wasm/wizer.git `
116151 wizer
117152
153+ cargo install `
154+ --root wasm-tools-${{ github.ref_name }}-windows-${{ matrix.arch }} `
155+ --target ${{ matrix.arch }}-pc-windows-msvc `
156+ wasm-tools
157+
118158 cargo install `
119159 --all-features `
120160 --root wasm-tools-${{ github.ref_name }}-windows-${{ matrix.arch }} `
121161 --target ${{ matrix.arch }}-pc-windows-msvc `
122- wasmtime-cli wasm-component-ld wasm-tools wit-bindgen-cli
162+ wasmtime-cli wasm-component-ld wit-bindgen-cli
123163
124164 - name : upload-artifact
125165 uses : actions/upload-artifact@v4
0 commit comments