Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test installer on aarch64-linux runner #972

Merged
merged 6 commits into from
May 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 114 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
build-x86_64-darwin:
uses: ./.github/workflows/build-x86_64-darwin.yml

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

lints:
name: Lints
runs-on: ubuntu-latest
Expand Down Expand Up @@ -56,7 +59,7 @@ jobs:
contents: "read"
steps:
- uses: actions/checkout@v3
- name: Restore Github cache of Buildkite artifacts
- name: Restore Github cache artifacts
uses: actions/cache/restore@v3
with:
path: nix-installer
Expand Down Expand Up @@ -164,7 +167,7 @@ jobs:
contents: "read"
steps:
- uses: actions/checkout@v3
- name: Restore Github cache of Buildkite artifacts
- name: Restore Github cache artifacts
uses: actions/cache/restore@v3
with:
path: nix-installer
Expand Down Expand Up @@ -278,7 +281,7 @@ jobs:
contents: "read"
steps:
- uses: actions/checkout@v3
- name: Restore Github cache of Buildkite artifacts
- name: Restore Github cache artifacts
uses: actions/cache/restore@v3
with:
path: nix-installer
Expand Down Expand Up @@ -351,3 +354,111 @@ jobs:
NIX_INSTALLER_LOGGER: pretty
NIX_INSTALLER_LOG_DIRECTIVES: nix_installer=debug
RUST_BACKTRACE: full

run-aarch64-linux:
name: Run aarch64 Linux
runs-on: namespace-profile-default-arm64
needs: [lints, build-aarch64-linux]
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-linux-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-linux
chmod +x install-root/nix-installer-aarch64-linux install-root/nix-installer.sh
- run: sudo apt install -y fish zsh
- 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 }}
- 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: Ensure `nix` is removed
run: |
if systemctl is-active nix-daemon.socket; then
echo "nix-daemon.socket was still running"
exit 1
fi
if systemctl is-active nix-daemon.service; then
echo "nix-daemon.service was still running"
exit 1
fi
if [ -e /nix ]; then
echo "/nix exists"
exit 1
fi
- 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 }}
- 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
- name: Ensure `nix` is removed
run: |
if systemctl is-active nix-daemon.socket; then
echo "nix-daemon.socket was still running"
exit 1
fi
if systemctl is-active nix-daemon.service; then
echo "nix-daemon.service was still running"
exit 1
fi
if [ -e /nix ]; then
echo "/nix exists"
exit 1
fi
Loading