Skip to content

Commit

Permalink
Fixup release test matrix re: dnixd (#1186)
Browse files Browse the repository at this point in the history
* Trivial flakehub: true -> determinate: true

* Assert dnixd's presence or absence

* ...

* Fixup: flakehub: true implies determinate: true, so make the test suites pass determinate in the matrix instead of extra args

* drop the github-token setting

* Drop the trusted-user extra-conf

* Sort the installer config

* Correct the name to match the existing merge rules
  • Loading branch information
grahamc authored Sep 20, 2024
1 parent 0428dcb commit 8347214
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 77 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-aarch64-darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
with:
flakehub: true
determinate: true
- uses: DeterminateSystems/magic-nix-cache-action@main
with:
use-gha-cache: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-aarch64-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
with:
flakehub: true
determinate: true
- uses: DeterminateSystems/magic-nix-cache-action@main
with:
use-gha-cache: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-x86_64-darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
with:
flakehub: true
determinate: true
- uses: DeterminateSystems/magic-nix-cache-action@main
with:
use-gha-cache: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-x86_64-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
with:
flakehub: true
determinate: true
- uses: DeterminateSystems/magic-nix-cache-action@main
with:
use-gha-cache: false
Expand Down
163 changes: 91 additions & 72 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
with:
flakehub: true
determinate: true
- uses: DeterminateSystems/magic-nix-cache-action@main
with:
use-gha-cache: false
Expand All @@ -57,12 +57,12 @@ jobs:
run: nix develop --command shellcheck ./nix-installer.sh

run-x86_64-linux:
name: Run x86_64 Linux
name: Run x86_64 Linux${{ matrix.determinate && ' (--determinate)' || ''}}
runs-on: UbuntuLatest32Cores128G
needs: [lints, build-x86_64-linux]
strategy:
matrix:
extra-args: ["--determinate", ""]
determinate: [true, false]
permissions:
id-token: "write"
contents: "read"
Expand All @@ -83,13 +83,20 @@ jobs:
- name: Initial install
uses: DeterminateSystems/nix-installer-action@main
with:
flakehub: true
extra-args: ${{ matrix.extra-args }}
backtrace: full
determinate: ${{ matrix.determinate }}
local-root: install-root/
logger: pretty
log-directives: nix_installer=debug
backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }}
logger: pretty
- name: "Validate dnixd is ${{ matrix.determinate && 'installed' || 'uninstalled' }}"
run: |
if test -x /usr/local/bin/determinate-nixd; then
echo "determinate-nixd is present"
${{ matrix.determinate }}
else
echo "determinate-nixd is not present"
${{ !matrix.determinate }}
fi
- name: Initial uninstall (without a `nix run` first)
run: sudo -E /nix/nix-installer uninstall
env:
Expand All @@ -114,13 +121,11 @@ jobs:
- name: Repeated install
uses: DeterminateSystems/nix-installer-action@main
with:
flakehub: true
extra-args: ${{ matrix.extra-args }}
backtrace: full
determinate: ${{ matrix.determinate }}
local-root: install-root/
logger: pretty
log-directives: nix_installer=debug
backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }}
logger: pretty
- name: echo $PATH
run: echo $PATH
- name: Test `nix` with `$GITHUB_PATH`
Expand Down Expand Up @@ -170,12 +175,12 @@ jobs:
fi
run-x86_64-linux-no-init:
name: Run x86_64 Linux (No init)
name: Run x86_64 Linux (No init${{ matrix.determinate && ', --determinate' || ''}})
runs-on: UbuntuLatest32Cores128G
needs: [lints, build-x86_64-linux]
strategy:
matrix:
extra-args: ["--determinate", ""]
determinate: [true, false]
permissions:
id-token: "write"
contents: "read"
Expand All @@ -196,15 +201,22 @@ jobs:
- name: Initial install
uses: DeterminateSystems/nix-installer-action@main
with:
flakehub: true
backtrace: full
determinate: ${{ matrix.determinate }}
init: none
extra-args: ${{ matrix.extra-args }}
planner: linux
local-root: install-root/
logger: pretty
log-directives: nix_installer=debug
backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }}
logger: pretty
planner: linux
- name: "Validate dnixd is ${{ matrix.determinate && 'installed' || 'uninstalled' }}"
run: |
if test -x /usr/local/bin/determinate-nixd; then
echo "determinate-nixd is present"
${{ matrix.determinate }}
else
echo "determinate-nixd is not present"
${{ !matrix.determinate }}
fi
- name: Ensure daemon was not configured with init
run: |
if systemctl is-active nix-daemon.socket; then
Expand All @@ -231,15 +243,13 @@ jobs:
- name: Repeated install
uses: DeterminateSystems/nix-installer-action@main
with:
flakehub: true
backtrace: full
determinate: ${{ matrix.determinate }}
init: none
planner: linux
extra-args: ${{ matrix.extra-args }}
local-root: install-root/
logger: pretty
log-directives: nix_installer=debug
backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }}
logger: pretty
planner: linux
- name: echo $PATH
run: echo $PATH
- name: Test `nix` with `$GITHUB_PATH`
Expand Down Expand Up @@ -289,12 +299,12 @@ jobs:
fi
run-x86_64-darwin:
name: Run x86_64 Darwin
name: Run x86_64 Darwin${{ matrix.determinate && ' (--determinate)' || ''}}
runs-on: macos-13
needs: [lints, build-x86_64-darwin]
strategy:
matrix:
extra-args: ["--determinate", ""]
determinate: [true, false]
permissions:
id-token: "write"
contents: "read"
Expand All @@ -315,15 +325,20 @@ jobs:
- name: Initial install
uses: DeterminateSystems/nix-installer-action@main
with:
flakehub: true
extra-args: ${{ matrix.extra-args }}
backtrace: full
determinate: ${{ matrix.determinate }}
local-root: install-root/
logger: pretty
log-directives: nix_installer=debug
backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }}
extra-conf: |
trusted-users = root runner
logger: pretty
- name: "Validate dnixd is ${{ matrix.determinate && 'installed' || 'uninstalled' }}"
run: |
if test -x /usr/local/bin/determinate-nixd; then
echo "determinate-nixd is present"
${{ matrix.determinate }}
else
echo "determinate-nixd is not present"
${{ !matrix.determinate }}
fi
- name: Initial uninstall (without a `nix run` first)
run: sudo -E /nix/nix-installer uninstall
env:
Expand All @@ -334,14 +349,11 @@ jobs:
- name: Repeated install
uses: DeterminateSystems/nix-installer-action@main
with:
flakehub: true
extra-args: ${{ matrix.extra-args }}
backtrace: full
determinate: ${{ matrix.determinate }}
local-root: install-root/
logger: pretty
log-directives: nix_installer=debug
backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }}
extra-conf: trusted-users = root runner
logger: pretty
- name: echo $PATH
run: echo $PATH
- name: Test `nix` with `$GITHUB_PATH`
Expand Down Expand Up @@ -377,12 +389,12 @@ jobs:
RUST_BACKTRACE: full

run-aarch64-linux:
name: Run aarch64 Linux
name: Run aarch64 Linux${{ matrix.determinate && ' (--determinate)' || ''}}
runs-on: namespace-profile-default-arm64
needs: [lints, build-aarch64-linux]
strategy:
matrix:
extra-args: ["--determinate", ""]
determinate: [true, false]
permissions:
id-token: "write"
contents: "read"
Expand All @@ -403,13 +415,20 @@ jobs:
- name: Initial install
uses: DeterminateSystems/nix-installer-action@main
with:
flakehub: true
backtrace: full
determinate: ${{ matrix.determinate }}
local-root: install-root/
extra-args: ${{ matrix.extra-args }}
logger: pretty
log-directives: nix_installer=debug
backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }}
logger: pretty
- name: "Validate dnixd is ${{ matrix.determinate && 'installed' || 'uninstalled' }}"
run: |
if test -x /usr/local/bin/determinate-nixd; then
echo "determinate-nixd is present"
${{ matrix.determinate }}
else
echo "determinate-nixd is not present"
${{ !matrix.determinate }}
fi
- name: Initial uninstall (without a `nix run` first)
run: sudo -E /nix/nix-installer uninstall
env:
Expand All @@ -434,13 +453,11 @@ jobs:
- name: Repeated install
uses: DeterminateSystems/nix-installer-action@main
with:
flakehub: true
backtrace: full
determinate: ${{ matrix.determinate }}
local-root: install-root/
logger: pretty
extra-args: ${{ matrix.extra-args }}
log-directives: nix_installer=debug
backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }}
logger: pretty
- name: echo $PATH
run: echo $PATH
- name: Test `nix` with `$GITHUB_PATH`
Expand Down Expand Up @@ -490,12 +507,12 @@ jobs:
fi
run-aarch64-darwin:
name: Run aarch64 Darwin
name: Run aarch64 Darwin${{ matrix.determinate && ' (--determinate)' || ''}}
runs-on: macos-latest-xlarge
needs: [lints, build-aarch64-darwin]
strategy:
matrix:
extra-args: ["--determinate", ""]
determinate: [true, false]
permissions:
id-token: "write"
contents: "read"
Expand All @@ -516,15 +533,20 @@ jobs:
- name: Initial install
uses: DeterminateSystems/nix-installer-action@main
with:
flakehub: true
backtrace: full
determinate: ${{ matrix.determinate }}
local-root: install-root/
extra-args: ${{ matrix.extra-args }}
logger: pretty
log-directives: nix_installer=debug
backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }}
extra-conf: |
trusted-users = root runner
logger: pretty
- name: "Validate dnixd is ${{ matrix.determinate && 'installed' || 'uninstalled' }}"
run: |
if test -x /usr/local/bin/determinate-nixd; then
echo "determinate-nixd is present"
${{ matrix.determinate }}
else
echo "determinate-nixd is not present"
${{ !matrix.determinate }}
fi
- name: Initial uninstall (without a `nix run` first)
run: sudo -E /nix/nix-installer uninstall
env:
Expand All @@ -535,14 +557,11 @@ jobs:
- name: Repeated install
uses: DeterminateSystems/nix-installer-action@main
with:
flakehub: true
backtrace: full
determinate: ${{ matrix.determinate }}
local-root: install-root/
extra-args: ${{ matrix.extra-args }}
logger: pretty
log-directives: nix_installer=debug
backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }}
extra-conf: trusted-users = root runner
logger: pretty
- name: echo $PATH
run: echo $PATH
- name: Test `nix` with `$GITHUB_PATH`
Expand Down Expand Up @@ -603,11 +622,11 @@ jobs:
- name: Initial install
uses: DeterminateSystems/nix-installer-action@main
with:
flakehub: true
backtrace: full
determinate: true
local-root: install-root/
logger: pretty
log-directives: nix_installer=debug
backtrace: full
logger: pretty
- uses: DeterminateSystems/magic-nix-cache-action@main
with:
use-gha-cache: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
with:
flakehub: true
determinate: true
- name: Enable Magic Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@main
with:
Expand Down

0 comments on commit 8347214

Please sign in to comment.