This commit is contained in:
Chance 2024-12-01 18:43:33 -05:00 committed by lily
parent 0b131ece0c
commit 22da21f0a1
Signed by: lily
GPG key ID: 601F3263FBCBC4B9

View file

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