Compare commits

..

3 commits

Author SHA1 Message Date
971aad5414
wip: fix workflow
Some checks failed
Build Zenyx ⚡ / 🔧 Setup Environment (push) Successful in 1m36s
Build Zenyx ⚡ / 🏗️ Build aarch64-unknown-linux-gnu (push) Failing after 6s
Build Zenyx ⚡ / 🏗️ Build x86_64-unknown-linux-gnu (push) Failing after 4s
Build Zenyx ⚡ / 🏗️ Build x86_64-pc-windows-msvc (push) Failing after 4s
2025-04-19 00:05:31 -04:00
6815a113cc
Revert "feat(ci): use cargo zibuild & xbuild"
This reverts commit 87d810aff3.
2025-04-19 00:00:46 -04:00
630d13ebb2
Revert "fix(ci): ensure node is installed"
This reverts commit cb91bde7f8.
2025-04-18 23:59:21 -04:00

View file

@ -1,78 +1,91 @@
name: Build Zenyx ⚡
name: Build Zenyx ⚡
on:
push:
pull_request:
on:
push:
pull_request:
jobs:
build:
name: Build ${{ matrix.target }}
runs-on: ubuntu-latest
container: ${{ matrix.container }}
jobs:
setup:
name: 🔧 Setup Environment
runs-on: ubuntu-latest
outputs:
cache-hit: ${{ steps.cache-tools.outputs.cache-hit }}
steps:
- name: 📥 Checkout source
uses: https://github.com/actions/checkout@v4
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
container: messense/cargo-zigbuild:latest
binary_name: zenyx-x86_64-linux
ext: ""
- name: 🗄️ Cache tools
uses: https://github.com/actions/cache@v4
id: cache-tools
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: tools-v1-${{ hashFiles('**/Cargo.lock') }}
- target: aarch64-unknown-linux-gnu
container: messense/cargo-zigbuild:latest
binary_name: zenyx-aarch64-linux
ext: ""
- name: 🦀 Install Rust toolchain
uses: https://github.com/actions-rs/toolchain@v1
with:
toolchain: stable
components: rust-src
override: true
- target: universal2-apple-darwin
container: messense/cargo-zigbuild:latest
binary_name: zenyx-universal-macos
ext: ""
build:
name: 🏗️ Build ${{ matrix.target }}
needs: setup
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
image: messense/cargo-zigbuild:latest
binary_name: zenyx-x86_64-linux
ext: ""
- target: x86_64-pc-windows-msvc
container: messense/cargo-xwin:latest
binary_name: zenyx-x86_64-windows-msvc.exe
ext: ".exe"
- target: aarch64-unknown-linux-gnu
image: messense/cargo-zigbuild:latest
binary_name: zenyx-aarch64-linux
ext: ""
steps:
- name: Ensure nodejs
run: |
apt-get -y install nodejs
- name: 📥 Checkout source
uses: https://github.com/actions/checkout@v4
- target: x86_64-pc-windows-msvc
image: messense/cargo-xwin:latest
binary_name: zenyx-x86_64-windows-msvc.exe
ext: ".exe"
- name: 🧩 Restore Cargo cache
uses: https://github.com/actions/cache@v4
with:
path: |
/usr/local/cargo/registry
/usr/local/cargo/git
target
key: ${{ runner.os }}-cargo-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-${{ matrix.target }}-
container: ${{ matrix.image }}
- name: 🦀 Install macOS targets
if: matrix.target == 'universal2-apple-darwin'
uses: https://github.com/actions-rs/toolchain@v1
with:
target: x86_64-apple-darwin,aarch64-apple-darwin
steps:
- name: 📥 Checkout source
uses: https://github.com/actions/checkout@v4
- name: 🚀 Build project
run: |
cargo zigbuild --target ${{ matrix.target }} --release
if: matrix.target != 'x86_64-pc-windows-msvc'
- name: 🗄️ Restore Cargo cache
uses: https://github.com/actions/cache@v4
with:
path: |
/usr/local/cargo/registry
/usr/local/cargo/git
target
key: cargo-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-${{ matrix.target }}-
- name: 🚀 Build Windows project
run: |
- name: 🚀 Build release binary
run: |
if [[ "${{ matrix.target }}" == *"windows"* ]]; then
cargo xwin build --target ${{ matrix.target }} --release
if: matrix.target == 'x86_64-pc-windows-msvc'
else
cargo zigbuild --target ${{ matrix.target }} --release
fi
- name: 📦 Package artifact
run: mkdir -p artifacts && cp target/${{ matrix.target }}/release/zenyx${{ matrix.ext }} artifacts/${{ matrix.binary_name }}
- name: 📦 Package artifact
run: |
mkdir -p artifacts
cp target/${{ matrix.target }}/release/zenyx${{ matrix.ext }} artifacts/${{ matrix.binary_name }}
- name: ⬆️ Upload artifact
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
with:
name: ${{ matrix.binary_name }}
path: artifacts/${{ matrix.binary_name }}
- name: ⬆️ Upload artifact
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
with:
name: ${{ matrix.binary_name }}
path: artifacts/${{ matrix.binary_name }}