Skip to content

Commit 2b45ca9

Browse files
committed
241122
1 parent c1e66bd commit 2b45ca9

File tree

4 files changed

+95
-76
lines changed

4 files changed

+95
-76
lines changed

.github/actions/linux/action.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: build-linux
2+
runs:
3+
using: composite
4+
steps:
5+
- name: build-image
6+
shell: bash
7+
run: |
8+
pushd "$(mktemp -d)"
9+
curl -f -L --retry 5 https://github.com/tweag/rust-alpine-mimalloc/archive/refs/heads/master.tar.gz | tar xz --strip-components=1
10+
podman build \
11+
--network host \
12+
--pull \
13+
--squash-all \
14+
--tag rust:alpine-mimalloc \
15+
.
16+
popd
17+
18+
- name: build
19+
shell: bash
20+
run: |
21+
podman run \
22+
--env RUSTFLAGS="-C target-feature=+crt-static" \
23+
--init \
24+
--network host \
25+
--rm \
26+
--tmpfs /tmp:exec \
27+
--volume $PWD:/workspace \
28+
--workdir /workspace \
29+
rust:alpine-mimalloc \
30+
sh -c 'TARGET=$(rustc -vV | sed -n "s|host: ||p") && exec ./build.sh --target $TARGET'
31+
32+
MIMALLOC_VERBOSE=1 ./bin/wasm-component-ld --help
33+
MIMALLOC_VERBOSE=1 ./bin/wasm-tools --version
34+
MIMALLOC_VERBOSE=1 ./bin/wasmtime --version
35+
MIMALLOC_VERBOSE=1 ./bin/wit-bindgen --version
36+
MIMALLOC_VERBOSE=1 ./bin/wizer --version
37+
38+
file ./bin/wasm-component-ld
39+
file ./bin/wasm-tools
40+
file ./bin/wasmtime
41+
file ./bin/wit-bindgen
42+
file ./bin/wizer
43+
44+
mkdir wasm-tools-${{ github.ref_name }}-${{ matrix.arch }}-linux
45+
mv bin wasm-tools-${{ github.ref_name }}-${{ matrix.arch }}-linux
46+
tar \
47+
--sort=name \
48+
--owner=0 --group=0 --numeric-owner \
49+
--use-compress-program="zstd --ultra -22 --threads=0" \
50+
-cf wasm-tools-${{ github.ref_name }}-${{ matrix.arch }}-linux.tar.zst \
51+
wasm-tools-${{ github.ref_name }}-${{ matrix.arch }}-linux
52+
53+
- name: upload-artifact
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: wasm-tools-${{ github.ref_name }}-${{ matrix.arch }}-linux
57+
path: wasm-tools-${{ github.ref_name }}-${{ matrix.arch }}-linux.tar.zst

.github/workflows/build.yml

Lines changed: 33 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -8,90 +8,54 @@ on:
88
workflow_dispatch:
99

1010
jobs:
11-
linux:
11+
x86_64-linux:
1212
name: linux-${{ matrix.arch }}
13-
runs-on: ubuntu-24.04
13+
runs-on:
14+
- X64
15+
- Linux
16+
- podman
1417
strategy:
1518
fail-fast: false
1619
matrix:
17-
include:
18-
- arch: amd64
19-
sys: x86_64-linux
20-
- arch: arm64/v8
21-
sys: aarch64-linux
20+
arch:
21+
- x86_64
2222
steps:
23-
24-
- name: setup-podman
25-
uses: TerrorJack/setup-podman@master
26-
2723
- name: checkout
2824
uses: actions/checkout@v4
2925

30-
- name: build-image
31-
run: |
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-
--arch ${{ matrix.arch }} \
36-
--network host \
37-
--pull \
38-
--squash-all \
39-
--tag rust:alpine-mimalloc \
40-
.
41-
popd
42-
43-
- name: build
44-
run: |
45-
podman run \
46-
--arch ${{ matrix.arch }} \
47-
--env RUSTFLAGS="-C target-feature=+crt-static" \
48-
--init \
49-
--network host \
50-
--rm \
51-
--tmpfs /tmp:exec \
52-
--volume $PWD:/workspace \
53-
--workdir /workspace \
54-
rust:alpine-mimalloc \
55-
sh -c 'TARGET=$(rustc -vV | sed -n "s|host: ||p") && exec ./build.sh --target $TARGET'
56-
57-
MIMALLOC_VERBOSE=1 ./bin/wasm-component-ld --help
58-
MIMALLOC_VERBOSE=1 ./bin/wasm-tools --version
59-
MIMALLOC_VERBOSE=1 ./bin/wasmtime --version
60-
MIMALLOC_VERBOSE=1 ./bin/wit-bindgen --version
61-
MIMALLOC_VERBOSE=1 ./bin/wizer --version
62-
63-
file ./bin/wasm-component-ld
64-
file ./bin/wasm-tools
65-
file ./bin/wasmtime
66-
file ./bin/wit-bindgen
67-
file ./bin/wizer
26+
- name: build-linux
27+
uses: ./.github/actions/linux
6828

69-
mkdir wasm-tools-${{ github.ref_name }}-${{ matrix.sys }}
70-
mv bin wasm-tools-${{ github.ref_name }}-${{ matrix.sys }}
71-
tar \
72-
--sort=name \
73-
--owner=0 --group=0 --numeric-owner \
74-
--use-compress-program="zstd --ultra -22 --threads=0" \
75-
-cf wasm-tools-${{ github.ref_name }}-${{ matrix.sys }}.tar.zst \
76-
wasm-tools-${{ github.ref_name }}-${{ matrix.sys }}
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
7743

78-
- name: upload-artifact
79-
uses: actions/upload-artifact@v4
80-
with:
81-
name: wasm-tools-${{ github.ref_name }}-${{ matrix.sys }}
82-
path: wasm-tools-${{ github.ref_name }}-${{ matrix.sys }}.tar.zst
44+
- name: build-linux
45+
uses: ./.github/actions/linux
8346

8447
darwin:
8548
name: darwin-${{ matrix.arch }}
86-
runs-on: macos-latest
49+
runs-on:
50+
- ARM64
51+
- macOS
8752
strategy:
8853
fail-fast: false
8954
matrix:
9055
arch:
9156
- x86_64
9257
- aarch64
9358
steps:
94-
9559
- name: checkout
9660
uses: actions/checkout@v4
9761

@@ -111,9 +75,7 @@ jobs:
11175
11276
mkdir wasm-tools-${{ github.ref_name }}-darwin-${{ matrix.arch }}
11377
mv bin wasm-tools-${{ github.ref_name }}-darwin-${{ matrix.arch }}
114-
gtar \
115-
--sort=name \
116-
--owner=0 --group=0 --numeric-owner \
78+
tar \
11779
--use-compress-program="zstd --ultra -22 --threads=0" \
11880
-cf wasm-tools-${{ github.ref_name }}-darwin-${{ matrix.arch }}.tar.zst \
11981
wasm-tools-${{ github.ref_name }}-darwin-${{ matrix.arch }}
@@ -126,15 +88,15 @@ jobs:
12688

12789
windows:
12890
name: windows-${{ matrix.arch }}
129-
runs-on: windows-latest
91+
runs-on:
92+
- X64
93+
- Windows
13094
strategy:
13195
fail-fast: false
13296
matrix:
13397
arch:
13498
- x86_64
135-
- aarch64
13699
steps:
137-
138100
- name: checkout
139101
uses: actions/checkout@v4
140102

@@ -150,7 +112,7 @@ jobs:
150112
--all-features `
151113
--root wasm-tools-${{ github.ref_name }}-windows-${{ matrix.arch }} `
152114
--target ${{ matrix.arch }}-pc-windows-msvc `
153-
--git https://github.com/TerrorJack/wizer.git `
115+
--git https://github.com/haskell-wasm/wizer.git `
154116
wizer
155117
156118
cargo install `

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Static builds of `wasm-tools`, `wasmtime-cli`, `wizer` for
44
{x86_64,aarch64}-{linux,darwin,windows}:
55

6-
- `wasm-component-ld`: `v0.5.8`
7-
- `wasm-tools`: `v1.217.0`
8-
- `wasmtime-cli`: `v25.0.0`
9-
- `wit-bindgen-cli`: `v0.32.0`
6+
- `wasm-component-ld`: `v0.5.10`
7+
- `wasm-tools`: `v1.220.0`
8+
- `wasmtime-cli`: `v27.0.0`
9+
- `wit-bindgen-cli`: `v0.35.0`
1010
- `wizer`: `v7.0.5-git`

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ cargo install \
66
--all-features \
77
--config 'profile.release.strip = "symbols"' \
88
--root "$PWD" \
9-
--git https://github.com/TerrorJack/wizer.git \
9+
--git https://github.com/haskell-wasm/wizer.git \
1010
wizer ${1+"$@"}
1111

1212
cargo install \

0 commit comments

Comments
 (0)