mirror of
https://codeberg.org/icewind/logsmash.git
synced 2026-06-04 02:24:11 +02:00
67 lines
2 KiB
YAML
67 lines
2 KiB
YAML
on: [push, pull_request]
|
|
|
|
name: CI
|
|
|
|
jobs:
|
|
matrix:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
check-matrix: ${{ steps.set-matrix.outputs.check-matrix }}
|
|
cross-matrix: ${{ steps.set-matrix.outputs.cross-matrix }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: cachix/install-nix-action@v27
|
|
- id: set-matrix
|
|
run: |
|
|
echo "check-matrix={\"check\":$(nix eval --json '.#checks.x86_64-linux' --apply 'builtins.attrNames')}" | tee -a $GITHUB_OUTPUT
|
|
echo "cross-matrix={\"include\":$(nix eval --json '.#lib.crossMatrix')}" | tee -a $GITHUB_OUTPUT
|
|
|
|
checks:
|
|
runs-on: ubuntu-latest
|
|
needs: [matrix]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix: ${{fromJson(needs.matrix.outputs.check-matrix)}}
|
|
name: ${{ matrix.check }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: cachix/install-nix-action@v26
|
|
- uses: icewind1991/attic-action@v1
|
|
with:
|
|
name: ci
|
|
instance: https://cache.icewind.me
|
|
authToken: "${{ secrets.ATTIC_TOKEN }}"
|
|
- run: nix build .#checks.x86_64-linux.${{ matrix.check }}
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
needs: [matrix]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix: ${{fromJson(needs.matrix.outputs.cross-matrix)}}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: cachix/install-nix-action@v27
|
|
- uses: icewind1991/attic-action@v1
|
|
with:
|
|
name: ci
|
|
instance: https://cache.icewind.me
|
|
authToken: "${{ secrets.ATTIC_TOKEN }}"
|
|
- run: nix build .#${{ matrix.target }}
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: logsmash-${{ matrix.target }}
|
|
path: result/bin/logsmash${{ matrix.binary-suffix }}
|
|
|
|
build-nixpkgs:
|
|
runs-on: ubuntu-latest
|
|
needs: checks
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: cachix/install-nix-action@v27
|
|
- uses: icewind1991/attic-action@v1
|
|
with:
|
|
name: ci
|
|
instance: https://cache.icewind.me
|
|
authToken: "${{ secrets.ATTIC_TOKEN }}"
|
|
- run: nix build .#logsmash
|