seperate jobs
This commit is contained in:
parent
019ba263a9
commit
3f0da1b539
1 changed files with 64 additions and 14 deletions
78
.github/workflows/rust.yml
vendored
78
.github/workflows/rust.yml
vendored
|
@ -1,4 +1,4 @@
|
||||||
name: Rust
|
name: Compile & test Zenyx ⚡
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -36,20 +36,21 @@ jobs:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- name: 📥 Clone repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install cross-compilation dependencies (Ubuntu)
|
- name: 🛠️ Install cross-compilation dependencies (Ubuntu🐧)
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu qemu-user
|
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu qemu-user
|
||||||
|
|
||||||
- name: Install cross-compilation dependencies (macOS)
|
- name: 🛠️ Install cross-compilation dependencies (macOS🍎)
|
||||||
if: runner.os == 'macOS'
|
if: runner.os == 'macOS'
|
||||||
run: |
|
run: |
|
||||||
brew install FiloSottile/musl-cross/musl-cross
|
brew install FiloSottile/musl-cross/musl-cross
|
||||||
|
|
||||||
- name: Install Rust
|
- name: 🦀 Install Rust
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
|
@ -57,25 +58,74 @@ jobs:
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
profile: minimal
|
profile: minimal
|
||||||
|
|
||||||
- name: Build
|
- name: 🏗️ Build
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
args: --release --target ${{ matrix.target }}
|
args: --release --target ${{ matrix.target }}
|
||||||
env:
|
env:
|
||||||
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
|
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
|
||||||
|
|
||||||
|
- name: 📦 Upload artifacts
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: Zenyx-${{ runner.os }}-${{ matrix.arch }}-binary
|
||||||
|
path: target/${{ matrix.target }}/release/zenyx*
|
||||||
|
|
||||||
|
test:
|
||||||
|
needs: build
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
arch: [x86_64, aarch64]
|
||||||
|
include:
|
||||||
|
- arch: x86_64
|
||||||
|
target: x86_64-unknown-linux-gnu
|
||||||
|
- os: macos-latest
|
||||||
|
arch: x86_64
|
||||||
|
target: x86_64-apple-darwin
|
||||||
|
- arch: aarch64
|
||||||
|
target: aarch64-unknown-linux-gnu
|
||||||
|
- os: macos-latest
|
||||||
|
arch: aarch64
|
||||||
|
target: aarch64-apple-darwin
|
||||||
|
- os: windows-latest
|
||||||
|
arch: x86_64
|
||||||
|
target: x86_64-pc-windows-msvc
|
||||||
|
exclude:
|
||||||
|
- os: windows-latest
|
||||||
|
arch: aarch64
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: 📥 Clone repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: 🛠️ Install cross-compilation dependencies (Ubuntu🐧)
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu qemu-user
|
||||||
|
|
||||||
|
- name: 🛠️ Install cross-compilation dependencies (macOS🍎)
|
||||||
|
if: runner.os == 'macOS'
|
||||||
|
run: |
|
||||||
|
brew install FiloSottile/musl-cross/musl-cross
|
||||||
|
|
||||||
|
- name: 🦀 Install Rust
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
target: ${{ matrix.target }}
|
||||||
|
profile: minimal
|
||||||
|
|
||||||
- name: Run tests
|
- name: 🧪 Run tests
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: test
|
command: test
|
||||||
args: --verbose --target ${{ matrix.target }}
|
args: --verbose --target ${{ matrix.target }}
|
||||||
env:
|
env:
|
||||||
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
|
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
|
||||||
QEMU_LD_PREFIX: /usr/aarch64-linux-gnu
|
QEMU_LD_PREFIX: /usr/aarch64-linux-gnu
|
||||||
|
|
||||||
- name: Upload artifacts
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: Zenyx-${{ runner.os }}-${{ matrix.arch }}-binary
|
|
||||||
path: target/${{ matrix.target }}/release/zenyx*
|
|
Loading…
Add table
Add a link
Reference in a new issue