zenyx-engine/.forgejo/workflows/build-release.yml
Chance a157812529
Some checks failed
Build Zenyx ⚡ / 🧪 Run Cargo Tests (push) Successful in 4m2s
Build Zenyx ⚡ / 🏗️ Build aarch64-apple-darwin (push) Failing after 8m30s
Build Zenyx ⚡ / 🏗️ Build x86_64-apple-darwin (push) Failing after 8m58s
Build Zenyx ⚡ / 🏗️ Build aarch64-unknown-linux-gnu (push) Failing after 9m33s
Build Zenyx ⚡ / 🏗️ Build aarch64-pc-windows-msvc (push) Failing after 9m40s
Build Zenyx ⚡ / 🏗️ Build x86_64-pc-windows-msvc (push) Failing after 6m17s
Build Zenyx ⚡ / 🏗️ Build x86_64-unknown-linux-gnu (push) Failing after 5m59s
fix(ci): patchelf linux binaries
2025-04-27 14:47:28 -04:00

94 lines
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 --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: ""
command: zigbuild
args: --target x86_64-unknown-linux-gnu --release
- target: aarch64-unknown-linux-gnu
binary_name: zenyx-aarch64-linux
ext: ""
command: zigbuild
args: --target aarch64-unknown-linux-gnu --release
- target: x86_64-pc-windows-msvc
binary_name: zenyx-x86_64-windows
ext: ".exe"
command: xwin build
args: --target x86_64-pc-windows-msvc --release
- target: aarch64-pc-windows-msvc
binary_name: zenyx-aarch64-windows
ext: ".exe"
command: xwin build
args: --target aarch64-pc-windows-msvc --release
- target: x86_64-apple-darwin
binary_name: zenyx-x86_64-macos
ext: ""
command: zigbuild
args: --target x86_64-apple-darwin --release
- target: aarch64-apple-darwin
binary_name: zenyx-aarch64-macos
ext: ""
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: 🛠️ Pathelf
if: ${{ matrix.target }} == x86_64-unknown-linux-gnu || ${{ matrix.target }} == aarch64-unknown-linux-gnu
run: |
nix run nixpkgs#patchelf -- --set-interpreter /lib64/ld-linux-x86-64.so.2 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