mirror of
https://github.com/DeterminateSystems/nix-installer-action.git
synced 2024-12-23 13:32:06 +01:00
Boil down CI workflow
This commit is contained in:
parent
2e10ab0fc9
commit
1ea0b9a637
1 changed files with 2 additions and 109 deletions
111
.github/workflows/ci.yml
vendored
111
.github/workflows/ci.yml
vendored
|
@ -11,49 +11,9 @@ jobs:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- run: sudo apt install fish zsh
|
- name: Install Nix
|
||||||
- uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: nix-installer-x86_64-linux
|
|
||||||
- name: Move & set executable
|
|
||||||
run: |
|
|
||||||
chmod +x ./nix-installer
|
|
||||||
mkdir install-root
|
|
||||||
cp nix-installer.sh install-root/nix-installer.sh
|
|
||||||
mv nix-installer install-root/nix-installer-x86_64-linux
|
|
||||||
- name: Initial install
|
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
local-root: install-root/
|
|
||||||
logger: pretty
|
|
||||||
log-directives: nix_installer=trace
|
|
||||||
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=trace
|
|
||||||
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: ./
|
|
||||||
with:
|
|
||||||
local-root: install-root/
|
|
||||||
logger: pretty
|
logger: pretty
|
||||||
log-directives: nix_installer=trace
|
log-directives: nix_installer=trace
|
||||||
backtrace: full
|
backtrace: full
|
||||||
|
@ -76,71 +36,15 @@ jobs:
|
||||||
run: nix-instantiate -E 'builtins.currentTime' --eval
|
run: nix-instantiate -E 'builtins.currentTime' --eval
|
||||||
if: success() || failure()
|
if: success() || failure()
|
||||||
shell: sh -l {0}
|
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=trace
|
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
run-x86_64-darwin:
|
run-x86_64-darwin:
|
||||||
name: Run x86_64 Darwin
|
name: Run x86_64 Darwin
|
||||||
runs-on: macos-12
|
runs-on: macos-12
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- run: brew install fish coreutils
|
- name: Install Nix
|
||||||
- uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: nix-installer-x86_64-darwin
|
|
||||||
- name: Move & set executable
|
|
||||||
run: |
|
|
||||||
chmod +x ./nix-installer
|
|
||||||
mkdir install-root
|
|
||||||
cp nix-installer.sh install-root/nix-installer.sh
|
|
||||||
mv nix-installer install-root/nix-installer-x86_64-darwin
|
|
||||||
- name: Initial install
|
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
local-root: install-root/
|
|
||||||
logger: pretty
|
|
||||||
log-directives: nix_installer=trace
|
|
||||||
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=trace
|
|
||||||
RUST_BACKTRACE: full
|
|
||||||
- name: Repeated install
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
local-root: install-root/
|
|
||||||
logger: pretty
|
logger: pretty
|
||||||
log-directives: nix_installer=trace
|
log-directives: nix_installer=trace
|
||||||
backtrace: full
|
backtrace: full
|
||||||
|
@ -167,15 +71,4 @@ jobs:
|
||||||
run: nix-instantiate -E 'builtins.currentTime' --eval
|
run: nix-instantiate -E 'builtins.currentTime' --eval
|
||||||
if: success() || failure()
|
if: success() || failure()
|
||||||
shell: zsh --login --interactive {0}
|
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=trace
|
|
||||||
RUST_BACKTRACE: full
|
|
||||||
|
|
Loading…
Reference in a new issue