Skip to content

Commit 590c514

Browse files
authored
Add --fallback to all remaining nix CI commands (#2360)
1 parent ce7bbe7 commit 590c514

6 files changed

Lines changed: 11 additions & 11 deletions

File tree

.github/actions/prepare-nix/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ runs:
3636
# * https://github.com/zhaofengli/attic/issues/226
3737
# * https://github.com/zhaofengli/attic/pull/317
3838
# We use the original one first to get caching of this
39-
nix build github:TraceMachina/attic
39+
nix build --fallback github:TraceMachina/attic
4040
RUST_BACKTRACE=full RUST_LOG=debug,hyper_util=info,rustls=info ./result/bin/attic watch-store nativelink &> attic-push.log &
4141
4242
# For the cases where we don't have a cache of it, push it

.github/workflows/coverage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141

4242
- name: Generate coverage
4343
run: |
44-
nix build -L .#nativelinkCoverageForHost
44+
nix build --fallback -L .#nativelinkCoverageForHost
4545
4646
- name: Upload coverage artifact
4747
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}

.github/workflows/custom-image.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ jobs:
114114
id: upload
115115
run: |
116116
GIT_HASH=$(git rev-parse --short HEAD)
117-
nix run .#publish-ghcr ${{ needs.check-trigger.outputs.image }} "$GIT_HASH"
117+
nix run --fallback .#publish-ghcr ${{ needs.check-trigger.outputs.image }} "$GIT_HASH"
118118
119119
IMAGE_NAME=$(nix eval .#${{ needs.check-trigger.outputs.image }}.imageName --raw)
120120
echo "image_tag=ghcr.io/${{ github.repository_owner }}/${IMAGE_NAME}:${GIT_HASH}" >> $GITHUB_OUTPUT

.github/workflows/image.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ jobs:
4242

4343
- name: Test image
4444
run: |
45-
nix run .#local-image-test ${{ matrix.image }}
45+
nix run --fallback .#local-image-test ${{ matrix.image }}
4646
4747
- name: Upload image
4848
run: |
49-
nix run .#publish-ghcr ${{ matrix.image }}
49+
nix run --fallback .#publish-ghcr ${{ matrix.image }}
5050
env:
5151
GHCR_REGISTRY: ghcr.io/${{ github.repository_owner }}
5252
GHCR_USERNAME: ${{ github.actor }}

.github/workflows/nix.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109

110110
- name: Test nix run
111111
run: |
112-
nix run -L .#nativelink-is-executable-test
112+
nix run --fallback -L .#nativelink-is-executable-test
113113
114114
- name: Teardown Worker
115115
uses: ./.github/actions/end-nix
@@ -137,7 +137,7 @@ jobs:
137137

138138
- name: Test ${{ matrix.test-name }} run
139139
run: |
140-
nix run -L .#${{ matrix.test-name }}-with-nativelink-test
140+
nix run --fallback -L .#${{ matrix.test-name }}-with-nativelink-test
141141
142142
- name: Teardown Worker
143143
uses: ./.github/actions/end-nix
@@ -163,7 +163,7 @@ jobs:
163163

164164
- name: Get commands list
165165
run: |
166-
COMMANDS=$(nix run .#rbe-toolchain-with-nativelink-test list)
166+
COMMANDS=$(nix run --fallback .#rbe-toolchain-with-nativelink-test list)
167167
echo "matrix={\"command\":${COMMANDS}}" >> $GITHUB_OUTPUT
168168
id: set-matrix
169169

@@ -186,7 +186,7 @@ jobs:
186186

187187
- name: Test ${{ matrix.command }} with rbe
188188
run: |
189-
nix run -L .#rbe-toolchain-with-nativelink-test ${{ matrix.command }}
189+
nix run --fallback -L .#rbe-toolchain-with-nativelink-test ${{ matrix.command }}
190190
191191
- name: Teardown Worker
192192
uses: ./.github/actions/end-nix

.github/workflows/tagged_image.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ jobs:
3434

3535
- name: Test image
3636
run: |
37-
nix run .#local-image-test ${{ matrix.image }}
37+
nix run --fallback .#local-image-test ${{ matrix.image }}
3838
3939
- name: Upload image
4040
run: |
41-
nix run .#publish-ghcr ${{ matrix.image }} ${{github.ref_name}}
41+
nix run --fallback .#publish-ghcr ${{ matrix.image }} ${{github.ref_name}}
4242
env:
4343
GHCR_REGISTRY: ghcr.io/${{ github.repository_owner }}
4444
GHCR_USERNAME: ${{ github.actor }}

0 commit comments

Comments
 (0)