forked from lix-project/nix-eval-jobs
switch to garnix
This commit is contained in:
parent
9d1abc0bc8
commit
0d5f97d617
46
.github/workflows/flake-check.yml
vendored
46
.github/workflows/flake-check.yml
vendored
|
@ -1,46 +0,0 @@
|
||||||
name: "Flake checks"
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- release-*
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
flake-checks:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
# Nix Flakes doesn't work on shallow clones
|
|
||||||
fetch-depth: 0
|
|
||||||
- uses: cachix/install-nix-action@v18
|
|
||||||
with:
|
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
|
||||||
- id: set-matrix
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
matrix="$(nix flake show --json | jq '.checks."x86_64-linux" | keys' | jq -rcM '{attr: ., os: ["ubuntu-latest", "macos-latest"]}')"
|
|
||||||
echo "::set-output name=matrix::$matrix"
|
|
||||||
|
|
||||||
builds:
|
|
||||||
needs: flake-checks
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix: ${{fromJSON(needs.flake-checks.outputs.matrix)}}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
# Nix Flakes doesn't work on shallow clones
|
|
||||||
fetch-depth: 0
|
|
||||||
- uses: cachix/install-nix-action@v18
|
|
||||||
with:
|
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
|
||||||
- run: |
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
system=$(nix-instantiate --eval --expr builtins.currentSystem | jq -r)
|
|
||||||
nix build -L .#checks.$system.${{ matrix.attr }}
|
|
|
@ -1,4 +1,4 @@
|
||||||
name: "Development workflow"
|
name: "Tests"
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
|
@ -17,6 +17,10 @@ jobs:
|
||||||
# Nix Flakes doesn't work on shallow clones
|
# Nix Flakes doesn't work on shallow clones
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: cachix/install-nix-action@v18
|
- uses: cachix/install-nix-action@v18
|
||||||
|
with:
|
||||||
|
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
extra_nix_config: |
|
||||||
|
accept-flake-config = true
|
||||||
- name: Build
|
- name: Build
|
||||||
run: nix develop -c bash -c 'meson build && cd build && ninja'
|
run: nix develop -c bash -c 'meson build && cd build && ninja'
|
||||||
- name: Run tests
|
- name: Run tests
|
|
@ -5,6 +5,13 @@
|
||||||
inputs.flake-parts.url = "github:hercules-ci/flake-parts";
|
inputs.flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
inputs.flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
|
inputs.flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||||
|
|
||||||
|
nixConfig.extra-substituters = [
|
||||||
|
"https://cache.garnix.io"
|
||||||
|
];
|
||||||
|
nixConfig.extra-trusted-public-keys = [
|
||||||
|
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
||||||
|
];
|
||||||
|
|
||||||
outputs = inputs @ { flake-parts, ... }:
|
outputs = inputs @ { flake-parts, ... }:
|
||||||
let
|
let
|
||||||
inherit (inputs.nixpkgs) lib;
|
inherit (inputs.nixpkgs) lib;
|
||||||
|
|
Loading…
Reference in a new issue