nix: housekeeping (#100)
* flake: bump inputs * CI: simplify cachix workflow * CI: separate nix flake checking
This commit is contained in:
31
.github/workflows/cachix.yml
vendored
31
.github/workflows/cachix.yml
vendored
@@ -2,16 +2,22 @@ name: "Set up binary cache & push binaries"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- .gitignore
|
||||
- README.md
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- .github/**
|
||||
- .gitignore
|
||||
- README.md
|
||||
|
||||
jobs:
|
||||
cachix:
|
||||
name: "Build Exposed Packages"
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -27,28 +33,29 @@ jobs:
|
||||
- symbols
|
||||
- websearch
|
||||
steps:
|
||||
- uses: easimon/maximize-build-space@v6
|
||||
- uses: easimon/maximize-build-space@v8
|
||||
with:
|
||||
overprovision-lvm: true
|
||||
remove-android: true
|
||||
remove-dotnet: true
|
||||
remove-haskell: true
|
||||
- uses: actions/checkout@v3
|
||||
- uses: cachix/install-nix-action@v22
|
||||
with:
|
||||
extra_nix_config: |
|
||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||
auto-optimise-store = true
|
||||
experimental-features = nix-command flakes
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
remove-docker-images: true
|
||||
remove-codeql: true
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: DeterminateSystems/nix-installer-action@main
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
|
||||
- uses: cachix/cachix-action@v12
|
||||
with:
|
||||
authToken: ${{ secrets.CACHIX_TOKEN }}
|
||||
extraPullNames: nix-community
|
||||
name: anyrun
|
||||
|
||||
- name: Set default git branch (to reduce log spam)
|
||||
run: git config --global init.defaultBranch main
|
||||
- name: Validate Flakes
|
||||
run: nix flake check
|
||||
|
||||
- name: Build anyrun from the defined matrix
|
||||
run: nix build .#${{ matrix.package }} --print-build-logs
|
||||
|
19
.github/workflows/check.yml
vendored
Normal file
19
.github/workflows/check.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
name: Flake Check
|
||||
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
check-flake:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@main
|
||||
with:
|
||||
logger: pretty
|
||||
|
||||
- name: Check Flake
|
||||
run: nix flake check --accept-flake-config
|
12
flake.lock
generated
12
flake.lock
generated
@@ -7,11 +7,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1685662779,
|
||||
"narHash": "sha256-cKDDciXGpMEjP1n6HlzKinN0H+oLmNpgeCTzYnsA2po=",
|
||||
"lastModified": 1696343447,
|
||||
"narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "71fb97f0d875fd4de4994dfb849f2c75e17eb6c3",
|
||||
"rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -22,11 +22,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1685655444,
|
||||
"narHash": "sha256-6EujQNAeaUkWvpEZZcVF8qSfQrNVWFNNGbUJxv/A5a8=",
|
||||
"lastModified": 1696193975,
|
||||
"narHash": "sha256-mnQjUcYgp9Guu3RNVAB2Srr1TqKcPpRXmJf4LJk6KRY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e635192892f5abbc2289eaac3a73cdb249abaefd",
|
||||
"rev": "fdd898f8f79e8d2f99ed2ab6b3751811ef683242",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
Reference in New Issue
Block a user