7
7
branches : [ "ci", "main" ]
8
8
9
9
jobs :
10
+ build :
11
+ runs-on : ubuntu-latest
12
+ continue-on-error : true
13
+ strategy :
14
+ fail-fast : false
15
+ matrix :
16
+ system : [ x86_64-linux, aarch64-linux ]
17
+
18
+ steps :
19
+
20
+ - uses : actions/checkout@v4
21
+ with :
22
+ # Nix Flakes doesn't work on shallow clones
23
+ fetch-depth : 0
24
+
25
+ - uses : cachix/install-nix-action@V27
26
+ with :
27
+ extra_nix_config : |
28
+ experimental-features = nix-command flakes
29
+ extra-platforms = ${{ matrix.system }}
30
+
31
+ - uses : cachix/cachix-action@v14
32
+ with :
33
+ name : nix-portable
34
+ authToken : ' ${{ secrets.CACHIX_AUTH_TOKEN }}'
35
+
36
+ - name : Set up QEMU
37
+ uses : docker/setup-qemu-action@v2
38
+ with :
39
+ image : tonistiigi/binfmt@sha256:8de6f2decb92e9001d094534bf8a92880c175bd5dfb4a9d8579f26f09821cfa2
40
+ platforms : all
41
+
42
+ - run : ' nix build -L .#packages.${{ matrix.system }}.nix-portable'
43
+
44
+ - name : Archive result
45
+ uses : actions/upload-artifact@v4
46
+ with :
47
+ name : nix-portable-${{ matrix.system }}
48
+ path : result/bin/nix-portable
10
49
11
50
nix-matrix :
12
51
runs-on : ubuntu-latest
24
63
25
64
nix-build :
26
65
name : ${{ matrix.name }} (${{ matrix.system }})
27
- needs : nix-matrix
66
+ needs :
67
+ - nix-matrix
68
+ - build
28
69
runs-on : ${{ matrix.os }}
29
70
strategy :
30
71
matrix : ${{fromJSON(needs.nix-matrix.outputs.matrix)}}
@@ -34,142 +75,19 @@ jobs:
34
75
with :
35
76
extra_nix_config : |
36
77
experimental-features = nix-command flakes impure-derivations ca-derivations
78
+ extra-platforms = aarch64-linux
79
+ - uses : cachix/cachix-action@v14
80
+ with :
81
+ name : nix-portable
82
+ authToken : ' ${{ secrets.CACHIX_AUTH_TOKEN }}'
83
+ - name : Set up QEMU
84
+ uses : docker/setup-qemu-action@v2
85
+ with :
86
+ image : tonistiigi/binfmt@sha256:8de6f2decb92e9001d094534bf8a92880c175bd5dfb4a9d8579f26f09821cfa2
87
+ platforms : all
37
88
- run : nix build -L '.#${{ matrix.attr }}'
38
89
39
90
40
- # build:
41
- # runs-on: ubuntu-latest
42
- # continue-on-error: true
43
- # strategy:
44
- # fail-fast: false
45
- # matrix:
46
- # system: [ x86_64-linux, aarch64-linux ]
47
-
48
- # steps:
49
-
50
- # - uses: actions/checkout@v4
51
- # with:
52
- # # Nix Flakes doesn't work on shallow clones
53
- # fetch-depth: 0
54
-
55
- # - uses: cachix/install-nix-action@V27
56
- # with:
57
- # extra_nix_config: |
58
- # experimental-features = nix-command flakes
59
- # extra-platforms = ${{ matrix.system }}
60
-
61
- # - uses: cachix/cachix-action@v14
62
- # with:
63
- # name: nix-portable
64
- # authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
65
-
66
- # - name: Set up QEMU
67
- # uses: docker/setup-qemu-action@v2
68
- # with:
69
- # image: tonistiigi/binfmt@sha256:8de6f2decb92e9001d094534bf8a92880c175bd5dfb4a9d8579f26f09821cfa2
70
- # platforms: all
71
-
72
- # - name: Install binfmt support
73
- # run: sudo apt-get install -y
74
-
75
- # - run: 'nix build -L .#defaultPackage.${{ matrix.system }}'
76
-
77
- # - name: Archive result
78
- # uses: actions/upload-artifact@v4
79
- # with:
80
- # name: nix-portable-${{ matrix.system }}
81
- # path: result/bin/nix-portable
82
-
83
- # test_qemu_x86_64:
84
- # name: Test via qemu x86_64-linux
85
- # needs: build
86
- # if: true
87
- # runs-on: ubuntu-latest
88
- # continue-on-error: true
89
- # strategy:
90
- # fail-fast: false
91
- # matrix:
92
- # qemu_os: [ arch, centos7, debian, nixos, ubuntu_22_04, ubuntu_23_10, ubuntu_24_04 ]
93
- # steps:
94
-
95
- # - uses: actions/checkout@v4
96
- # with:
97
- # # Nix Flakes doesn't work on shallow clones
98
- # fetch-depth: 0
99
-
100
- # - uses: cachix/install-nix-action@V27
101
- # with:
102
- # extra_nix_config: |
103
- # experimental-features = nix-command flakes
104
- # extra-platforms = ${{ matrix.system }}
105
-
106
- # - uses: cachix/cachix-action@v14
107
- # with:
108
- # name: nix-portable
109
- # authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
110
-
111
- # - run: 'nix run -L .#job-qemu-${{ matrix.qemu_os }}'
112
-
113
- # test_qemu_aarch64:
114
- # name: Test via qemu aarch64-linux
115
- # needs: build
116
- # if: true
117
- # runs-on: ubuntu-24.04-arm
118
- # continue-on-error: true
119
- # strategy:
120
- # fail-fast: false
121
- # matrix:
122
- # qemu_os: [ debian-aarch64 ]
123
- # steps:
124
-
125
- # - uses: actions/checkout@v4
126
- # with:
127
- # # Nix Flakes doesn't work on shallow clones
128
- # fetch-depth: 0
129
-
130
- # - uses: cachix/install-nix-action@V27
131
- # with:
132
- # extra_nix_config: |
133
- # experimental-features = nix-command flakes
134
- # extra-platforms = ${{ matrix.system }}
135
-
136
- # - uses: cachix/cachix-action@v14
137
- # with:
138
- # name: nix-portable
139
- # authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
140
-
141
- # - run: 'nix run -L .#job-qemu-${{ matrix.qemu_os }}'
142
-
143
- # test_nix-static:
144
- # name: Test nix-static via qemu
145
- # needs: build
146
- # if: true
147
- # runs-on: ubuntu-latest
148
- # continue-on-error: true
149
- # strategy:
150
- # fail-fast: false
151
- # matrix:
152
- # qemu_os: [ arch, centos7, debian, nixos, ubuntu, debian-aarch64 ]
153
- # steps:
154
-
155
- # - uses: actions/checkout@v4
156
- # with:
157
- # # Nix Flakes doesn't work on shallow clones
158
- # fetch-depth: 0
159
-
160
- # - uses: cachix/install-nix-action@V27
161
- # with:
162
- # extra_nix_config: |
163
- # experimental-features = nix-command flakes
164
- # extra-platforms = ${{ matrix.system }}
165
-
166
- # - uses: cachix/cachix-action@v14
167
- # with:
168
- # name: nix-portable
169
- # authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
170
-
171
- # - run: 'nix run -L .#job-qemu-${{ matrix.qemu_os }}-nix-static'
172
-
173
91
test_github :
174
92
name : Test inside github action
175
93
needs : nix-build
0 commit comments