Skip to content

Implement cross compile to validate i686 in addition to x86_64 tests. #1113

Implement cross compile to validate i686 in addition to x86_64 tests.

Implement cross compile to validate i686 in addition to x86_64 tests. #1113

Workflow file for this run

name: Build and run tests
on:
push:
branches: [ main ]
paths:
- '**.rs'
- '**/Cargo.*'
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: build ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- { target: i686-unknown-linux-gnu }
- { target: x86_64-unknown-linux-gnu }
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install cross
uses: taiki-e/install-action@v2
with:
tool: cross
- name: Build
run: cross build --verbose --target=${{ matrix.target }}
- name: Check jaq-core without default features
working-directory: jaq-core
run: cross check --no-default-features --target=${{ matrix.target }}
- name: Check jaq-std without default features
working-directory: jaq-std
run: cross check --no-default-features --target=${{ matrix.target }}
- name: Check jaq-json without default features
working-directory: jaq-json
run: cross check --no-default-features --target=${{ matrix.target }}
- name: Clippy
run: cross clippy -- -Dwarnings --target=${{ matrix.target }}
- name: Run tests
run: cross test --verbose --target=${{ matrix.target }}