Skip to content

250630

250630 #52

Workflow file for this run

name: build
on:
push:
tags:
- "*"
pull_request:
workflow_dispatch:
jobs:
linux:
name: ${{ matrix.arch }}-linux
runs-on:
- ${{ matrix.runner_tag }}
- Linux
- podman
strategy:
matrix:
include:
- arch: x86_64
runner_tag: X64
- arch: aarch64
runner_tag: ARM64
steps:
- name: checkout
uses: actions/checkout@v4
- name: build-image
run: |
pushd "$(mktemp -d)"
curl -f -L --retry 5 https://github.com/tweag/rust-alpine-mimalloc/archive/refs/heads/master.tar.gz | tar xz --strip-components=1
sed -i 's/alpine:latest/alpine:edge/' Dockerfile
podman build \
--network host \
--pull \
--squash-all \
--tag rust:alpine-mimalloc \
.
popd
- name: build
run: |
podman run \
--init \
--network host \
--rm \
--tmpfs /tmp:exec \
--volume $PWD:/workspace \
--workdir /workspace \
rust:alpine-mimalloc \
sh -c 'TARGET=$(rustc -vV | sed -n "s|host: ||p") && exec ./build.sh --target $TARGET'
podman rmi rust:alpine-mimalloc
MIMALLOC_VERBOSE=1 ./bin/wasm-component-ld --help
MIMALLOC_VERBOSE=1 ./bin/wasm-tools --version
MIMALLOC_VERBOSE=1 ./bin/wasmi_cli --version
MIMALLOC_VERBOSE=1 ./bin/wasmtime --version
MIMALLOC_VERBOSE=1 ./bin/wit-bindgen --version
MIMALLOC_VERBOSE=1 ./bin/wizer --version
file ./bin/wasm-component-ld
file ./bin/wasm-tools
file ./bin/wasmi_cli
file ./bin/wasmtime
file ./bin/wit-bindgen
file ./bin/wizer
mkdir wasm-tools-${{ github.ref_name }}-${{ matrix.arch }}-linux
mv bin wasm-tools-${{ github.ref_name }}-${{ matrix.arch }}-linux
tar \
--sort=name \
--owner=0 --group=0 --numeric-owner \
--use-compress-program="zstd --ultra -22 --threads=0" \
-cf wasm-tools-${{ github.ref_name }}-${{ matrix.arch }}-linux.tar.zst \
wasm-tools-${{ github.ref_name }}-${{ matrix.arch }}-linux
- name: upload-artifact
uses: actions/upload-artifact@v4
with:
name: wasm-tools-${{ github.ref_name }}-${{ matrix.arch }}-linux
path: wasm-tools-${{ github.ref_name }}-${{ matrix.arch }}-linux.tar.zst
darwin:
name: darwin-${{ matrix.arch }}
runs-on:
- ARM64
- macOS
strategy:
matrix:
arch:
- x86_64
- aarch64
steps:
- name: checkout
uses: actions/checkout@v4
- name: install-deps
run: |
rustup update
rustup target add ${{ matrix.arch }}-apple-darwin
- name: build
run: |
./build.sh --target ${{ matrix.arch }}-apple-darwin
file ./bin/wasm-component-ld
file ./bin/wasm-tools
file ./bin/wasmi_cli
file ./bin/wasmtime
file ./bin/wit-bindgen
file ./bin/wizer
mkdir wasm-tools-${{ github.ref_name }}-darwin-${{ matrix.arch }}
mv bin wasm-tools-${{ github.ref_name }}-darwin-${{ matrix.arch }}
tar \
--use-compress-program="zstd --ultra -22 --threads=0" \
-cf wasm-tools-${{ github.ref_name }}-darwin-${{ matrix.arch }}.tar.zst \
wasm-tools-${{ github.ref_name }}-darwin-${{ matrix.arch }}
- name: upload-artifact
uses: actions/upload-artifact@v4
with:
name: wasm-tools-${{ github.ref_name }}-darwin-${{ matrix.arch }}
path: wasm-tools-${{ github.ref_name }}-darwin-${{ matrix.arch }}.tar.zst
windows:
name: windows-${{ matrix.arch }}
runs-on:
- X64
- Windows
strategy:
matrix:
arch:
- x86_64
steps:
- name: checkout
uses: actions/checkout@v4
- name: install-deps
run: |
rustup update
rustup target add ${{ matrix.arch }}-pc-windows-msvc
- name: build
run: |
mkdir wasm-tools-${{ github.ref_name }}-windows-${{ matrix.arch }}
cargo install `
--root wasm-tools-${{ github.ref_name }}-windows-${{ matrix.arch }} `
--target ${{ matrix.arch }}-pc-windows-msvc `
wasm-tools
cargo install `
--all-features `
--root wasm-tools-${{ github.ref_name }}-windows-${{ matrix.arch }} `
--target ${{ matrix.arch }}-pc-windows-msvc `
wasmtime-cli wasm-component-ld wasmi_cli wit-bindgen-cli wizer
- name: upload-artifact
uses: actions/upload-artifact@v4
with:
name: wasm-tools-${{ github.ref_name }}-windows-${{ matrix.arch }}
path: wasm-tools-${{ github.ref_name }}-windows-${{ matrix.arch }}