Skip to content

build: expand targets for x64/x86 compatibility #591

build: expand targets for x64/x86 compatibility

build: expand targets for x64/x86 compatibility #591

Workflow file for this run

name: CI
on:
push:
pull_request:
branches:
- master
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [MSRV, stable, nightly, macos, win32, win64]
os: [ubuntu-latest, macos-latest, windows-latest]
target:
- x86_64-unknown-linux-gnu
- i686-unknown-linux-gnu
- x86_64-apple-darwin
- i686-pc-windows-msvc
- x86_64-pc-windows-msvc
include:
# Linux configurations
- build: MSRV # Minimum supported Rust version
os: ubuntu-latest
rust: 1.63.0
target: x86_64-unknown-linux-gnu
- build: MSRV # Minimum supported Rust version
os: ubuntu-latest
rust: 1.63.0
target: i686-unknown-linux-gnu
- build: stable
os: ubuntu-latest
rust: stable
target: x86_64-unknown-linux-gnu
- build: stable
os: ubuntu-latest
rust: stable
target: i686-unknown-linux-gnu
- build: nightly
os: ubuntu-latest
rust: nightly
target: x86_64-unknown-linux-gnu
- build: nightly
os: ubuntu-latest
rust: nightly
target: i686-unknown-linux-gnu
# macOS configuration
- build: macos
os: macos-latest
rust: stable
target: x86_64-apple-darwin
# Windows configurations
- build: win32
os: windows-latest
rust: stable
target: i686-pc-windows-msvc
- build: win64
os: windows-latest
rust: stable
target: x86_64-pc-windows-msvc
env:
CARGO_TARGET_DIR: ${{ github.workspace }}/target
steps:
- uses: actions/checkout@master
- name: Cache CARGO_HOME
uses: actions/cache@v1
with:
path: ~/.cargo
key: ${{ runner.os }}-cargo-home-${{ hashFiles('**/Cargo.toml') }}
restore-keys: ${{ runner.os }}-cargo-home
- name: Install Rust
shell: bash
run: |
curl -sSL https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain=none
export PATH="$HOME/.cargo/bin:$PATH"
rustup override set ${{ matrix.rust }}
rustup target add ${{ matrix.target }}
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: rustfmt
shell: bash
if: runner.os == 'Linux' && matrix.rust == 'stable'
run: |
rustup component add rustfmt
cargo fmt -- --check
- run: cargo build --target ${{ matrix.target }}
- run: cargo build --all-targets --target ${{ matrix.target }}
# FIXME: Looks like fuzzer cannot be run on Windows
- if: runner.os == 'Linux'
run: cargo build --manifest-path=fuzz/Cargo.toml --target ${{ matrix.target }}
- run: cargo test --target ${{ matrix.target }}
- run: make api