-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (45 loc) · 1.65 KB
/
haskell.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Haskell CI with Nix Flake
on:
workflow_dispatch:
pull_request:
branches: [main]
push:
branches: [main]
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
nix build .#pelotero-engine:exe:head2head --accept-flake-config
nix build .#pelotero-engine:exe:league --accept-flake-config
nix build .#pelotero-engine:exe:test_adt --accept-flake-config
nix build .#pelotero-engine:exe:official --accept-flake-config
nix build .#pelotero-engine:exe:autodraft --accept-flake-config
nix build .#pelotero-engine:exe:fetchStats --accept-flake-config
nix build .#pelotero-engine:exe:roster --accept-flake-config
# - 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-