File tree Expand file tree Collapse file tree 2 files changed +37
-10
lines changed Expand file tree Collapse file tree 2 files changed +37
-10
lines changed Original file line number Diff line number Diff line change @@ -78,12 +78,48 @@ jobs:
78
78
--yes \
79
79
--cleanup-tag
80
80
81
+ cachix :
82
+ name : ' Publish to Cachix'
83
+ strategy :
84
+ fail-fast : false
85
+ matrix :
86
+ include :
87
+ - runner : [self-hosted, linux, normal]
88
+ os : ubuntu-24.04
89
+ - runner : MacM1
90
+ os : self-macos-12
91
+
92
+ runs-on : ${{ matrix.runner }}
93
+ steps :
94
+ - name : ' Check out code'
95
+ uses : actions/checkout@v4
96
+
97
+ - name : ' Install Nix'
98
+ if : ${{ !startsWith(matrix.os, 'self') }}
99
+ uses : cachix/install-nix-action@v22
100
+ with :
101
+ install_url : https://releases.nixos.org/nix/nix-2.13.3/install
102
+ extra_nix_config : |
103
+ access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
104
+
105
+ - name : ' Install Cachix'
106
+ uses : cachix/cachix-action@v12
107
+ with :
108
+ name : k-framework
109
+ authToken : ' ${{ secrets.CACHIX_PUBLIC_TOKEN }}'
110
+ skipPush : true
111
+
112
+ - name : ' Push Flake to Cachix'
113
+ run : |
114
+ GC_DONT_GC=1 nix build --print-build-logs . --json \
115
+ | jq -r '.[].outputs | to_entries[].value' \
116
+ | cachix push k-framework
81
117
82
118
release :
83
119
name : ' Publish Release'
84
120
runs-on : ubuntu-latest
85
121
environment : production
86
- needs : build-ubuntu-package
122
+ needs : [ build-ubuntu-package, cachix]
87
123
steps :
88
124
- name : ' Check out code'
89
125
uses : actions/checkout@v4
Original file line number Diff line number Diff line change @@ -32,14 +32,11 @@ jobs:
32
32
uses : cachix/install-nix-action@v22
33
33
with :
34
34
install_url : https://releases.nixos.org/nix/nix-2.13.3/install
35
- extra_nix_config : |
36
- access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
37
35
38
36
- name : ' Install Cachix'
39
37
uses : cachix/cachix-action@v12
40
38
with :
41
39
name : k-framework
42
- authToken : ' ${{ secrets.CACHIX_PUBLIC_TOKEN }}'
43
40
skipPush : true
44
41
45
42
- name : ' Build LLVM backend'
51
48
- name : ' Test LLVM backend'
52
49
run : GC_DONT_GC=1 nix flake check --print-build-logs
53
50
54
- - name : ' Push Flake to Cachix'
55
- run : |
56
- GC_DONT_GC=1 nix build --print-build-logs . --json \
57
- | jq -r '.[].outputs | to_entries[].value' \
58
- | cachix push k-framework
59
-
60
51
build-from-source :
61
52
name : ' Build LLVM backend from source'
62
53
runs-on : [self-hosted, linux, normal]
You can’t perform that action at this time.
0 commit comments