run on linux arm64 #247
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 | |
| echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV | |
| - name: Build and Test | |
| run: | | |
| if [[ "${{ matrix.os }}" == "ubuntu-24.04" && "${{ matrix.arch }}" == "arm64" ]]; then | |
| # Run CI steps with cross-compilation for ARM64 | |
| just fmt | |
| git diff --exit-code | |
| just check | |
| cargo build --locked --target aarch64-unknown-linux-gnu | |
| # Note: Tests run natively (x86_64) since we're testing code logic, not target-specific behavior | |
| just test | |
| else | |
| # Standard CI for other platforms | |
| just ci | |
| fi |