This commit is contained in:
Chance 2024-12-01 18:43:33 -05:00 committed by BitSyndicate
parent eadf44efd9
commit bd4870cbdd
Signed by: bitsyndicate
GPG key ID: 443E4198D6BBA6DE

View file

@ -13,21 +13,14 @@ jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
arch: [x86_64, aarch64]
exclude:
- os: ubuntu-latest
arch: aarch64
os: [ubuntu-latest, windows-latest, macos-latest]
arch: [x86_64]
include:
- os: ubuntu-latest
arch: x86_64
- arch: x86_64
target: x86_64-unknown-linux-gnu
- os: windows-latest
- os: macos-latest
arch: x86_64
target: x86_64-pc-windows-gnu
- os: windows-latest
arch: aarch64
target: aarch64-pc-windows-gnu
target: x86_64-apple-darwin
runs-on: ${{ matrix.os }}
steps:
@ -40,25 +33,16 @@ jobs:
override: true
target: ${{ matrix.target }}
- name: Install cross-compilation tools
if: matrix.arch == 'aarch64' && matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
- name: Build
run: cargo build --release --target ${{ matrix.target }}
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
- name: Run tests
if: matrix.arch != 'aarch64'
run: cargo test --verbose --target ${{ matrix.target }}
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: Zenyx-${{ matrix.os == 'windows-latest' && 'windows' || 'linux' }}-${{ matrix.arch }}-binary
path: target/${{ matrix.target }}/release/${{ matrix.os == 'windows-latest' && '*.exe' || '*[^.]*' }}
name: Zenyx-${{ runner.os }}-${{ matrix.arch }}-binary
path: |
target/${{ matrix.target }}/release/*.exe
target/${{ matrix.target }}/release/*[^.]*