attic/.github/workflows/build.yml
Zhaofeng Li 50e5ecb7f9 Migrate to Crane
The nixpkgs-acceptable package expression is still in `package.nix`.
2023-01-02 23:29:09 -07:00

31 lines
870 B
YAML

name: Build
on:
pull_request:
push:
jobs:
tests:
strategy:
matrix:
os:
- ubuntu-latest
- macos-11
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2.3.5
- name: Obtain current username
run: |
echo ACTION_USER=$USER >> $GITHUB_ENV
- uses: DeterminateSystems/nix-installer@main
with:
extra-conf: |
trusted-users = root ${{ env.ACTION_USER }}
substituters = https://staging.attic.rs/attic-ci https://cache.nixos.org
trusted-public-keys = attic-ci:U5Sey4mUxwBXM3iFapmP0/ogODXywKLRNgRPQpEXxbo= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
- name: Build and run tests
run: |
tests=$(nix build .#attic-tests --no-link --print-out-paths -L)
find "$tests/bin" -exec {} \;