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