-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from ok-nick/ci
add CI checking flake
- Loading branch information
Showing
10 changed files
with
93 additions
and
21 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: check | ||
on: | ||
workflow_dispatch: | ||
push: | ||
paths: | ||
- "src/**/*.nix" | ||
- "flake.lock" | ||
- "flake.nix" | ||
- ".sops.yml" | ||
- ".github/workflows/build.yml" | ||
pull_request: | ||
paths: | ||
- "src/**/*.nix" | ||
- "flake.lock" | ||
- "flake.nix" | ||
- ".sops.yml" | ||
- ".github/workflows/build.yml" | ||
|
||
jobs: | ||
check: | ||
strategy: | ||
# always run all platforms disregarding failure | ||
fail-fast: false | ||
matrix: | ||
# macos-14 is aarch64-darwin (silicone) | ||
os: [ubuntu-latest, macos-14] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# install nix | ||
- uses: DeterminateSystems/nix-installer-action@main | ||
# cache packages | ||
- uses: DeterminateSystems/magic-nix-cache-action@main | ||
# info on flake dependencies | ||
- uses: DeterminateSystems/flake-checker-action@main | ||
env: | ||
FLAKE_CHECKER_NO_TELEMETRY: true | ||
# validate all outputs | ||
- name: Validate flake outputs | ||
# Building uses too much storage (more than available on GitHub runners) and passing --not-build | ||
# causes a lot of errors. So, for now comment out the home-manager derivations in the flake checks | ||
# and only test system configs. Not sure what else can be done besides somehow fixing all the | ||
# upstream errors caused by packages when passing --no-build. | ||
run: nix flake check --show-trace |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: update | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 0 * * 0" # Sunday at midnight | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# install nix | ||
- uses: DeterminateSystems/nix-installer-action@main | ||
# cache packages | ||
- uses: DeterminateSystems/magic-nix-cache-action@main | ||
# info on flake dependencies beforehand | ||
- uses: DeterminateSystems/flake-checker-action@main | ||
env: | ||
FLAKE_CHECKER_NO_TELEMETRY: true | ||
# TODO: run `nix flake check` on all platforms and if it works after update, submit PR | ||
# update flake and send PR | ||
- uses: DeterminateSystems/update-flake-lock@main | ||
with: | ||
pr-title: "Update flake.lock" | ||
pr-labels: bot | ||
# https://github.com/DeterminateSystems/update-flake-lock?tab=readme-ov-file#with-a-personal-authentication-token | ||
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
{ | ||
imports = [./common]; | ||
} |
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
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
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
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
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