feat(ci): full macOS support for nix workflow
Some checks failed
Build Zenyx ⚡ / 🧪 Run Cargo Tests (push) Successful in 5m59s
Build Zenyx ⚡ / 🏗️ Build aarch64-apple-darwin (push) Failing after 9m22s
Build Zenyx ⚡ / 🏗️ Build x86_64-apple-darwin (push) Failing after 10m7s
Build Zenyx ⚡ / 🏗️ Build aarch64-unknown-linux-gnu (push) Successful in 10m31s
Build Zenyx ⚡ / 🏗️ Build aarch64-pc-windows-msvc (push) Successful in 10m48s
Build Zenyx ⚡ / 🏗️ Build x86_64-pc-windows-msvc (push) Successful in 7m22s
Build Zenyx ⚡ / 🏗️ Build x86_64-unknown-linux-gnu (push) Successful in 6m48s
Some checks failed
Build Zenyx ⚡ / 🧪 Run Cargo Tests (push) Successful in 5m59s
Build Zenyx ⚡ / 🏗️ Build aarch64-apple-darwin (push) Failing after 9m22s
Build Zenyx ⚡ / 🏗️ Build x86_64-apple-darwin (push) Failing after 10m7s
Build Zenyx ⚡ / 🏗️ Build aarch64-unknown-linux-gnu (push) Successful in 10m31s
Build Zenyx ⚡ / 🏗️ Build aarch64-pc-windows-msvc (push) Successful in 10m48s
Build Zenyx ⚡ / 🏗️ Build x86_64-pc-windows-msvc (push) Successful in 7m22s
Build Zenyx ⚡ / 🏗️ Build x86_64-unknown-linux-gnu (push) Successful in 6m48s
This commit is contained in:
parent
b36cfb18d3
commit
ef0c66efa5
2 changed files with 34 additions and 218 deletions
|
@ -1,80 +0,0 @@
|
||||||
name: Build Zenyx ⚡
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
types: [opened, synchronize, reopened]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
cargo-test:
|
|
||||||
name: 🧪 Run Cargo Tests
|
|
||||||
runs-on: nixos-latest
|
|
||||||
steps:
|
|
||||||
- name: 📥 Checkout source
|
|
||||||
uses: https://github.com/actions/checkout@v4
|
|
||||||
|
|
||||||
- name: 🚀 Setup & Run tests
|
|
||||||
run: |
|
|
||||||
nix-shell --run "
|
|
||||||
git-lfs fetch
|
|
||||||
git-lfs pull
|
|
||||||
cargo test --release --all
|
|
||||||
"
|
|
||||||
|
|
||||||
build:
|
|
||||||
name: 🏗️ Build ${{ matrix.target }}
|
|
||||||
needs: [cargo-test]
|
|
||||||
runs-on: nixos-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
target:
|
|
||||||
- x86_64-unknown-linux-gnu
|
|
||||||
- aarch64-unknown-linux-gnu
|
|
||||||
- x86_64-pc-windows-msvc
|
|
||||||
- aarch64-pc-windows-msvc
|
|
||||||
include:
|
|
||||||
- target: x86_64-unknown-linux-gnu
|
|
||||||
binary_name: zenyx-x86_64-linux
|
|
||||||
ext: ""
|
|
||||||
command: zigbuild
|
|
||||||
args: --target x86_64-unknown-linux-gnu --release
|
|
||||||
- target: aarch64-unknown-linux-gnu
|
|
||||||
binary_name: zenyx-aarch64-linux
|
|
||||||
ext: ""
|
|
||||||
command: zigbuild
|
|
||||||
args: --target aarch64-unknown-linux-gnu --release
|
|
||||||
- target: x86_64-pc-windows-msvc
|
|
||||||
binary_name: zenyx-x86_64-windows
|
|
||||||
ext: ".exe"
|
|
||||||
command: xwin build
|
|
||||||
args: --target x86_64-pc-windows-msvc --release
|
|
||||||
- target: aarch64-pc-windows-msvc
|
|
||||||
binary_name: zenyx-aarch64-windows
|
|
||||||
ext: ".exe"
|
|
||||||
command: xwin build
|
|
||||||
args: --target aarch64-pc-windows-msvc --release
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 📥 Checkout source
|
|
||||||
uses: https://github.com/actions/checkout@v4
|
|
||||||
|
|
||||||
- name: 🚀 Install Target & Build release binary
|
|
||||||
run: |
|
|
||||||
nix-shell --run "
|
|
||||||
git-lfs fetch --all
|
|
||||||
git-lfs pull
|
|
||||||
cargo ${{ matrix.command }} ${{ matrix.args }}
|
|
||||||
"
|
|
||||||
|
|
||||||
- name: 📦 Package artifact
|
|
||||||
run: |
|
|
||||||
mkdir -p artifacts
|
|
||||||
cp target/${{ matrix.target }}/release/zenyx${{ matrix.ext }} artifacts/${{ matrix.binary_name }}${{ matrix.ext }}
|
|
||||||
|
|
||||||
- name: ⬆️ Upload artifact
|
|
||||||
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: ${{ matrix.binary_name }}${{ matrix.ext }}
|
|
||||||
path: artifacts/${{ matrix.binary_name }}${{ matrix.ext }}
|
|
||||||
if-no-files-found: error
|
|
|
@ -4,104 +4,37 @@ on:
|
||||||
push:
|
push:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize, reopened]
|
types: [opened, synchronize, reopened]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
setup:
|
|
||||||
name: 🔧 Setup Environment
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
cache-hit: ${{ steps.cache-tools.outputs.cache-hit }}
|
|
||||||
steps:
|
|
||||||
- name: 📥 Checkout source
|
|
||||||
uses: https://github.com/actions/checkout@v4
|
|
||||||
|
|
||||||
- name: 🗄️ Cache tools
|
|
||||||
uses: https://github.com/actions/cache@v4
|
|
||||||
id: cache-tools
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/bin
|
|
||||||
/tmp/zig
|
|
||||||
key: cargo-tools-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
cargo-tools-
|
|
||||||
|
|
||||||
- name: 🦀 Install Rust toolchain
|
|
||||||
if: steps.cache-tools.outputs.cache-hit != 'true'
|
|
||||||
uses: https://github.com/actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
components: rust-src
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: 📦 Install Build Tools
|
|
||||||
if: steps.cache-tools.outputs.cache-hit != 'true'
|
|
||||||
run: |
|
|
||||||
mkdir -p /tmp/zig
|
|
||||||
cd /tmp/zig
|
|
||||||
curl -Lo zig-linux-x86_64.tar.xz https://ziglang.org/builds/zig-linux-x86_64-0.15.0-dev.377+f01833e03.tar.xz
|
|
||||||
tar -Jxf zig-linux-x86_64.tar.xz -C /tmp/zig --strip-components=1
|
|
||||||
cargo install cargo-zigbuild cargo-xwin --force
|
|
||||||
|
|
||||||
cargo-test:
|
cargo-test:
|
||||||
name: 🧪 Run Cargo Tests
|
name: 🧪 Run Cargo Tests
|
||||||
needs: setup
|
runs-on: nixos-latest
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: 📥 Checkout source
|
- name: 📥 Checkout source
|
||||||
uses: https://github.com/actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
|
|
||||||
- name: 📦 fetch Git LFS files
|
- name: 🚀 Setup & Run tests
|
||||||
run: |
|
run: |
|
||||||
apt update
|
nix-shell --run "
|
||||||
apt install -y git-lfs
|
git-lfs fetch
|
||||||
git-lfs fetch --all
|
|
||||||
git-lfs pull
|
git-lfs pull
|
||||||
|
cargo test --release --all
|
||||||
- name: 🗄️ Restore Cargo cache
|
"
|
||||||
uses: https://github.com/actions/cache@v4
|
|
||||||
id: restore-cargo-cache
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
cargo-
|
|
||||||
|
|
||||||
- name: 🦀 Install Rust toolchain
|
|
||||||
uses: https://github.com/actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
components: rust-src
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: 🌋 Install Vulkan tools
|
|
||||||
run: |
|
|
||||||
apt update
|
|
||||||
apt install -y vulkan-tools glslc
|
|
||||||
|
|
||||||
|
|
||||||
- name: 🚀 Run tests
|
|
||||||
uses: https://github.com/actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --release --all
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: 🏗️ Build ${{ matrix.target }}
|
name: 🏗️ Build ${{ matrix.target }}
|
||||||
needs: [setup, cargo-test]
|
needs: [cargo-test]
|
||||||
runs-on: ubuntu-latest
|
runs-on: nixos-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
target:
|
target:
|
||||||
- x86_64-unknown-linux-gnu
|
- x86_64-unknown-linux-gnu
|
||||||
- aarch64-unknown-linux-gnu
|
|
||||||
- x86_64-pc-windows-msvc
|
- x86_64-pc-windows-msvc
|
||||||
|
- x86_64-apple-darwin
|
||||||
|
- aarch64-unknown-linux-gnu
|
||||||
- aarch64-pc-windows-msvc
|
- aarch64-pc-windows-msvc
|
||||||
- universal2-apple-darwin
|
- aarch64-apple-darwin
|
||||||
include:
|
include:
|
||||||
- target: x86_64-unknown-linux-gnu
|
- target: x86_64-unknown-linux-gnu
|
||||||
binary_name: zenyx-x86_64-linux
|
binary_name: zenyx-x86_64-linux
|
||||||
|
@ -116,82 +49,45 @@ jobs:
|
||||||
- target: x86_64-pc-windows-msvc
|
- target: x86_64-pc-windows-msvc
|
||||||
binary_name: zenyx-x86_64-windows
|
binary_name: zenyx-x86_64-windows
|
||||||
ext: ".exe"
|
ext: ".exe"
|
||||||
command: xwin
|
command: xwin build
|
||||||
args: build --target x86_64-pc-windows-msvc --release
|
args: --target x86_64-pc-windows-msvc --release
|
||||||
- target: aarch64-pc-windows-msvc
|
- target: aarch64-pc-windows-msvc
|
||||||
binary_name: zenyx-aarch64-windows
|
binary_name: zenyx-aarch64-windows
|
||||||
ext: ".exe"
|
ext: ".exe"
|
||||||
command: xwin
|
command: xwin build
|
||||||
args: build --target aarch64-pc-windows-msvc --release
|
args: --target aarch64-pc-windows-msvc --release
|
||||||
- target: universal2-apple-darwin
|
- target: x86_64-apple-darwin
|
||||||
binary_name: zenyx-universal-macos
|
binary_name: zenyx-x86_64-macos
|
||||||
ext: ""
|
ext: ""
|
||||||
command: zigbuild
|
command: zigbuild
|
||||||
args: --target universal2-apple-darwin --release
|
args: --target x86_64-apple-darwin --release
|
||||||
|
- target: aarch64-apple-darwin
|
||||||
|
binary_name: zenyx-aarch64-macos
|
||||||
|
ext: ""
|
||||||
|
command: zigbuild
|
||||||
|
args: --target aarch64-apple-darwin --release
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 📥 Checkout source
|
- name: 📥 Checkout source
|
||||||
uses: https://github.com/actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
|
|
||||||
- name: 📦 fetch Git LFS files
|
- name: 🚀 Install Target & Build release binary
|
||||||
run: |
|
run: |
|
||||||
apt update
|
nix-shell --run "
|
||||||
apt install -y git-lfs
|
|
||||||
git-lfs fetch --all
|
git-lfs fetch --all
|
||||||
git-lfs pull
|
git-lfs pull
|
||||||
|
cargo ${{ matrix.command }} ${{ matrix.args }}
|
||||||
- name: 🗄️ Restore tool cache
|
"
|
||||||
uses: https://github.com/actions/cache@v4
|
|
||||||
id: restore-tools-cache
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/bin
|
|
||||||
/tmp/zig
|
|
||||||
key: cargo-tools-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
cargo-tools-
|
|
||||||
|
|
||||||
|
|
||||||
- name: 📍 Add Zig to PATH
|
|
||||||
run: echo "/tmp/zig" >> $GITHUB_PATH
|
|
||||||
|
|
||||||
- name: 🎯 Install Rust target
|
|
||||||
uses: https://github.com/actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
target: ${{ matrix.target }}
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: 🗄️ Restore Cargo cache
|
|
||||||
uses: https://github.com/actions/cache@v4
|
|
||||||
id: restore-cargo-cache
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
cargo-
|
|
||||||
- name: 🌋 Install Vulkan tools
|
|
||||||
run: |
|
|
||||||
apt update
|
|
||||||
apt install -y vulkan-tools glslc
|
|
||||||
|
|
||||||
- name: 🚀 Build release binary
|
|
||||||
uses: https://github.com/actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: ${{ matrix.command }}
|
|
||||||
args: ${{ matrix.args }}
|
|
||||||
|
|
||||||
- name: 📦 Package artifact
|
- name: 📦 Package artifact
|
||||||
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 }}${{ matrix.ext }}
|
||||||
|
|
||||||
- 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 }}${{ matrix.ext }}
|
name: ${{ matrix.binary_name }}${{ matrix.ext }}.zip
|
||||||
path: artifacts/${{ matrix.binary_name }}${{ matrix.ext }}
|
path: artifacts/${{ matrix.binary_name }}${{ matrix.ext }}
|
||||||
|
compression-level: 9
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
Loading…
Add table
Add a link
Reference in a new issue