Skip to content

Update CI configuration: change Windows OS version to 2022, restore a… #252

Update CI configuration: change Windows OS version to 2022, restore a…

Update CI configuration: change Windows OS version to 2022, restore a… #252

Workflow file for this run

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
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
features: neon
cross: 'true'
- name: win32
os: windows-2022
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'
# todo target: aarch64-pc-windows-msvc instead of in test_woa.yml (once an official image is released)
# todo: Someday rewrite imageflow for wasm32-unknown-emscripten
# todo: Won't pass tests due to https://github.com/NoXF/libwebp-sys/issues/36
- name: aarch64-unknown-linux-musl
os: ubuntu-24-arm-32gb # ubuntu-24.04 # cross doesn't support ubuntu-24-arm-32gb
target-cpu: generic
target: aarch64-unknown-linux-musl
features: mimalloc
cross: 'true'
runs-on: ${{matrix.os}}
steps:
- run: rustup show
- name: Checkout code
uses: actions/checkout@v4
# matrix item NOT using cross
- uses: Swatinem/rust-cache@v2
with:
key: ${{matrix.name}}
if: matrix.cross != 'true'
- uses: dtolnay/rust-toolchain@stable
if: matrix.cross != 'true'
- run: rustup show
- name: Install NASM
uses: ./.github/actions/install-nasm
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'
# matrix items USING CROSS
- name: Cross Test
uses: houseabsolute/actions-rust-cross@fix-running-on-arm-host
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'