Revert to cross on 64 for aarch64-musl #248
This file contains 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: Test | |
on: | |
push: | |
branches: | |
- '*' | |
tags-ignore: | |
- 'v*' | |
pull_request: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
# setup different OS and targets | |
# TODO: add musl+mimalloc-secure for linux builds to drop libc dependency | |
include: | |
- name: ubuntu_20_04-x86_64 | |
os: ubuntu-20.04 | |
target-cpu: x86-64 | |
target: x86_64-unknown-linux-gnu | |
- name: ubuntu_22_04-x86_64 | |
os: ubuntu-22.04 | |
target-cpu: x86-64 | |
target: x86_64-unknown-linux-gnu | |
- name: win-x86_64 | |
os: windows-2019 | |
target-cpu: x86-64 | |
target: x86_64-pc-windows-msvc | |
- name: osx_13-x86_64 | |
os: macos-13 | |
target-cpu: haswell | |
target: x86_64-apple-darwin | |
- name: osx_14-aarch64 | |
os: macos-14 | |
target-cpu: apple-m1 | |
target: aarch64-apple-darwin | |
- name: ubuntu_24-aarch64 | |
os: ubuntu-24-arm-32gb | |
target-cpu: generic | |
target: aarch64-unknown-linux-gnu | |
- name: win32 | |
os: windows-2019 | |
target: i686-pc-windows-msvc | |
cross: true | |
- name: x86_64-unknown-linux-musl | |
os: ubuntu-24.04 | |
target-cpu: x86-64 | |
target: x86_64-unknown-linux-musl | |
features: mimalloc | |
cross: 'true' | |
# - name: wasm32-unknown-emscripten | |
# os: ubuntu-24.04 | |
# target: wasm32-unknown-emscripten | |
- name: aarch64-unknown-linux-musl | |
os: ubuntu-24.04 # cross doesn't support ubuntu-24-arm-32gb | |
target-cpu: generic | |
target: aarch64-unknown-linux-musl | |
features: mimalloc | |
cross: 'true' | |
#todo target: aarch64-pc-windows-msvc | |
runs-on: ${{matrix.os}} | |
steps: | |
- run: rustup show | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{matrix.name}} | |
if: ${{ !contains(matrix.cross, 'true') }} | |
- uses: dtolnay/rust-toolchain@stable | |
# - name: Install win32 rust (i686-pc-windows-msvc) | |
# uses: dtolnay/rust-toolchain@stable | |
# with: | |
# target: i686-pc-windows-msvc | |
# if: ${{ contains(matrix.name, 'win32') }} | |
- run: rustup show | |
- name: Install NASM | |
uses: ./.github/actions/install-nasm | |
- name: Cross Test | |
uses: houseabsolute/actions-rust-cross@v1 | |
env: | |
RUSTFLAGS: "${{ matrix.cpu-target && format('-C target-cpu={0}',matrix.cpu-target) }}" | |
with: | |
command: "test" | |
target: ${{ matrix.target }} | |
toolchain: stable | |
args: | |
"--locked --release ${{ matrix.features && format('--features={0}',matrix.features) }}" | |
if: ${{ matrix.cross == 'true' }} | |
- name: Test | |
run: cargo test --all --locked --release ${{ matrix.features && format('--features={0}',matrix.features) }} | |
shell: bash | |
env: | |
RUSTFLAGS: "${{ matrix.cpu-target && format('-C target-cpu={0}',matrix.cpu-target) }}" | |
if: ${{ matrix.cross != 'true' }} | |