mirror of
https://github.com/librekeys/picoforge.git
synced 2026-07-28 08:01:19 -07:00
- Update nixpkgs channel from nixos-25.11 to nixos-26.05 - Bump actions/checkout from v6 to v7 - Bump cachix/cachix-action from v16 to v17 - Bump gepbird/nix-update-action from v2.1.1 to v3.1.0 - Remove schedule trigger from binary-cache workflow to avoid redundant builds (push to main already triggers the same cache)
51 lines
1.8 KiB
YAML
51 lines
1.8 KiB
YAML
name: "Build and populate cache"
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- package.nix
|
|
workflow_dispatch:
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
cachixName:
|
|
- librekeys
|
|
nixPath:
|
|
- nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixpkgs-unstable.tar.gz
|
|
- nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixos-unstable.tar.gz
|
|
- nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixos-26.05.tar.gz
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v7
|
|
- name: Install nix
|
|
uses: cachix/install-nix-action@v31
|
|
with:
|
|
nix_path: "${{ matrix.nixPath }}"
|
|
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: Setup cachix
|
|
uses: cachix/cachix-action@v17
|
|
# Don't replace <YOUR_CACHIX_NAME> here!
|
|
if: ${{ matrix.cachixName != '<YOUR_CACHIX_NAME>' }}
|
|
with:
|
|
name: ${{ matrix.cachixName }}
|
|
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
|
- 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
|