Skip to content

ci(update): allow manual dispatch #12

ci(update): allow manual dispatch

ci(update): allow manual dispatch #12

Workflow file for this run

name: CI
on:
push:
branches: [master]
paths:
- src/*
- .github/workflows/*
pull_request:
paths:
- src/*
- .github/workflows/*
concurrency:
cancel-in-progress: true
group: ${{github.workflow}}-${{github.ref_name}}
jobs:
test:
runs-on: ${{matrix.os}}
name: Test target ${{matrix.target}}
strategy:
fail-fast: false
matrix:
target:
- x86_64-linux-gnu
- x86_64-linux-musl
- aarch64-linux-gnu
- x86_64-windows-gnu
- x86_64-windows-msvc
- aarch64-macos-none
include:
- os: ubuntu-latest
target: x86_64-linux-gnu
- os: ubuntu-latest
target: x86_64-linux-musl
- os: ubuntu-latest
target: aarch64-linux-gnu
flags: -fqemu -Ddynamic-linker=/usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.1
- os: windows-latest
target: x86_64-windows-gnu
- os: windows-latest
target: x86_64-windows-msvc
- os: macos-latest
target: aarch64-macos-none
- os: macos-latest
target: x86_64-macos-none
flags: -frosetta
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Zig
uses: mlugg/setup-zig@v1
- name: Set up MSVC
uses: ilammy/msvc-dev-cmd@v1
if: matrix.target == 'x86_64-windows-msvc'
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
if: matrix.target == 'aarch64-linux-gnu'
with:
platforms: arm64
- name: Install packages
if: matrix.target == 'aarch64-linux-gnu'
run: |-
sudo apt-get update
sudo apt-get install -y libc6-dev-arm64-cross
printf 'LD_LIBRARY_PATH=/usr/aarch64-linux-gnu/lib\n' >> "$GITHUB_ENV"
- name: Run unit tests
run: zig build test -Dtarget=${{matrix.target}} ${{matrix.flags}} --verbose