Remove caching for fmt
This commit is contained in:
parent
bde005fd40
commit
26ba8ea8de
33
.github/workflows/deploy.yml
vendored
33
.github/workflows/deploy.yml
vendored
|
@ -14,7 +14,7 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Check
|
name: Formatting Check
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.3.4
|
- uses: actions/checkout@v2.3.4
|
||||||
- uses: cachix/install-nix-action@v17
|
- uses: cachix/install-nix-action@v17
|
||||||
|
@ -27,29 +27,6 @@ jobs:
|
||||||
keep-derivations = true
|
keep-derivations = true
|
||||||
# Enable flakes
|
# Enable flakes
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
- uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
key: nki-nix-${{ github.sha }}
|
|
||||||
restore-keys: |
|
|
||||||
nki-nix-
|
|
||||||
path: |
|
|
||||||
nix_store_dir
|
|
||||||
nix_store_db.sqlite
|
|
||||||
- name: restore cached nix store
|
|
||||||
run: |
|
|
||||||
if [ -e nix_store_db.sqlite ]; then
|
|
||||||
sudo systemctl stop nix-daemon
|
|
||||||
# put cached store paths back in their proper locations
|
|
||||||
sudo rm -rf /nix/store /nix/var/nix/db/db.sqlite
|
|
||||||
sudo mv nix_store_dir /nix/store
|
|
||||||
sudo cp nix_store_db.sqlite /nix/var/nix/db/db.sqlite
|
|
||||||
# fix store permissions
|
|
||||||
sudo chmod 1775 /nix/store
|
|
||||||
sudo chown root:nixbld /nix/store
|
|
||||||
sudo chmod 0644 /nix/var/nix/db/db.sqlite
|
|
||||||
sudo chown -R root:root /nix/store /nix/var/nix/db/db.sqlite
|
|
||||||
sudo systemctl start nix-daemon
|
|
||||||
fi
|
|
||||||
- name: Run format check
|
- name: Run format check
|
||||||
run: |
|
run: |
|
||||||
nix fmt
|
nix fmt
|
||||||
|
@ -60,14 +37,6 @@ jobs:
|
||||||
git status
|
git status
|
||||||
false
|
false
|
||||||
fi
|
fi
|
||||||
- name: prepare nix store for caching
|
|
||||||
run: |
|
|
||||||
# delete old stuff not relevant to this build
|
|
||||||
nix store gc
|
|
||||||
sudo systemctl stop nix-daemon
|
|
||||||
# move store to a place where the cache action can read it
|
|
||||||
sudo mv /nix/store nix_store_dir
|
|
||||||
sudo mv /nix/var/nix/db/db.sqlite nix_store_db.sqlite
|
|
||||||
deploy:
|
deploy:
|
||||||
if: "github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'Deploy')"
|
if: "github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'Deploy')"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
Loading…
Reference in a new issue