bumping up version number on this branch #46
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: Haskell CI with Nix Flake | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: [main, unstable, generators] | |
push: | |
branches: [main, unstable, generators] | |
schedule: | |
- cron: '0 0 * * 0' # Weekly to maintain cache | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
name: Checkout code | |
- name: Setup Nix with Flakes support | |
uses: cachix/install-nix-action@v15 | |
with: | |
# Removed install_url to rely on the action's default installation method | |
extra_nix_config: | | |
experimental-features = nix-command flakes | |
- name: Build and run with Nix Flake | |
run: | | |
nix build .#pelotero-engine:exe:generators --accept-flake-config | |
./result/bin/generators | |
nix build .#pelotero-engine:exe:playground --accept-flake-config | |
# ./result/bin/playground | |
nix build .#pelotero-engine:exe:head2head --accept-flake-config | |
# ./result/bin/head2head | |
nix build .#pelotero-engine:exe:league --accept-flake-config | |
# ./result/bin/league | |
nix build .#pelotero-engine:exe:test_adt --accept-flake-config | |
# ./result/bin/test_adt | |
nix build .#pelotero-engine:exe:official --accept-flake-config | |
# ./result/bin/official | |
nix build .#pelotero-engine:exe:autodraft --accept-flake-config | |
# ./result/bin/autodraft | |
nix build .#pelotero-engine:exe:fetchStats --accept-flake-config | |
./result/bin/fetchStats 2023-07-01 2023-07-02 | |
nix build .#pelotero-engine:exe:roster --accept-flake-config | |
./result/bin/roster 2023 | |
# - name: Run Generator | |
# run: ./result/bin/generators | |
# - name: Run Roster | |
# run: | | |
# ./result/bin/roster 2024 | |
# Optional: Cache Nix store to speed up builds | |
- uses: actions/cache@v2 | |
with: | |
path: /nix/store | |
key: ${{ runner.os }}-nix-${{ hashFiles('flake.lock') }} | |
restore-keys: | | |
${{ runner.os }}-nix- |