add github actions test
This commit is contained in:
parent
5eeac3a7c6
commit
4f5eda096c
1 changed files with 33 additions and 0 deletions
33
.github/workflows/test.yml
vendored
Normal file
33
.github/workflows/test.yml
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
on: [push, pull_request]
|
||||
name: Test
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
|
||||
target: [
|
||||
aarch64-macos,
|
||||
x86_64-macos,
|
||||
]
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
# Needed for macos SDK
|
||||
AGREE: "true"
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
# Install Nix and use that to run our tests so our environment matches exactly.
|
||||
- uses: cachix/install-nix-action@v18
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
|
||||
# Cross-compile the binary. We always use static building for this
|
||||
# because its the only way to access the headers.
|
||||
- name: Test Build
|
||||
run: nix develop -c zig build -Dtarget=${{ matrix.target }}
|
Loading…
Reference in a new issue