mirror of
https://codeberg.org/icewind/logsmash.git
synced 2026-06-03 10:04:12 +02:00
workflow updates
This commit is contained in:
parent
a128d026ad
commit
fea1e1d4de
4 changed files with 82 additions and 110 deletions
47
.forgejo/workflows/ci.yml
Normal file
47
.forgejo/workflows/ci.yml
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
on: [push, pull_request]
|
||||
|
||||
name: CI
|
||||
|
||||
jobs:
|
||||
checks:
|
||||
runs-on: nix
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: https://codeberg.org/icewind/attic-action@v1
|
||||
with:
|
||||
name: link
|
||||
instance: https://cache.icewind.link
|
||||
authToken: "${{ secrets.ATTIC_TOKEN }}"
|
||||
- run: nix flake check --keep-going
|
||||
|
||||
build:
|
||||
runs-on: nix
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: https://codeberg.org/icewind/attic-action@v1
|
||||
with:
|
||||
name: link
|
||||
instance: https://cache.icewind.link
|
||||
authToken: "${{ secrets.ATTIC_TOKEN }}"
|
||||
- run: nix build .#x86_64-unknown-linux-musl
|
||||
- uses: forgejo/upload-artifact@v4
|
||||
with:
|
||||
name: logsmash-x86_64-unknown-linux-musl
|
||||
path: result/bin/logsmash
|
||||
- run: nix build .#x86_64-pc-windows-gnu
|
||||
- uses: forgejo/upload-artifact@v4
|
||||
with:
|
||||
name: logsmash-x86_64-pc-windows-gnu
|
||||
path: result/bin/logsmash.exe
|
||||
|
||||
build-nixpkgs:
|
||||
runs-on: nix
|
||||
needs: checks
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: https://codeberg.org/icewind/attic-action@v1
|
||||
with:
|
||||
name: link
|
||||
instance: https://cache.icewind.link
|
||||
authToken: "${{ secrets.ATTIC_TOKEN }}"
|
||||
- run: nix build .#logsmash
|
||||
35
.forgejo/workflows/release.yml
Normal file
35
.forgejo/workflows/release.yml
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
name: Release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: nix
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: https://codeberg.org/icewind/attic-action@v1
|
||||
with:
|
||||
name: link
|
||||
instance: https://cache.icewind.link
|
||||
authToken: "${{ secrets.ATTIC_TOKEN }}"
|
||||
- run: nix build .#x86_64-unknown-linux-musl
|
||||
- name: Upload binary to release
|
||||
uses: https://github.com/svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: result/bin/logsmash
|
||||
asset_name: logsmash-x86_64-unknown-linux-musl
|
||||
tag: ${{ github.ref }}
|
||||
- run: nix build .#x86_64-pc-windows-gnu
|
||||
- name: Upload binary to release
|
||||
uses: https://github.com/svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: result/bin/logsmash.exe
|
||||
asset_name: logsmash-x86_64-pc-windows-gnu.exe
|
||||
tag: ${{ github.ref }}
|
||||
67
.github/workflows/ci.yml
vendored
67
.github/workflows/ci.yml
vendored
|
|
@ -1,67 +0,0 @@
|
|||
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
|
||||
43
.github/workflows/release.yml
vendored
43
.github/workflows/release.yml
vendored
|
|
@ -1,43 +0,0 @@
|
|||
name: Release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
matrix:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
cross-matrix: ${{ steps.set-matrix.outputs.cross-matrix }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: cachix/install-nix-action@v27
|
||||
- id: set-matrix
|
||||
run: |
|
||||
echo "cross-matrix={\"include\":$(nix eval --json '.#lib.crossMatrix')}" | tee -a $GITHUB_OUTPUT
|
||||
|
||||
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 }}
|
||||
- name: Upload binary to release
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: result/bin/logsmash${{ matrix.binary-suffix }}
|
||||
asset_name: logsmash-${{ matrix.target }}${{ matrix.binary-suffix }}
|
||||
tag: ${{ github.ref }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue