Build and populate cache #74
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
name: "Build and populate cache" | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- master | |
schedule: | |
# rebuild everyday at 2:51 | |
# TIP: Choose a random time here so not all repositories are build at once: | |
# https://www.random.org/clock-times/?num=1&earliest=01%3A00&latest=08%3A00&interval=5&format=html&rnd=new | |
- cron: "14 15 * * *" | |
workflow_dispatch: | |
jobs: | |
tests: | |
strategy: | |
matrix: | |
arch: | |
- x86_64-linux | |
- aarch64-linux | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@main | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
- uses: DeterminateSystems/flake-checker-action@main | |
- name: Print flake metadata | |
run: nix flake metadata --accept-flake-config | |
- name: Setup cachix | |
uses: cachix/cachix-action@v15 | |
with: | |
name: dev380 | |
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}" | |
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" | |
- name: Build x86_64-linux nix packages | |
if: ${{ matrix.arch == 'x86_64-linux' }} | |
run: nix run nixpkgs#nix-build-uncached -- -build-flags '-L' ./ci/x86_64-linux.nix | |
- name: Build aarch64-linux nix packages | |
if: ${{ matrix.arch == 'aarch64-linux' }} | |
run: nix run nixpkgs#nix-build-uncached -- -build-flags '-L' ./ci/aarch64-linux.nix | |
- name: Trigger NUR update | |
run: curl -XPOST "https://nur-update.nix-community.org/update?repo=Dev380" |