Merge pull request #341 from tweag/update_flake_lock_action #564
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: "nix-build" | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Nix Environment | |
uses: ./.github/actions/nix-common-setup | |
with: | |
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
- name: Lint | |
run: nix --print-build-logs build .#pre-commit | |
build: | |
needs: lint | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
system: x86_64-linux | |
- os: macos-latest | |
system: x86_64-darwin | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Nix Environment | |
uses: ./.github/actions/nix-common-setup | |
with: | |
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
- name: Build | |
run: nix --print-build-logs build .#packages.${{ matrix.system }}.monad-bayes | |
- name: Development environment (package only) | |
run: nix --print-build-logs develop .#packages.${{ matrix.system }}.monad-bayes --command echo Ready | |
- name: All GHCs | |
run: nix --print-build-logs build .#packages.${{ matrix.system }}.monad-bayes-all-ghcs | |
notebooks: | |
needs: build | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
system: x86_64-linux | |
# Jupyenv doesn't support Darwin yet, https://github.com/tweag/jupyenv/issues/388 | |
# - os: macos-latest | |
# system: x86_64-darwin | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Nix Environment | |
uses: ./.github/actions/nix-common-setup | |
with: | |
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
- name: Development environment (complete) | |
run: nix --print-build-logs develop --command echo Ready | |
- name: Check whether notebook *.html files are up to date | |
run: | | |
./regenerate_notebooks.sh | |
git diff --exit-code || (echo "Please update notebooks by running regenerate_notebooks.sh, and inspecting and committing the result." && exit 1) |