wip: fix workflow
Some checks failed
Build Zenyx ⚡ / 🔧 Setup Environment (push) Successful in 3m11s
Build Zenyx ⚡ / 🏗️ Build aarch64-unknown-linux-gnu (push) Has been cancelled
Build Zenyx ⚡ / 🏗️ Build x86_64-unknown-linux-gnu (push) Waiting to run
Build Zenyx ⚡ / 🏗️ Build x86_64-pc-windows-msvc (push) Waiting to run

This commit is contained in:
Chance 2025-04-19 00:05:31 -04:00 committed by BitSyndicate
parent bdd90a36e9
commit 056513b646
Signed by: bitsyndicate
GPG key ID: 443E4198D6BBA6DE

View file

@ -14,6 +14,14 @@ jobs:
- name: 📥 Checkout source
uses: https://github.com/actions/checkout@v4
- name: 🦀 Install Rust toolchain
uses: https://github.com/actions-rs/toolchain@v1
with:
toolchain: stable
components: rust-src
override: true
profile: minimal
- name: 🗄️ Cache tools
uses: https://github.com/actions/cache@v4
id: cache-tools
@ -21,22 +29,16 @@ jobs:
path: |
~/.cargo/bin
/tmp/zig
key: tools-v1-${{ hashFiles('**/Cargo.lock') }}
/tmp/xwin
key: tools-v3-${{ hashFiles('**/Cargo.lock') }}
- name: 🦀 Install Rust toolchain
uses: https://github.com/actions-rs/toolchain@v1
with:
toolchain: stable
components: rust-src
override: true
- name: 📦 Install Zig and cargo-zigbuild
- name: 🔧 Install build tools
if: steps.cache-tools.outputs.cache-hit != 'true'
run: |
mkdir -p /tmp/zig
curl -L https://ziglang.org/builds/zig-linux-x86_64-0.11.0.tar.xz | tar -xJ -C /tmp/zig --strip-components=1
curl -L https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo binstall -y cargo-zigbuild
mkdir -p /tmp/zig /tmp/xwin
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo binstall -y cargo-zigbuild cargo-xwin
curl -L https://ziglang.org/download/0.14.0/zig-linux-x86_64-0.14.0.tar.xz | tar -xJ -C /tmp/zig --strip-components=1
build:
name: 🏗️ Build ${{ matrix.target }}
@ -64,23 +66,21 @@ jobs:
- name: 📥 Checkout source
uses: https://github.com/actions/checkout@v4
- name: 🗄 Restore tool cache
- name: 🛠 Restore tool cache
uses: https://github.com/actions/cache@v4
with:
path: |
~/.cargo/bin
/tmp/zig
key: tools-v1-${{ hashFiles('**/Cargo.lock') }}
/tmp/xwin
key: tools-v3-${{ hashFiles('**/Cargo.lock') }}
- name: 📍 Add Zig to PATH
run: echo "/tmp/zig" >> $GITHUB_PATH
- name: 🎯 Install Rust target
- name: 📍 Add tools to PATH
uses: https://github.com/actions-rs/toolchain@v1
with:
path: ~/.cargo/bin:/tmp/zig
toolchain: stable
target: ${{ matrix.target }}
override: true
- name: 🗄️ Restore Cargo cache
uses: https://github.com/actions/cache@v4
@ -93,10 +93,16 @@ jobs:
restore-keys: |
cargo-${{ matrix.target }}-
- name: 🚀 Build release binary
run: cargo zigbuild --target ${{ matrix.target }} --release
- name: 🚀 Build project
uses: https://github.com/actions-rs/cargo@v1
with:
command: ${{ contains(matrix.target, 'windows') && 'xwin' || 'zigbuild' }}
args: build --target ${{ matrix.target }} --release
- name: 📦 Package artifact
with:
name: ${{ matrix.binary_name }}
path: artifacts/${{ matrix.binary_name }}
run: |
mkdir -p artifacts
cp target/${{ matrix.target }}/release/zenyx${{ matrix.ext }} artifacts/${{ matrix.binary_name }}
@ -105,4 +111,4 @@ jobs:
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
with:
name: ${{ matrix.binary_name }}
path: artifacts/${{ matrix.binary_name }}
path: artifacts/${{ matrix.binary_name }}