wip: fix workflow
Some checks failed
Build Zenyx ⚡ / 🔧 Setup Environment (push) Failing after 48s
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 48s
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
25bbbd0d04
1 changed files with 33 additions and 23 deletions
|
@ -14,6 +14,14 @@ jobs:
|
||||||
- name: 📥 Checkout source
|
- name: 📥 Checkout source
|
||||||
uses: https://github.com/actions/checkout@v4
|
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
|
- name: 🗄️ Cache tools
|
||||||
uses: https://github.com/actions/cache@v4
|
uses: https://github.com/actions/cache@v4
|
||||||
id: cache-tools
|
id: cache-tools
|
||||||
|
@ -21,22 +29,16 @@ jobs:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin
|
~/.cargo/bin
|
||||||
/tmp/zig
|
/tmp/zig
|
||||||
key: tools-v1-${{ hashFiles('**/Cargo.lock') }}
|
/tmp/xwin
|
||||||
|
key: tools-v3-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
|
||||||
- name: 🦀 Install Rust toolchain
|
- name: 🔧 Install build tools
|
||||||
uses: https://github.com/actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
components: rust-src
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: 📦 Install Zig and cargo-zigbuild
|
|
||||||
if: steps.cache-tools.outputs.cache-hit != 'true'
|
if: steps.cache-tools.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
mkdir -p /tmp/zig
|
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 --no-confirm
|
||||||
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://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
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: 🏗️ Build ${{ matrix.target }}
|
name: 🏗️ Build ${{ matrix.target }}
|
||||||
|
@ -64,23 +66,24 @@ jobs:
|
||||||
- name: 📥 Checkout source
|
- name: 📥 Checkout source
|
||||||
uses: https://github.com/actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
|
|
||||||
- name: 🗄️ Restore tool cache
|
- name: 🛠️ Restore tool cache
|
||||||
uses: https://github.com/actions/cache@v4
|
uses: https://github.com/actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin
|
~/.cargo/bin
|
||||||
/tmp/zig
|
/tmp/zig
|
||||||
key: tools-v1-${{ hashFiles('**/Cargo.lock') }}
|
/tmp/xwin
|
||||||
|
key: tools-v3-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
|
||||||
- name: 📍 Add Zig to PATH
|
- name: 📍 Add tools to PATH
|
||||||
run: echo "/tmp/zig" >> $GITHUB_PATH
|
|
||||||
|
|
||||||
- name: 🎯 Install Rust target
|
|
||||||
uses: https://github.com/actions-rs/toolchain@v1
|
uses: https://github.com/actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
path: ~/.cargo/bin:/tmp/zig
|
||||||
|
|
||||||
|
- name: 🎯 Install Rust target
|
||||||
|
uses: https://github.com/actions-rs/target@v1
|
||||||
|
with:
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: 🗄️ Restore Cargo cache
|
- name: 🗄️ Restore Cargo cache
|
||||||
uses: https://github.com/actions/cache@v4
|
uses: https://github.com/actions/cache@v4
|
||||||
|
@ -93,10 +96,17 @@ jobs:
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
cargo-${{ matrix.target }}-
|
cargo-${{ matrix.target }}-
|
||||||
|
|
||||||
- name: 🚀 Build release binary
|
- name: 🚀 Build project
|
||||||
run: cargo zigbuild --target ${{ matrix.target }} --release
|
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
|
- name: 📦 Package artifact
|
||||||
|
uses: https://github.com/actions-rs/clippy-check@v1
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.binary_name }}
|
||||||
|
path: artifacts/${{ matrix.binary_name }}
|
||||||
run: |
|
run: |
|
||||||
mkdir -p artifacts
|
mkdir -p artifacts
|
||||||
cp target/${{ matrix.target }}/release/zenyx${{ matrix.ext }} artifacts/${{ matrix.binary_name }}
|
cp target/${{ matrix.target }}/release/zenyx${{ matrix.ext }} artifacts/${{ matrix.binary_name }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue