Fix CI/CD
This commit is contained in:
parent
f72cc0c9aa
commit
9b5b7be0de
2 changed files with 21 additions and 19 deletions
|
|
@ -14,18 +14,21 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Run unit tests
|
||||
run: nix develop --command cargo test --lib
|
||||
run: nix build --print-build-logs .#checks.x86_64-linux.default
|
||||
|
||||
build:
|
||||
name: Build ${{ matrix.package }}
|
||||
name: Build ${{ matrix.target }}
|
||||
runs-on: native
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
package:
|
||||
- default
|
||||
- x86_64-linux-musl
|
||||
- aarch64-linux
|
||||
include:
|
||||
- package: x86_64-linux
|
||||
target: x86_64-unknown-linux-gnu
|
||||
- package: x86_64-linux-musl
|
||||
target: x86_64-unknown-linux-musl
|
||||
- package: aarch64-linux
|
||||
target: aarch64-unknown-linux-gnu
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
|
@ -34,23 +37,14 @@ jobs:
|
|||
|
||||
- name: Prepare release artifact
|
||||
if: startsWith(forgejo.ref, 'refs/tags/')
|
||||
run: |
|
||||
target="${{ matrix.package }}"
|
||||
if [ "$target" = "default" ]; then
|
||||
target="x86_64-unknown-linux-gnu"
|
||||
elif [ "$target" = "x86_64-linux-musl" ]; then
|
||||
target="x86_64-unknown-linux-musl"
|
||||
elif [ "$target" = "aarch64-linux" ]; then
|
||||
target="aarch64-unknown-linux-gnu"
|
||||
fi
|
||||
cp result/bin/mkv "mkv-${target}"
|
||||
run: cp result/bin/mkv mkv-${{ matrix.target }}
|
||||
|
||||
- name: Upload artifact
|
||||
if: startsWith(forgejo.ref, 'refs/tags/')
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: mkv-${{ matrix.package }}
|
||||
path: mkv-*
|
||||
name: mkv-${{ matrix.target }}
|
||||
path: mkv-${{ matrix.target }}
|
||||
|
||||
release:
|
||||
name: Create release
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue