Skip to content

Commit

Permalink
ci: test installer on aarch64-darwin (#973)
Browse files Browse the repository at this point in the history
* Test the installer on aarch64-darwin runner

* Merge in changes from main

* Adjust ordering of blocks

* Update .github/workflows/ci.yml

* Update .github/workflows/ci.yml

---------

Co-authored-by: Cole Helbling <cole.helbling@determinate.systems>
  • Loading branch information
lucperkins and cole-h committed May 24, 2024
1 parent 02fc8e2 commit 1f214d9
Showing 1 changed file with 86 additions and 0 deletions.
86 changes: 86 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:

build-aarch64-linux:
uses: ./.github/workflows/build-aarch64-linux.yml

build-aarch64-darwin:
uses: ./.github/workflows/build-aarch64-darwin.yml

lints:
name: Lints
Expand Down Expand Up @@ -462,3 +465,86 @@ jobs:
echo "/nix exists"
exit 1
fi
run-aarch64-darwin:
name: Run aarch64 Darwin
runs-on: macos-latest-xlarge
needs: [lints, build-aarch64-darwin]
permissions:
id-token: "write"
contents: "read"
steps:
- uses: actions/checkout@v3
- name: Restore Github cache artifacts
uses: actions/cache/restore@v3
with:
path: nix-installer
key: aarch64-darwin-artifacts-${{ github.sha }}
- name: Move & set executable
run: |
mkdir install-root
cp nix-installer.sh install-root/nix-installer.sh
mv ./nix-installer install-root/nix-installer-aarch64-darwin
chmod +x install-root/nix-installer-aarch64-darwin install-root/nix-installer.sh
- run: brew install fish coreutils
- name: Initial install
uses: DeterminateSystems/nix-installer-action@main
with:
flakehub: true
local-root: install-root/
logger: pretty
log-directives: nix_installer=debug
backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }}
extra-conf: |
trusted-users = root runner
- name: Initial uninstall (without a `nix run` first)
run: sudo -E /nix/nix-installer uninstall
env:
NIX_INSTALLER_NO_CONFIRM: true
NIX_INSTALLER_LOGGER: pretty
NIX_INSTALLER_LOG_DIRECTIVES: nix_installer=debug
RUST_BACKTRACE: full
- name: Repeated install
uses: DeterminateSystems/nix-installer-action@main
with:
flakehub: true
local-root: install-root/
logger: pretty
log-directives: nix_installer=debug
backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }}
extra-conf: trusted-users = root runner
- name: echo $PATH
run: echo $PATH
- name: Test `nix` with `$GITHUB_PATH`
if: success() || failure()
run: |
nix run nixpkgs#hello
nix profile install nixpkgs#hello
hello
nix store gc
nix run nixpkgs#hello
- name: Test bash
run: nix-instantiate -E 'builtins.currentTime' --eval
if: success() || failure()
shell: bash --login {0}
- name: Test sh
run: nix-instantiate -E 'builtins.currentTime' --eval
if: success() || failure()
shell: sh -l {0}
- name: Test zsh
run: nix-instantiate -E 'builtins.currentTime' --eval
if: success() || failure()
shell: zsh --login --interactive {0}
- name: Test fish
run: nix-instantiate -E 'builtins.currentTime' --eval
if: success() || failure()
shell: fish --login {0}
- name: Repeated uninstall
run: sudo -E /nix/nix-installer uninstall
env:
NIX_INSTALLER_NO_CONFIRM: true
NIX_INSTALLER_LOGGER: pretty
NIX_INSTALLER_LOG_DIRECTIVES: nix_installer=debug
RUST_BACKTRACE: full

0 comments on commit 1f214d9

Please sign in to comment.