All checks were successful
Build Zenyx ⚡ / 🧪 Run Cargo Tests (pull_request) Successful in 4m33s
Build Zenyx ⚡ / 🧪 Run Cargo Tests (push) Successful in 4m39s
Build Zenyx ⚡ / 🏗️ Build aarch64-unknown-linux-gnu (pull_request) Successful in 13m35s
Build Zenyx ⚡ / 🏗️ Build aarch64-pc-windows-msvc (pull_request) Successful in 14m20s
Build Zenyx ⚡ / 🏗️ Build x86_64-pc-windows-msvc (pull_request) Successful in 14m29s
Build Zenyx ⚡ / 🏗️ Build x86_64-unknown-linux-gnu (pull_request) Successful in 15m4s
Build Zenyx ⚡ / 🏗️ Build aarch64-pc-windows-msvc (push) Successful in 10m37s
Build Zenyx ⚡ / 🏗️ Build aarch64-unknown-linux-gnu (push) Successful in 10m1s
Build Zenyx ⚡ / 🏗️ Build x86_64-pc-windows-msvc (push) Successful in 9m55s
Build Zenyx ⚡ / 🏗️ Build x86_64-unknown-linux-gnu (push) Successful in 9m58s
104 lines
3.3 KiB
YAML
104 lines
3.3 KiB
YAML
name: Build Zenyx ⚡
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
|
|
jobs:
|
|
cargo-test:
|
|
name: 🧪 Run Cargo Tests
|
|
runs-on: nixos-latest
|
|
steps:
|
|
- name: 📥 Checkout source
|
|
uses: https://github.com/actions/checkout@v4
|
|
|
|
- name: 🚀 Setup & Run tests
|
|
run: |
|
|
nix-shell -p cargo rustc --run "
|
|
cargo test --release --all
|
|
"
|
|
|
|
build:
|
|
name: 🏗️ Build ${{ matrix.target }}
|
|
needs: [cargo-test]
|
|
runs-on: nixos-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
target:
|
|
- x86_64-unknown-linux-gnu
|
|
- x86_64-pc-windows-msvc
|
|
#- x86_64-apple-darwin
|
|
- aarch64-unknown-linux-gnu
|
|
- aarch64-pc-windows-msvc
|
|
#- aarch64-apple-darwin
|
|
include:
|
|
- target: x86_64-unknown-linux-gnu
|
|
binary_name: zenyx-x86_64-linux
|
|
ext: ""
|
|
linker: /lib64/ld-linux-x86-64.so.2
|
|
command: zigbuild
|
|
args: --target x86_64-unknown-linux-gnu --release
|
|
- target: aarch64-unknown-linux-gnu
|
|
binary_name: zenyx-aarch64-linux
|
|
ext: ""
|
|
linker: /lib/ld-linux-aarch64.so.1
|
|
command: zigbuild
|
|
args: --target aarch64-unknown-linux-gnu --release
|
|
- target: x86_64-pc-windows-msvc
|
|
binary_name: zenyx-x86_64-windows
|
|
ext: ".exe"
|
|
linker: ""
|
|
command: xwin build
|
|
args: --target x86_64-pc-windows-msvc --release
|
|
- target: aarch64-pc-windows-msvc
|
|
binary_name: zenyx-aarch64-windows
|
|
ext: ".exe"
|
|
linker: ""
|
|
command: xwin build
|
|
args: --target aarch64-pc-windows-msvc --release
|
|
#- target: x86_64-apple-darwin
|
|
# binary_name: zenyx-x86_64-macos
|
|
# ext: ""
|
|
# linker: ""
|
|
#command: zigbuild
|
|
#args: --target x86_64-apple-darwin --release
|
|
#target: aarch64-apple-darwin
|
|
#binary_name: zenyx-aarch64-macos
|
|
#ext: ""
|
|
#linker: ""
|
|
#command: zigbuild
|
|
#args: --target aarch64-apple-darwin --release
|
|
|
|
steps:
|
|
- name: 📥 Checkout source
|
|
uses: https://github.com/actions/checkout@v4
|
|
|
|
- name: 🚀 Install Target & Build release binary
|
|
run: |
|
|
nix-shell --run "
|
|
cargo ${{ matrix.command }} ${{ matrix.args }}
|
|
"
|
|
|
|
- name: 📦 Package artifact
|
|
run: |
|
|
mkdir -p artifacts
|
|
cp target/${{ matrix.target }}/release/zenyx${{ matrix.ext }} artifacts/${{ matrix.binary_name }}${{ matrix.ext }}
|
|
|
|
- name: 🛠️ Patchelf
|
|
if: ${{
|
|
matrix.target == 'x86_64-unknown-linux-gnu' ||
|
|
matrix.target == 'aarch64-unknown-linux-gnu'
|
|
}}
|
|
run: |
|
|
nix run --extra-experimental-features nix-command --extra-experimental-features flakes nixpkgs#patchelf -- --set-interpreter ${{ matrix.linker }} \
|
|
artifacts/${{ matrix.binary_name }}${{ matrix.ext }}
|
|
|
|
- name: ⬆️ Upload artifact
|
|
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
|
with:
|
|
name: ${{ matrix.binary_name }}.zip
|
|
path: artifacts/${{ matrix.binary_name }}${{ matrix.ext }}
|
|
compression-level: 9
|
|
if-no-files-found: error
|