fix(ci): ensure node is installed
Some checks failed
Build Zenyx ⚡ / Build aarch64-unknown-linux-gnu (push) Failing after 4s
Build Zenyx ⚡ / Build universal2-apple-darwin (push) Failing after 4s
Build Zenyx ⚡ / Build x86_64-unknown-linux-gnu (push) Failing after 4s
Build Zenyx ⚡ / Build x86_64-pc-windows-msvc (push) Failing after 4s
Some checks failed
Build Zenyx ⚡ / Build aarch64-unknown-linux-gnu (push) Failing after 4s
Build Zenyx ⚡ / Build universal2-apple-darwin (push) Failing after 4s
Build Zenyx ⚡ / Build x86_64-unknown-linux-gnu (push) Failing after 4s
Build Zenyx ⚡ / Build x86_64-pc-windows-msvc (push) Failing after 4s
This commit is contained in:
parent
87d810aff3
commit
7cac97e3b9
1 changed files with 65 additions and 62 deletions
|
@ -1,75 +1,78 @@
|
|||
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:
|
||||
build:
|
||||
name: Build ${{ matrix.target }}
|
||||
runs-on: ubuntu-latest
|
||||
container: ${{ matrix.container }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- target: x86_64-unknown-linux-gnu
|
||||
container: messense/cargo-zigbuild:latest
|
||||
binary_name: zenyx-x86_64-linux
|
||||
ext: ""
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- target: x86_64-unknown-linux-gnu
|
||||
container: messense/cargo-zigbuild:latest
|
||||
binary_name: zenyx-x86_64-linux
|
||||
ext: ""
|
||||
|
||||
- target: aarch64-unknown-linux-gnu
|
||||
container: messense/cargo-zigbuild:latest
|
||||
binary_name: zenyx-aarch64-linux
|
||||
ext: ""
|
||||
- target: aarch64-unknown-linux-gnu
|
||||
container: messense/cargo-zigbuild:latest
|
||||
binary_name: zenyx-aarch64-linux
|
||||
ext: ""
|
||||
|
||||
- target: universal2-apple-darwin
|
||||
container: messense/cargo-zigbuild:latest
|
||||
binary_name: zenyx-universal-macos
|
||||
ext: ""
|
||||
- target: universal2-apple-darwin
|
||||
container: messense/cargo-zigbuild:latest
|
||||
binary_name: zenyx-universal-macos
|
||||
ext: ""
|
||||
|
||||
- target: x86_64-pc-windows-msvc
|
||||
container: messense/cargo-xwin:latest
|
||||
binary_name: zenyx-x86_64-windows-msvc.exe
|
||||
ext: ".exe"
|
||||
- target: x86_64-pc-windows-msvc
|
||||
container: messense/cargo-xwin:latest
|
||||
binary_name: zenyx-x86_64-windows-msvc.exe
|
||||
ext: ".exe"
|
||||
|
||||
steps:
|
||||
- name: 📥 Checkout source
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
steps:
|
||||
- name: Ensure nodejs
|
||||
run: |
|
||||
apt-get -y install node
|
||||
- name: 📥 Checkout source
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
|
||||
- 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 }}-
|
||||
- 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 }}-
|
||||
|
||||
- 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
|
||||
- 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
|
||||
|
||||
- name: 🚀 Build project
|
||||
run: |
|
||||
cargo zigbuild --target ${{ matrix.target }} --release
|
||||
if: matrix.target != 'x86_64-pc-windows-msvc'
|
||||
- name: 🚀 Build project
|
||||
run: |
|
||||
cargo zigbuild --target ${{ matrix.target }} --release
|
||||
if: matrix.target != 'x86_64-pc-windows-msvc'
|
||||
|
||||
- name: 🚀 Build Windows project
|
||||
run: |
|
||||
cargo xwin build --target ${{ matrix.target }} --release
|
||||
if: matrix.target == 'x86_64-pc-windows-msvc'
|
||||
- name: 🚀 Build Windows project
|
||||
run: |
|
||||
cargo xwin build --target ${{ matrix.target }} --release
|
||||
if: matrix.target == 'x86_64-pc-windows-msvc'
|
||||
|
||||
- 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 }}
|
Loading…
Add table
Add a link
Reference in a new issue