Skip to content

Commit

Permalink
test workflow to build (#1)
Browse files Browse the repository at this point in the history
* test workflow to build (sans cachix)
Signed-off-by: Vanessasaurus <814322+vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed Nov 7, 2022
1 parent 7a63d8f commit 8968166
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/build.yaml
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 }}"

0 comments on commit 8968166

Please sign in to comment.