wip: fix workflow
Some checks failed
Build Zenyx ⚡ / 🔧 Setup Environment (push) Failing after 53s
Build Zenyx ⚡ / 🏗️ Build aarch64-unknown-linux-gnu (push) Has been skipped
Build Zenyx ⚡ / 🏗️ Build x86_64-unknown-linux-gnu (push) Has been skipped
Build Zenyx ⚡ / 🏗️ Build x86_64-pc-windows-msvc (push) Has been skipped
Some checks failed
Build Zenyx ⚡ / 🔧 Setup Environment (push) Failing after 53s
Build Zenyx ⚡ / 🏗️ Build aarch64-unknown-linux-gnu (push) Has been skipped
Build Zenyx ⚡ / 🏗️ Build x86_64-unknown-linux-gnu (push) Has been skipped
Build Zenyx ⚡ / 🏗️ Build x86_64-pc-windows-msvc (push) Has been skipped
This commit is contained in:
parent
6815a113cc
commit
2ac72cd2cd
1 changed files with 34 additions and 24 deletions
|
@ -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-xwix
|
||||
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,24 @@ 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:
|
||||
toolchain: stable
|
||||
path: ~/.cargo/bin:/tmp/zig
|
||||
|
||||
- name: 🎯 Install Rust target
|
||||
uses: https://github.com/actions-rs/target@v1
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
override: true
|
||||
|
||||
- name: 🗄️ Restore Cargo cache
|
||||
uses: https://github.com/actions/cache@v4
|
||||
|
@ -93,10 +96,17 @@ 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
|
||||
uses: https://github.com/actions-rs/clippy-check@v1
|
||||
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 +115,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 }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue