-
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.
* feat(workflows): setup ci with nix * fix(workflows)
- Loading branch information
1 parent
2fdd35d
commit b3dbb52
Showing
7 changed files
with
93 additions
and
49 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,60 @@ | ||
name: Test flake | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
check: | ||
env: | ||
CACHIX_AUTH_TOKEN: '${{ secrets.CACHIX_AUTH_TOKEN }}' | ||
CACHIX_BINARY_CACHE: altf4llc-os | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: DeterminateSystems/nix-installer-action@main | ||
- uses: actions/checkout@v3 | ||
- run: nix-channel --add https://nixos.org/channels/nixpkgs-unstable unstable | ||
- run: nix-channel --update | ||
- run: nix-env -iA unstable.cachix | ||
- run: cachix use "$CACHIX_BINARY_CACHE" | ||
- run: nix develop -c just check | ||
- run: nix develop -c just cache-inputs "$CACHIX_BINARY_CACHE" | ||
|
||
build-shell: | ||
env: | ||
CACHIX_AUTH_TOKEN: '${{ secrets.CACHIX_AUTH_TOKEN }}' | ||
CACHIX_BINARY_CACHE: altf4llc-os | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: DeterminateSystems/nix-installer-action@main | ||
- uses: actions/checkout@v3 | ||
- run: nix-channel --add https://nixos.org/channels/nixpkgs-unstable unstable | ||
- run: nix-channel --update | ||
- run: nix-env -iA unstable.cachix | ||
- run: cachix use "$CACHIX_BINARY_CACHE" | ||
- run: nix develop -c just cache-shell "$CACHIX_BINARY_CACHE" | ||
|
||
build: | ||
env: | ||
CACHIX_AUTH_TOKEN: '${{ secrets.CACHIX_AUTH_TOKEN }}' | ||
CACHIX_BINARY_CACHE: altf4llc-os | ||
needs: | ||
- check | ||
- build-shell | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
profile: | ||
- default | ||
- neovim | ||
steps: | ||
- uses: DeterminateSystems/nix-installer-action@main | ||
- uses: actions/checkout@v4 | ||
- run: nix-channel --add https://nixos.org/channels/nixpkgs-unstable unstable | ||
- run: nix-channel --update | ||
- run: nix-env -iA unstable.cachix | ||
- run: cachix use "$CACHIX_BINARY_CACHE" | ||
- run: nix develop -c just cache-build "${{ matrix.profile }}" "$CACHIX_BINARY_CACHE" |
This file was deleted.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,2 +1,17 @@ | ||
build profile="default": | ||
build profile: | ||
nix build --json --no-link --print-build-logs ".#{{ profile }}" | ||
|
||
cache-build profile cache_name: | ||
just build "{{ profile }}" | jq -r '.[].outputs | to_entries[].value' | cachix push {{ cache_name }} | ||
|
||
cache-inputs cache_name: | ||
nix flake archive --json \ | ||
| jq -r '.path,(.inputs|to_entries[].value.path)' \ | ||
| cachix push "{{ cache_name }}" | ||
|
||
cache-shell cache_name: | ||
nix develop --profile "dev-profile" -c true | ||
cachix push "{{ cache_name }}" "dev-profile" | ||
|
||
check: | ||
nix flake check |
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