Custom WebAssembly Backend #374
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-all | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
type: string | |
required: false | |
ignore-cache: | |
required: false | |
type: string | |
default: false | |
workflow_call: | |
inputs: | |
version: | |
type: string | |
required: false | |
ignore-cache: | |
required: false | |
type: string | |
default: false | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
determine-version: | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.determine-version.outputs.version }} | |
steps: | |
- name: Determine version | |
id: determine-version | |
run: | | |
if [ "${{ inputs.version }}" != '' ] ; then | |
echo Selecting version: ${{ inputs.version }} | |
echo "version='${{ inputs.version }}'" >> "$GITHUB_OUTPUT" | |
else | |
echo Selecting version: ${{ github.ref_name }} | |
echo "version='${{ github.ref_name }}'" >> "$GITHUB_OUTPUT" | |
fi | |
build-win: | |
needs: [determine-version] | |
runs-on: windows-2022 | |
steps: | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- uses: mlugg/setup-zig@v1 | |
with: | |
version: 0.14.0 | |
- uses: bytecodealliance/actions/wasm-tools/setup@v1 | |
- uses: actions/checkout@v4 | |
- name: Build and run tests | |
run: | | |
mkdir orca | |
$env:PATH += Convert-Path orca | |
zig build test -Dsdk-path=orca | |
- name: Build sketches | |
run: | | |
zig build sketches | |
- name: Build and Package | |
run: | | |
zig build -Doptimize=ReleaseFast -Dsdk-path=orca -Dversion=${{ needs.determine-version.outputs.version }} --summary all | |
tar --format=ustar -cvzf orca-windows-x64.tar.gz orca | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: orca-windows-x64 | |
path: orca-windows-x64.tar.gz | |
build-macos-x64: | |
needs: [determine-version] | |
runs-on: macos-13 | |
steps: | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- uses: mlugg/setup-zig@v1 | |
with: | |
version: 0.14.0 | |
- uses: bytecodealliance/actions/wasm-tools/setup@v1 | |
- uses: actions/checkout@v4 | |
- name: Build and run tests | |
run: | | |
mkdir orca | |
export PATH=$PATH:$(realpath orca) | |
zig build test -Dsdk-path=orca | |
- name: Build sketches | |
run: | | |
zig build sketches | |
- name: Build and Package | |
run: | | |
zig build -Doptimize=ReleaseFast -Dsdk-path=orca -Dversion=${{ needs.determine-version.outputs.version }} --summary all | |
tar --format=ustar -czf orca-mac-x64.tar.gz orca | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: orca-mac-x64 | |
path: orca-mac-x64.tar.gz | |
build-macos-arm64: | |
needs: [determine-version] | |
runs-on: macos-14 | |
steps: | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- uses: mlugg/setup-zig@v1 | |
with: | |
version: 0.14.0 | |
- uses: bytecodealliance/actions/wasm-tools/setup@v1 | |
- uses: actions/checkout@v4 | |
- name: Build and run tests | |
run: | | |
mkdir orca | |
export PATH=$PATH:$(realpath orca) | |
zig build test -Dsdk-path=orca | |
- name: Build sketches | |
run: | | |
zig build sketches | |
- name: Build and Package | |
run: | | |
zig build -Doptimize=ReleaseFast -Dsdk-path=orca -Dversion=${{ needs.determine-version.outputs.version }} --summary all | |
tar --format=ustar -czf orca-mac-arm64.tar.gz orca | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: orca-mac-arm64 | |
path: orca-mac-arm64.tar.gz |