-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (60 loc) · 2.36 KB
/
closure-report.yaml
File metadata and controls
63 lines (60 loc) · 2.36 KB
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
53
54
55
56
57
58
59
60
61
62
63
name: Closure Size Report
on:
workflow_dispatch:
workflow_run:
workflows: ["Build and Cache Nix Flake"]
types:
- completed
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
report:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
strategy:
fail-fast: false
matrix:
host:
- ali-desktop
- ali-framework-laptop
- ali-work-laptop
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- uses: wimpysworld/nothing-but-nix@main
with:
hatchet-protocol: 'rampage'
- uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
github_access_token: ${{ secrets.GITHUB_TOKEN }}
extra_nix_config: |
max-jobs = auto
cores = 0
eval-cache = true
extra-substituters = https://cache.nixcache.org https://nix-community.cachix.org https://nix-gaming.cachix.org https://rust-overlay.cachix.org https://attic.xuyh0120.win/lantian https://cache.garnix.io
extra-trusted-public-keys = nixcache.org-1:fd7sIL2BDxZa68s/IqZ8kvDsxsjt3SV4mQKdROuPoak= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4= rust-overlay.cachix.org-1:l2scEhXR2wTljEGAr/OGGykVBVbvHI/phxoBUwxaXkk= lantian:EeAUQ+W+6r7EtwnmYjeVwx5kOGEBpjlBfPlzGlTNvHc= cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=
- name: Cache Nix evaluation
uses: actions/cache@v5
with:
path: ~/.cache/nix
key: nix-eval-${{ hashFiles('flake.lock') }}-${{ matrix.host }}
restore-keys: |
nix-eval-${{ hashFiles('flake.lock') }}-
- name: Generate closure report
run: |
./scripts/closure-report.sh \
".#nixosConfigurations.${{ matrix.host }}" \
"${{ matrix.host }}-closure-report.md"
- name: Upload report
uses: actions/upload-artifact@v7
with:
name: closure-report-${{ matrix.host }}
path: ${{ matrix.host }}-closure-report.md
- name: Print top 30
run: head -36 "${{ matrix.host }}-closure-report.md"