mirror of
https://github.com/juanfont/headscale.git
synced 2025-09-16 17:50:44 +02:00
Cache the Nix env, speed up builds
This commit is contained in:
parent
747d64cdae
commit
9ead2bf5fa
19
.github/workflows/build.yml
vendored
19
.github/workflows/build.yml
vendored
@ -28,9 +28,28 @@ jobs:
|
|||||||
integration_test/
|
integration_test/
|
||||||
config-example.yaml
|
config-example.yaml
|
||||||
|
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cache/go-build
|
||||||
|
~/go/pkg/mod
|
||||||
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-go-
|
||||||
|
|
||||||
- uses: cachix/install-nix-action@v16
|
- uses: cachix/install-nix-action@v16
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
|
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
/nix
|
||||||
|
key: ${{ runner.os }}-nix-${{ hashFiles('**/flake.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-nix-
|
||||||
|
|
||||||
- name: Run build
|
- name: Run build
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
run: nix build
|
run: nix build
|
||||||
|
19
.github/workflows/test-integration.yml
vendored
19
.github/workflows/test-integration.yml
vendored
@ -22,9 +22,28 @@ jobs:
|
|||||||
integration_test/
|
integration_test/
|
||||||
config-example.yaml
|
config-example.yaml
|
||||||
|
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cache/go-build
|
||||||
|
~/go/pkg/mod
|
||||||
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-go-
|
||||||
|
|
||||||
- uses: cachix/install-nix-action@v16
|
- uses: cachix/install-nix-action@v16
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
|
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
/nix
|
||||||
|
key: ${{ runner.os }}-nix-${{ hashFiles('**/flake.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-nix-
|
||||||
|
|
||||||
- name: Run Integration tests
|
- name: Run Integration tests
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
run: nix develop --command -- make test_integration
|
run: nix develop --command -- make test_integration
|
||||||
|
19
.github/workflows/test.yml
vendored
19
.github/workflows/test.yml
vendored
@ -22,9 +22,28 @@ jobs:
|
|||||||
integration_test/
|
integration_test/
|
||||||
config-example.yaml
|
config-example.yaml
|
||||||
|
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cache/go-build
|
||||||
|
~/go/pkg/mod
|
||||||
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-go-
|
||||||
|
|
||||||
- uses: cachix/install-nix-action@v16
|
- uses: cachix/install-nix-action@v16
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
|
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
/nix
|
||||||
|
key: ${{ runner.os }}-nix-${{ hashFiles('**/flake.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-nix-
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
run: nix develop --check
|
run: nix develop --check
|
||||||
|
Loading…
Reference in New Issue
Block a user