mirror of
https://codeberg.org/icewind/haze.git
synced 2026-06-03 17:14:08 +02:00
73 lines
No EOL
1.9 KiB
YAML
73 lines
No EOL
1.9 KiB
YAML
name: "Build"
|
|
on:
|
|
pull_request:
|
|
push:
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: cachix/install-nix-action@v20
|
|
- uses: icewind1991/attic-action@v1
|
|
with:
|
|
name: ci
|
|
instance: https://cache.icewind.me
|
|
authToken: '${{ secrets.ATTIC_TOKEN }}'
|
|
- run: nix build .#check
|
|
|
|
clippy:
|
|
runs-on: ubuntu-latest
|
|
needs: check
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: cachix/install-nix-action@v20
|
|
- uses: icewind1991/attic-action@v1
|
|
with:
|
|
name: ci
|
|
instance: https://cache.icewind.me
|
|
authToken: '${{ secrets.ATTIC_TOKEN }}'
|
|
- run: nix build .#clippy
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
needs: check
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: cachix/install-nix-action@v20
|
|
- uses: icewind1991/attic-action@v1
|
|
with:
|
|
name: ci
|
|
instance: https://cache.icewind.me
|
|
authToken: '${{ secrets.ATTIC_TOKEN }}'
|
|
- run: nix build .#test
|
|
|
|
matrix:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: cachix/install-nix-action@v20
|
|
- id: set-matrix
|
|
run: echo "matrix={\"target\":$(nix eval --json ".#targets.x86_64-linux")}" | tee $GITHUB_OUTPUT
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
needs: [check, matrix]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix: ${{fromJson(needs.matrix.outputs.matrix)}}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: cachix/install-nix-action@v20
|
|
- 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@v3
|
|
with:
|
|
name: haze-${{ matrix.target }}
|
|
path: result/bin/* |