ci: change to garnix
This commit is contained in:
parent
8eabf909c6
commit
b6d533135b
3 changed files with 8 additions and 113 deletions
28
.github/actions/install-nix/action.yaml
vendored
28
.github/actions/install-nix/action.yaml
vendored
|
@ -1,28 +0,0 @@
|
|||
name: "Nix setup"
|
||||
inputs:
|
||||
extra-conf:
|
||||
required: false
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: DeterminateSystems/nix-installer-action@main
|
||||
with:
|
||||
# source-url: https://install.lix.systems/lix
|
||||
# Needs to be kept in sync with flake.nix
|
||||
extra-conf: |
|
||||
fallback = true
|
||||
allow-import-from-derivation = false
|
||||
extra-substituters = https://hyprland.cachix.org
|
||||
extra-substituters = https://cache.garnix.io
|
||||
extra-substituters = https://nix-community.cachix.org
|
||||
extra-substituters = https://hercules-ci.cachix.org
|
||||
extra-substituters = https://nrabulinski.cachix.org
|
||||
extra-substituters = https://cache.nrab.lol
|
||||
extra-trusted-public-keys = hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=
|
||||
extra-trusted-public-keys = cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=
|
||||
extra-trusted-public-keys = nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
|
||||
extra-trusted-public-keys = hercules-ci.cachix.org-1:ZZeDl9Va+xe9j+KqdzoBZMFJHVQ42Uu/c/1/KMC5Lw0=
|
||||
extra-trusted-public-keys = nrabulinski.cachix.org-1:Q5FD7+1c68uH74CQK66UWNzxhanZW8xcg1LFXxGK8ic=
|
||||
extra-trusted-public-keys = cache.nrab.lol-1:CJl1TouOyuJ1Xh4tZSXLwm3Upt06HzUNZmeyuEB9EZg=
|
||||
${{ inputs.extra-conf }}
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
85
.github/workflows/build.yaml
vendored
85
.github/workflows/build.yaml
vendored
|
@ -1,85 +0,0 @@
|
|||
name: Build flake
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: [nix]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: nix flake check
|
||||
|
||||
matrix:
|
||||
runs-on: [nix]
|
||||
needs: [check]
|
||||
outputs:
|
||||
aarch64-darwin: ${{ steps.generate_matrix.outputs.aarch64-darwin }}
|
||||
aarch64-linux: ${{ steps.generate_matrix.outputs.aarch64-linux }}
|
||||
x86_64-linux: ${{ steps.generate_matrix.outputs.x86_64-linux }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- id: generate_matrix
|
||||
run: |
|
||||
nix eval --raw .#github-matrix >> $GITHUB_OUTPUT
|
||||
|
||||
build-x86_64-linux:
|
||||
runs-on: [Linux, X64, nix]
|
||||
needs: [matrix]
|
||||
if: ${{ needs.matrix.outputs.x86_64-linux != '[]' && needs.matrix.outputs.x86_64-linux != '' }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
output: ${{ fromJson(needs.matrix.outputs.x86_64-linux )}}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build output
|
||||
run: nix build .#${{ matrix.output }} -L
|
||||
- name: Push output
|
||||
run: |
|
||||
nix run .#attic.client -- login nrab-attic 'https://attic.nrab.lol' ${{ secrets.ATTIC_TOKEN }}
|
||||
nix run .#attic.client -- push nrab-attic:public result
|
||||
|
||||
build-aarch64-darwin:
|
||||
runs-on: macos-14
|
||||
needs: [matrix]
|
||||
if: ${{ needs.matrix.outputs.aarch64-darwin != '[]' && needs.matrix.outputs.aarch64-darwin != '' }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
output: ${{ fromJson(needs.matrix.outputs.aarch64-darwin )}}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/install-nix
|
||||
- name: Build output
|
||||
run: nix build .#${{ matrix.output }} -L
|
||||
- name: Push output
|
||||
run: |
|
||||
nix run .#attic.client -- login nrab-attic 'https://attic.nrab.lol' ${{ secrets.ATTIC_TOKEN }}
|
||||
nix run .#attic.client -- push nrab-attic:public result
|
||||
|
||||
build-aarch64-linux:
|
||||
runs-on: [Linux, ARM64, nix]
|
||||
needs: [matrix]
|
||||
if: ${{ needs.matrix.outputs.aarch64-linux != '[]' && needs.matrix.outputs.aarch64-linux != '' }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
output: ${{ fromJson(needs.matrix.outputs.aarch64-linux )}}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build output
|
||||
run: nix build .#${{ matrix.output }} -L
|
||||
- name: Push output
|
||||
run: |
|
||||
nix run .#attic.client -- login nrab-attic 'https://attic.nrab.lol' ${{ secrets.ATTIC_TOKEN }}
|
||||
nix run .#attic.client -- push nrab-attic:public result
|
||||
|
||||
all-built:
|
||||
runs-on: ubuntu-latest
|
||||
if: always()
|
||||
needs: [build-x86_64-linux, build-aarch64-darwin, build-aarch64-linux]
|
||||
steps:
|
||||
- uses: re-actors/alls-green@release/v1
|
||||
with:
|
||||
jobs: ${{ toJSON(needs) }}
|
8
garnix.yaml
Normal file
8
garnix.yaml
Normal file
|
@ -0,0 +1,8 @@
|
|||
builds:
|
||||
include:
|
||||
- 'devShells.*.*'
|
||||
- 'packages.*.*'
|
||||
- 'formatter.*'
|
||||
- 'nixosConfigurations.*'
|
||||
- 'darwinConfigurations.*'
|
||||
- 'homeConfigurations.*'
|
Loading…
Add table
Add a link
Reference in a new issue