zenyx-engine/.forgejo/workflows/rust.yml

61 lines
1.7 KiB
YAML
Raw Normal View History

name: Build Zenyx ⚡
on:
push:
pull_request:
2025-04-11 13:42:20 -04:00
jobs:
build:
name: Build ${{ matrix.target }}
2025-04-11 13:42:20 -04:00
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
2025-04-11 13:42:20 -04:00
target:
- x86_64-unknown-linux-gnu
- aarch64-unknown-linux-gnu
- x86_64-pc-windows-gnu
2025-04-10 22:58:54 -04:00
- aarch64-apple-darwin
include:
- target: x86_64-unknown-linux-gnu
binary_name: zenyx-x86_64-linux
2025-04-11 13:42:20 -04:00
ext: ""
- target: aarch64-unknown-linux-gnu
binary_name: zenyx-aarch64-linux
2025-04-11 13:42:20 -04:00
ext: ""
- target: x86_64-pc-windows-gnu
binary_name: zenyx-x86_64-windows.exe
2025-04-11 13:42:20 -04:00
ext: ".exe"
- target: aarch64-apple-darwin
binary_name: zenyx-aarch64-apple
ext: ""
steps:
2025-04-11 13:42:20 -04:00
- name: 📥 Checkout source
uses: actions/checkout@v4
2025-04-11 13:42:20 -04:00
- name: 🛠️ Install Rust toolchain
uses: https://github.com/actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
override: true
2025-04-11 13:42:20 -04:00
- name: 🚀 Build with cross
uses: https://github.com/actions-rs/cargo@v1
with:
2025-04-11 13:42:20 -04:00
use-cross: true
command: build
2025-04-11 13:42:20 -04:00
args: --target ${{ matrix.target }}
- name: 📦 Package artifact
run: |
mkdir -p artifacts
2025-04-11 13:42:20 -04:00
cp target/${{ matrix.target }}/debug/zenyx${{ matrix.ext }} artifacts/${{ matrix.binary_name }}
chmod +x artifacts/${{ matrix.binary_name }}
- name: ⬆️ Upload artifact
2025-04-11 13:42:20 -04:00
uses: code.forgejo.org/forgejo/upload-artifact@v4
with:
name: ${{ matrix.binary_name }}
2025-04-11 13:42:20 -04:00
path: artifacts/${{ matrix.binary_name }}