Build in CI

This commit is contained in:
Mitchell Hashimoto
2022-06-26 10:05:20 -07:00
parent 7108ff3933
commit 5a7c40e3f1
2 changed files with 44 additions and 3 deletions

41
.github/workflows/test.yml vendored Normal file
View File

@ -0,0 +1,41 @@
on: [push, pull_request]
name: Test
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
target: [
aarch64-macos,
x86_64-macos,
aarch64-linux-gnu,
aarch64-linux-musl,
i386-linux-gnu,
i386-linux-musl,
x86_64-linux-gnu,
x86_64-linux-musl,
# No windows support currently.
# i386-windows,
# x86_64-windows-gnu,
]
runs-on: ${{ matrix.os }}
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v2
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@v17
with:
nix_path: nixpkgs=channel:nixos-unstable
# Run our go tests within the context of the dev shell from the flake. This
# will ensure we have all our dependencies.
- name: test
run: nix develop -c zig build -Dtarget=${{ matrix.target }}

6
flake.lock generated
View File

@ -18,11 +18,11 @@
}, },
"flake-utils": { "flake-utils": {
"locked": { "locked": {
"lastModified": 1653893745, "lastModified": 1656065134,
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", "narHash": "sha256-oc6E6ByIw3oJaIyc67maaFcnjYOz1mMcOtHxbEf9NwQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", "rev": "bee6a7250dd1b01844a2de7e02e4df7d8a0a206c",
"type": "github" "type": "github"
}, },
"original": { "original": {