feat(ci): add universal macOS build support
This commit is contained in:
parent
d63645fa6b
commit
b23f5794fc
1 changed files with 22 additions and 6 deletions
|
@ -44,7 +44,7 @@ jobs:
|
||||||
|
|
||||||
cargo-test:
|
cargo-test:
|
||||||
name: 🧪 Run Cargo Tests
|
name: 🧪 Run Cargo Tests
|
||||||
needs: [setup]
|
needs: setup
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: 📥 Checkout source
|
- name: 📥 Checkout source
|
||||||
|
@ -52,6 +52,7 @@ jobs:
|
||||||
|
|
||||||
- name: 🗄️ Restore Cargo cache
|
- name: 🗄️ Restore Cargo cache
|
||||||
uses: https://github.com/actions/cache@v4
|
uses: https://github.com/actions/cache@v4
|
||||||
|
id: restore-cargo-cache
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/registry
|
~/.cargo/registry
|
||||||
|
@ -76,7 +77,7 @@ jobs:
|
||||||
|
|
||||||
|
|
||||||
- name: 🚀 Run tests
|
- name: 🚀 Run tests
|
||||||
uses: https://github.com/actions-rs/cargo@v1
|
uses: https://github.com/actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: test
|
command: test
|
||||||
args: --release --all
|
args: --release --all
|
||||||
|
@ -92,6 +93,8 @@ jobs:
|
||||||
- x86_64-unknown-linux-gnu
|
- x86_64-unknown-linux-gnu
|
||||||
- aarch64-unknown-linux-gnu
|
- aarch64-unknown-linux-gnu
|
||||||
- x86_64-pc-windows-msvc
|
- x86_64-pc-windows-msvc
|
||||||
|
- aarch64-pc-windows-msvc
|
||||||
|
- universal2-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
|
||||||
|
@ -104,10 +107,20 @@ jobs:
|
||||||
command: zigbuild
|
command: zigbuild
|
||||||
args: --target aarch64-unknown-linux-gnu --release
|
args: --target aarch64-unknown-linux-gnu --release
|
||||||
- target: x86_64-pc-windows-msvc
|
- target: x86_64-pc-windows-msvc
|
||||||
binary_name: zenyx-x86_64-windows-msvc
|
binary_name: zenyx-x86_64-windows
|
||||||
ext: ".exe"
|
ext: ".exe"
|
||||||
command: xwin
|
command: xwin
|
||||||
args: build --target x86_64-pc-windows-msvc --release
|
args: build --target x86_64-pc-windows-msvc --release
|
||||||
|
- target: aarch64-pc-windows-msvc
|
||||||
|
binary_name: zenyx-aarch64-windows
|
||||||
|
ext: ".exe"
|
||||||
|
command: xwin
|
||||||
|
args: build --target aarch64-pc-windows-msvc --release
|
||||||
|
- target: universal2-apple-darwin
|
||||||
|
binary_name: zenyx-universal-macos
|
||||||
|
ext: ""
|
||||||
|
command: zigbuild
|
||||||
|
args: --target universal2-apple-darwin --release
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 📥 Checkout source
|
- name: 📥 Checkout source
|
||||||
|
@ -115,6 +128,7 @@ jobs:
|
||||||
|
|
||||||
- name: 🗄️ Restore tool cache
|
- name: 🗄️ Restore tool cache
|
||||||
uses: https://github.com/actions/cache@v4
|
uses: https://github.com/actions/cache@v4
|
||||||
|
id: restore-tools-cache
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin
|
~/.cargo/bin
|
||||||
|
@ -136,6 +150,7 @@ jobs:
|
||||||
|
|
||||||
- name: 🗄️ Restore Cargo cache
|
- name: 🗄️ Restore Cargo cache
|
||||||
uses: https://github.com/actions/cache@v4
|
uses: https://github.com/actions/cache@v4
|
||||||
|
id: restore-cargo-cache
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/registry
|
~/.cargo/registry
|
||||||
|
@ -163,5 +178,6 @@ jobs:
|
||||||
- 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 }}.zip
|
name: ${{ matrix.binary_name }}${{ matrix.ext }}
|
||||||
path: artifacts
|
path: artifacts/${{ matrix.binary_name }}${{ matrix.ext }}
|
||||||
|
if-no-files-found: error
|
Loading…
Add table
Add a link
Reference in a new issue