Skip to content

Commit 4280b79

Browse files
committed
ci: enable free space only for selected tmpl
1 parent 623339f commit 4280b79

1 file changed

Lines changed: 34 additions & 33 deletions

File tree

.github/workflows/test.yml

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,44 +8,45 @@ jobs:
88
test:
99
strategy:
1010
matrix:
11-
template:
12-
- ""
13-
- agd
14-
- hask
15-
- iogx
16-
- iogx-plutus
17-
- pix
18-
- pix-ctl
19-
- pix-ctl-full
20-
os:
21-
- ubuntu-latest
22-
- macos-latest
23-
exclude:
24-
- template: iogx
11+
target:
12+
- name: ""
13+
free: false
14+
os: ubuntu-latest
15+
- name: ""
16+
free: false
2517
os: macos-latest
26-
- template: iogx-plutus
27-
os: macos-latest
28-
- template: pix
29-
os: macos-latest
30-
- template: pix-ctl
31-
os: macos-latest
32-
- template: pix-ctl-full
33-
os: macos-latest
34-
# FIXME flakes not passing CI tests
35-
# error: flake 'git+file:///private/tmp/nix-templates/target' does not provide attribute 'devShells.aarch64-darwin.default', 'devShell.aarch64-darwin', 'packages.aarch64-darwin.default' or 'defaultPackage.aarch64-darwin'
36-
- template: hask
37-
os: macos-latest
38-
- template: agd
39-
os: macos-latest
40-
runs-on: ${{ matrix.os }}
18+
# FIXME hask and agd flakes not running mac CI tests
19+
# error: flake 'git+file:///private/tmp/nix-templates/target' does not provide attribute 'devShells.aarch64-darwin.default', 'devShell.aarch64-darwin', 'packages.aarch64-darwin.default' or 'defaultPackage.aarch64-darwin'
20+
- name: agd
21+
free: false
22+
os: ubuntu-latest
23+
- name: hask
24+
free: false
25+
os: ubuntu-latest
26+
- name: iogx
27+
free: false
28+
os: ubuntu-latest
29+
- name: iogx-plutus
30+
free: false
31+
os: ubuntu-latest
32+
- name: pix
33+
free: false
34+
os: ubuntu-latest
35+
- name: pix-ctl
36+
free: false
37+
os: ubuntu-latest
38+
- name: pix-ctl-full
39+
free: false
40+
os: ubuntu-latest
41+
runs-on: ${{ matrix.target.os }}
4142
steps:
4243
- uses: actions/checkout@v4
4344
- uses: dorny/paths-filter@v2
4445
id: changes
4546
with:
4647
filters: |
4748
template:
48-
- ${{ matrix.template && format('{0}/**', matrix.template) || 'flake.*' }}
49+
- ${{ matrix.target.name && format('{0}/**', matrix.target.name) || 'flake.*' }}
4950
- CHANGELOG.md
5051
- .github/workflows/test.*
5152
- if: steps.changes.outputs.template == 'true'
@@ -65,12 +66,12 @@ jobs:
6566
uses: webfactory/ssh-agent@v0.8.0
6667
with:
6768
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
68-
- if: ${{ steps.changes.outputs.template == 'true' && matrix.os == 'macos-latest' }}
69+
- if: ${{ steps.changes.outputs.template == 'true' && matrix.target.os == 'macos-latest' }}
6970
run: |
7071
brew install gnu-sed
7172
echo "$(brew --prefix)/opt/gnu-sed/libexec/gnubin:$PATH" >> $GITHUB_PATH
7273
73-
- if: ${{ steps.changes.outputs.template == 'true' && matrix.os == 'ubuntu-latest' }}
74+
- if: ${{ steps.changes.outputs.template == 'true' && matrix.target.os == 'ubuntu-latest' && matrix.target.free }}
7475
name: Free Disk Space (Ubuntu)
7576
uses: jlumbroso/free-disk-space@main
7677
with:
@@ -82,7 +83,7 @@ jobs:
8283
curl https://raw.githubusercontent.com/cachix/cachix-action/master/dist/main/list-nix-store.sh --output ./.github/workflows/list-nix-store.sh
8384
chmod +x ./.github/workflows/list-nix-store.sh
8485
./.github/workflows/list-nix-store.sh > /tmp/store
85-
./.github/workflows/test.sh ${{ matrix.template }}
86+
./.github/workflows/test.sh ${{ matrix.target.name }}
8687
post: |
8788
./.github/workflows/list-nix-store.sh > /tmp/store-new
8889
comm -13 <(sort /tmp/store) <(./.github/workflows/list-nix-store.sh) > /tmp/store-new

0 commit comments

Comments
 (0)