mirror of
https://github.com/versia-pub/activitypub.git
synced 2025-12-06 06:38:20 +01:00
[feat] GH nix builds
This commit is contained in:
parent
9bc640aadc
commit
3f4618d4d2
33
.github/workflows/nix-flake.yml
vendored
Normal file
33
.github/workflows/nix-flake.yml
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
name: Nix Flake actions
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- feat/*
|
||||
|
||||
jobs:
|
||||
nix-matrix:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: cachix/install-nix-action@v24
|
||||
- id: set-matrix
|
||||
name: Generate Nix Matrix
|
||||
run: |
|
||||
set -Eeu
|
||||
matrix="$(nix eval --json '.#githubActions.matrix')"
|
||||
echo "matrix=$matrix" >> "$GITHUB_OUTPUT"
|
||||
|
||||
nix-build:
|
||||
needs: nix-matrix
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix: ${{fromJSON(needs.nix-matrix.outputs.matrix)}}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: cachix/install-nix-action@v24
|
||||
- run: nix build -L ".#${{ matrix.attr }}"
|
||||
|
|
@ -22,6 +22,9 @@
|
|||
imports = [
|
||||
inputs.treefmt-nix.flakeModule
|
||||
];
|
||||
flake = { config, self', inputs', ... }: {
|
||||
githubActions = inputs.nix-github-actions.lib.mkGithubMatrix { checks = self'.packages; };
|
||||
};
|
||||
perSystem = { config, self', pkgs, lib, system, ... }:
|
||||
let
|
||||
cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml);
|
||||
|
|
|
|||
Loading…
Reference in a new issue