Add steps to check out default.nix files #1811
This file contains hidden or 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
on: | |
push: | |
branches: [main, master] | |
pull_request: | |
branches: [main, master] | |
name: nix-builder | |
permissions: | |
contents: read | |
jobs: | |
run-x86_64-linux: | |
name: nix builder for Ubuntu | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create this folder to silence warning | |
run: mkdir -p ~/.nix-defexpr/channels | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: rstats-on-nix | |
# If you chose signing key for write access | |
# signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' | |
# If you chose API tokens for write access OR if you have a private cache | |
authToken: '${{ secrets.CACHIX_AUTH }}' | |
- name: Run `nix-build ./inst/extdata/default.nix` | |
run: | | |
nix-build --quiet ./inst/extdata/default.nix | |
nix-shell --quiet ./inst/extdata/default.nix | |
run-x86_64-darwin: | |
name: nix builder for MacOS X86_64 | |
# the DeterminateSystems action currently uses macos-14 | |
# https://github.com/DeterminateSystems/nix-installer-action/blob/main/.github/workflows/ci.yml | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- name: Run `nix-build ./inst/extdata/default.nix` | |
run: | | |
nix-build --quiet ./inst/extdata/default.nix | |
nix-shell --quiet ./inst/extdata/default.nix |