Skip to content

Commit

Permalink
Disable steam deck
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoverbear committed Jul 13, 2023
1 parent b49a4df commit 33ae791
Showing 1 changed file with 127 additions and 126 deletions.
253 changes: 127 additions & 126 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-mode: true
check-outdated: false # PRs shouldn't fail because main's nixpkgs is out of date
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
uses: DeterminateSystems/nix-installer-action@hoverbear/ds-893-make-installer-action-use-typescript
- uses: DeterminateSystems/magic-nix-cache-action@v1
- name: Check rustfmt
run: nix develop --command check-rustfmt
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
mv ./artifacts/nix-installer-x86_64-linux-*/* install-root/nix-installer-x86_64-linux
chmod +x install-root/nix-installer-x86_64-linux install-root/nix-installer.sh
- name: Initial install
uses: DeterminateSystems/nix-installer-action@main
uses: DeterminateSystems/nix-installer-action@hoverbear/ds-893-make-installer-action-use-typescript
with:
local-root: install-root/
logger: pretty
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
exit 1
fi
- name: Repeated install
uses: DeterminateSystems/nix-installer-action@main
uses: DeterminateSystems/nix-installer-action@hoverbear/ds-893-make-installer-action-use-typescript
with:
local-root: install-root/
logger: pretty
Expand Down Expand Up @@ -168,7 +168,7 @@ jobs:
mv ./artifacts/nix-installer-x86_64-linux-*/* install-root/nix-installer-x86_64-linux
chmod +x install-root/nix-installer-x86_64-linux install-root/nix-installer.sh
- name: Initial install
uses: DeterminateSystems/nix-installer-action@main
uses: DeterminateSystems/nix-installer-action@hoverbear/ds-893-make-installer-action-use-typescript
with:
init: none
planner: linux
Expand Down Expand Up @@ -201,7 +201,7 @@ jobs:
exit 1
fi
- name: Repeated install
uses: DeterminateSystems/nix-installer-action@main
uses: DeterminateSystems/nix-installer-action@hoverbear/ds-893-make-installer-action-use-typescript
with:
init: none
planner: linux
Expand Down Expand Up @@ -258,125 +258,126 @@ jobs:
exit 1
fi
run-steam-deck:
name: Run Steam Deck (mock)
runs-on: ubuntu-22.04
needs: [lints]
steps:
- uses: actions/checkout@v3
- name: Restore Github cache of Buildkite artifacts
id: cache-buildkite-artifacts
uses: actions/cache/restore@v3
with:
path: artifacts
key: buildkite-artifacts-${{ github.sha }}
- run: sudo apt install fish zsh
- name: Move & set executable
run: |
mkdir install-root
cp nix-installer.sh install-root/nix-installer.sh
mv ./artifacts/nix-installer-x86_64-linux-*/* install-root/nix-installer-x86_64-linux
chmod +x install-root/nix-installer-x86_64-linux install-root/nix-installer.sh
- name: Make the CI look like a steam deck
run: |
mkdir -p ~/bin
echo -e "#! /bin/sh\nexit 0" | sudo tee -a /bin/steamos-readonly
sudo chmod +x /bin/steamos-readonly
sudo useradd -m deck
- name: Initial install
uses: DeterminateSystems/nix-installer-action@main
with:
local-root: install-root/
logger: pretty
log-directives: nix_installer=debug
backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }}
planner: steam-deck
- 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
if [ -e /home/runner/.ci-test-nix-home ]; then
echo "/home/runner/.ci-test-nix-home exists"
exit 1
fi
- name: Repeated install
uses: DeterminateSystems/nix-installer-action@main
with:
local-root: install-root/
logger: pretty
log-directives: nix_installer=debug
backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }}
planner: steam-deck
- 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
if [ -e /home/runner/.ci-test-nix-home ]; then
echo "/home/runner/.ci-test-nix-home exists"
exit 1
fi
# https://github.com/DeterminateSystems/nix-installer/issues/566
# run-steam-deck:
# name: Run Steam Deck (mock)
# runs-on: ubuntu-22.04
# needs: [lints]
# steps:
# - uses: actions/checkout@v3
# - name: Restore Github cache of Buildkite artifacts
# id: cache-buildkite-artifacts
# uses: actions/cache/restore@v3
# with:
# path: artifacts
# key: buildkite-artifacts-${{ github.sha }}
# - run: sudo apt install fish zsh
# - name: Move & set executable
# run: |
# mkdir install-root
# cp nix-installer.sh install-root/nix-installer.sh
# mv ./artifacts/nix-installer-x86_64-linux-*/* install-root/nix-installer-x86_64-linux
# chmod +x install-root/nix-installer-x86_64-linux install-root/nix-installer.sh
# - name: Make the CI look like a steam deck
# run: |
# mkdir -p ~/bin
# echo -e "#! /bin/sh\nexit 0" | sudo tee -a /bin/steamos-readonly
# sudo chmod +x /bin/steamos-readonly
# sudo useradd -m deck
# - name: Initial install
# uses: DeterminateSystems/nix-installer-action@main
# with:
# local-root: install-root/
# logger: pretty
# log-directives: nix_installer=debug
# backtrace: full
# github-token: ${{ secrets.GITHUB_TOKEN }}
# planner: steam-deck
# - 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
# if [ -e /home/runner/.ci-test-nix-home ]; then
# echo "/home/runner/.ci-test-nix-home exists"
# exit 1
# fi
# - name: Repeated install
# uses: DeterminateSystems/nix-installer-action@main
# with:
# local-root: install-root/
# logger: pretty
# log-directives: nix_installer=debug
# backtrace: full
# github-token: ${{ secrets.GITHUB_TOKEN }}
# planner: steam-deck
# - 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
# if [ -e /home/runner/.ci-test-nix-home ]; then
# echo "/home/runner/.ci-test-nix-home exists"
# exit 1
# fi

run-x86_64-darwin:
name: Run x86_64 Darwin
Expand All @@ -398,7 +399,7 @@ jobs:
mv ./artifacts/nix-installer-x86_64-darwin-*/* install-root/nix-installer-x86_64-darwin
chmod +x install-root/nix-installer-x86_64-darwin install-root/nix-installer.sh
- name: Initial install
uses: DeterminateSystems/nix-installer-action@main
uses: DeterminateSystems/nix-installer-action@hoverbear/ds-893-make-installer-action-use-typescript
with:
local-root: install-root/
logger: pretty
Expand All @@ -415,7 +416,7 @@ jobs:
NIX_INSTALLER_LOG_DIRECTIVES: nix_installer=debug
RUST_BACKTRACE: full
- name: Repeated install
uses: DeterminateSystems/nix-installer-action@main
uses: DeterminateSystems/nix-installer-action@hoverbear/ds-893-make-installer-action-use-typescript
with:
local-root: install-root/
logger: pretty
Expand Down

0 comments on commit 33ae791

Please sign in to comment.