-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* test workflow to build (sans cachix) Signed-off-by: Vanessasaurus <814322+vsoch@users.noreply.github.com>
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 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,55 @@ | ||
name: "Build and populate cache" | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
schedule: | ||
# rebuild everyday at 3:45 | ||
- cron: '45 3 * * *' | ||
jobs: | ||
tests: | ||
strategy: | ||
matrix: | ||
# Set this to notify the global nur package registry that changes are | ||
# available. | ||
# | ||
# The repo name as used in | ||
# https://github.com/nix-community/NUR/blob/master/repos.json | ||
nurRepo: | ||
- rseops | ||
nixPath: | ||
- nixpkgs=channel:nixos-unstable | ||
- nixpkgs=channel:nixpkgs-unstable | ||
- nixpkgs=channel:nixos-22.05 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Install nix | ||
uses: cachix/install-nix-action@v18 | ||
with: | ||
nix_path: "${{ matrix.nixPath }}" | ||
# nix 2.6 breaks restrict-eval, when using the NIX_PATH | ||
# see https://github.com/NixOS/nix/issues/5980 | ||
install_url: https://releases.nixos.org/nix/nix-2.5.1/install | ||
extra_nix_config: | | ||
experimental-features = nix-command flakes | ||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | ||
- name: Show nixpkgs version | ||
run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version' | ||
- name: Check evaluation | ||
run: | | ||
nix-env -f . -qa \* --meta --xml \ | ||
--allowed-uris https://static.rust-lang.org \ | ||
--option restrict-eval true \ | ||
--option allow-import-from-derivation true \ | ||
--drv-path --show-trace \ | ||
-I nixpkgs=$(nix-instantiate --find-file nixpkgs) \ | ||
-I $PWD | ||
- name: Build nix packages | ||
run: nix shell -f '<nixpkgs>' nix-build-uncached -c nix-build-uncached ci.nix -A cacheOutputs | ||
- name: Trigger NUR update | ||
# Don't replace <YOUR_REPO_NAME> here! | ||
if: ${{ matrix.nurRepo != '<YOUR_REPO_NAME>' }} | ||
run: curl -XPOST "https://nur-update.herokuapp.com/update?repo=${{ matrix.nurRepo }}" |