build Nix packages #197
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "build Nix packages" | |
on: | |
pull_request: | |
push: | |
# schedule: | |
# - cron: '53 19 * * *' # AEST 5:53 am | |
workflow_run: | |
workflows: [update Nix packages] | |
types: [completed] | |
workflow_dispatch: | |
jobs: | |
update-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v20 | |
- run: | | |
nix run .#update -- check | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
# end-user packages to ci build for cache | |
pkg: | |
[aslp, bap-aslp, bap-primus, basil, | |
alive2, retdec-uq-pac, asl-translator, | |
gtirb-semantics, ddisasm] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v20 | |
with: { nix_path: 'nixpkgs=channel:nixpkgs-unstable' } | |
- uses: cachix/cachix-action@v12 | |
with: { name: pac-nix, authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' } | |
- run: nix build .#${{matrix.pkg}} | |
- name: Run nix build .#${{matrix.pkg}}.tests | |
run: | | |
for test in $(nix eval .#${{matrix.pkg}}.tests --json | jq -r keys[]); do | |
nix build .#${{matrix.pkg}}.tests.$test --no-link | |
done | |
- run: ls -l |