run on linux arm64 #255
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| - pull_request | |
| jobs: | |
| build: | |
| name: Build | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-22.04 | |
| arch: amd64 | |
| - os: ubuntu-24.04 | |
| arch: amd64 | |
| - os: ubuntu-24.04 | |
| arch: arm64 | |
| - os: windows-2022 | |
| arch: x64 | |
| - os: macos-13 | |
| arch: x64 | |
| - os: macos-14 | |
| arch: arm64 | |
| runs-on: ${{ (matrix.arch == 'arm64' && matrix.os == 'macos-14') && 'macos-14' || matrix.os }} | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v1 | |
| - name: Install Rust toolchain | |
| run: | | |
| rustup update | |
| rustup show | |
| - name: install Just | |
| uses: extractions/setup-just@v1 | |
| with: | |
| just-version: 1.14.0 | |
| - name: Setup cross-compilation for ARM64 Linux | |
| if: matrix.os == 'ubuntu-24.04' && matrix.arch == 'arm64' | |
| run: | | |
| rustup target add aarch64-unknown-linux-gnu | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-aarch64-linux-gnu pkg-config | |
| echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV | |
| echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV | |
| - name: Build and Test (ARM64 Linux Cross-Compilation) | |
| if: matrix.os == 'ubuntu-24.04' && matrix.arch == 'arm64' | |
| run: | | |
| just fmt | |
| git diff --exit-code | |
| just check | |
| cargo build --locked --target aarch64-unknown-linux-gnu | |
| just test | |
| - name: Build and Test (Standard) | |
| if: matrix.os != 'ubuntu-24.04' || matrix.arch != 'arm64' | |
| run: just ci |