Output full logs in CI failures #159
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: Run | |
on: | |
push: | |
jobs: | |
run: | |
runs-on: ${{ matrix.os }} | |
name: Day ${{ matrix.day }} (${{ matrix.os }}) | |
strategy: | |
matrix: | |
os: ['ubuntu-latest', 'macos-latest'] | |
day: ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20'] | |
exclude: | |
# TODO: Investigate how we could build this with GNUStep | |
- os: 'ubuntu-latest' | |
day: '08' | |
# TODO: Investigate why Curry fails in the post-installation fixup: | |
# https://github.com/fwcd/advent-of-code-2023/actions/runs/7153749665/job/19480549989 | |
- os: 'ubuntu-latest' | |
day: '09' | |
# TODO: Investigate why the Swift compiler crashes on macOS | |
# https://github.com/fwcd/advent-of-code-2023/actions/runs/7496992931/job/20409901820 | |
- os: 'macos-latest' | |
day: '19' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v22 | |
with: | |
nix_path: nixpkgs=channel:nixos-unstable | |
- name: Build | |
# We have to disable sandboxing to allow derivations to access the network | |
# during builds. This is required e.g. to build day 9's PAKCS with Haskell | |
# Stack, which downloads its own GHC, packages etc. | |
run: | | |
set -o pipefail | |
nix build -v --option sandbox false || nix log | |
working-directory: 'day${{ matrix.day }}' | |
- name: Run with input | |
run: nix run . resources/input.txt | |
working-directory: 'day${{ matrix.day }}' |