From 883fa543961204c2425dc977a90cd11036fd893e Mon Sep 17 00:00:00 2001 From: Matt Knight Date: Sat, 21 Sep 2024 22:52:54 +0200 Subject: [PATCH] add ci --- .github/workflows/build.yml | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..17b940b --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,42 @@ +name: Build and Test +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest, macos-latest] + target: [ + native, + x86_64-linux-gnu, + x86_64-linux-musl, + x86_64-windows, + aarch64-macos, + aarch64-linux-gnu, + aarch64-linux-musl + # TODO: bsd + ] + optimize: [ + Debug, + ReleaseSafe, + ReleaseFast, + ReleaseSmall + ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + + - name: Setup Zig + uses: mlugg/setup-zig@v1 + with: + version: 0.13.0 + + - name: Build + run: zig build -Dtarget=${{ matrix.target }} -Doptimize=${{ matrix.optimize }}