experimental: new ci #21
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: nix ci | |
on: | |
push: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: easimon/maximize-build-space@v10 | |
with: | |
root-reserve-mb: 2048 | |
swap-size-mb: 1024 | |
remove-dotnet: 'true' | |
remove-android: 'true' | |
remove-haskell: 'true' | |
- name: we making it out of the cursed stuff with this one | |
run: | | |
sudo mkdir -p "${GITHUB_WORKSPACE}/nix" | |
sudo mkdir -p /nix | |
sudo mount --bind "${GITHUB_WORKSPACE}/nix" /nix | |
sudo mkdir /nix/var | |
ls -l / | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@v9 | |
with: | |
extra-conf: | | |
auto-optimise-store = true | |
- name: setup cachix | |
uses: cachix/cachix-action@v13 | |
with: | |
name: uku3lig | |
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
- name: how | |
run: df -h | |
- name: build | |
run: | | |
nix run --inputs-from . --override-input nixpkgs nixpkgs github:Mic92/nix-fast-build -- --no-nom --skip-cached --option accept-flake-config true --flake '.#hydraJobs' | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@v9 | |
- name: connect to tailscale | |
uses: tailscale/github-action@v2 | |
with: | |
oauth-client-id: ${{ secrets.TS_CLIENT_ID }} | |
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }} | |
tags: tag:gha | |
- name: copy known_hosts | |
run: | | |
set -eux | |
[ ! -d ~/.ssh ] && mkdir -p ~/.ssh | |
cp .known_hosts ~/.ssh/known_hosts | |
- name: deploy | |
run: nix run --inputs-from . 'nixpkgs#deploy-rs' -- -s |