Added i16 widening mul since this is implemented badly on some platfo… #443
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: Rust | |
on: | |
push: {} | |
pull_request: {} | |
jobs: | |
build_test: | |
runs-on: ${{ matrix.rust.os }} | |
strategy: | |
matrix: | |
rust: | |
# x86 without sse/sse2 on by default | |
- { target: i586-pc-windows-msvc, toolchain: 1.56.0, os: windows-latest } | |
- { target: i586-pc-windows-msvc, toolchain: stable, os: windows-latest } | |
- { target: i586-pc-windows-msvc, toolchain: beta, os: windows-latest } | |
- { target: i586-pc-windows-msvc, toolchain: nightly, os: windows-latest } | |
# x86 | |
- { target: i686-pc-windows-msvc, toolchain: 1.56.0, os: windows-latest } | |
- { target: i686-pc-windows-msvc, toolchain: stable, os: windows-latest } | |
- { target: i686-pc-windows-msvc, toolchain: beta, os: windows-latest } | |
- { target: i686-pc-windows-msvc, toolchain: nightly, os: windows-latest } | |
# x86_64 | |
- { target: x86_64-pc-windows-msvc, toolchain: 1.56.0, os: windows-latest } | |
- { target: x86_64-pc-windows-msvc, toolchain: stable, os: windows-latest } | |
- { target: x86_64-pc-windows-msvc, toolchain: beta, os: windows-latest } | |
- { target: x86_64-pc-windows-msvc, toolchain: nightly, os: windows-latest } | |
# wasm32 | |
- { target: wasm32-wasi, toolchain: 1.56.0, os: ubuntu-latest, wasmtime: v5.0.0 } | |
- { target: wasm32-wasi, toolchain: stable, os: ubuntu-latest, wasmtime: v5.0.0 } | |
- { target: wasm32-wasi, toolchain: beta, os: ubuntu-latest, wasmtime: v5.0.0 } | |
- { target: wasm32-wasi, toolchain: nightly, os: ubuntu-latest, wasmtime: v5.0.0 } | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust.toolchain }} | |
target: ${{ matrix.rust.target }} | |
profile: minimal | |
default: true | |
- name: Install wasmtime | |
if: matrix.rust.target == 'wasm32-wasi' | |
run: | | |
curl https://wasmtime.dev/install.sh -sSf | bash -s -- --version ${{ matrix.rust.wasmtime }} | |
echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH | |
- name: Build the crate | |
run: cargo build --target ${{ matrix.rust.target }} | |
- name: Test with default CPU features + No Default Cargo Features | |
if: matrix.rust.target == 'i586-pc-windows-msvc' || matrix.rust.target == 'i686-pc-windows-msvc' || matrix.rust.target == 'x86_64-pc-windows-msvc' || matrix.rust.target == 'wasm32-wasi' | |
env: | |
CARGO_TARGET_WASM32_WASI_RUNNER: wasmtime run --wasm-features all --dir . | |
run: cargo test --target ${{ matrix.rust.target }} --no-default-features | |
- name: Test with default CPU features + All Cargo Features | |
if: matrix.rust.target == 'i586-pc-windows-msvc' || matrix.rust.target == 'i686-pc-windows-msvc' || matrix.rust.target == 'x86_64-pc-windows-msvc' || matrix.rust.target == 'wasm32-wasi' | |
env: | |
CARGO_TARGET_WASM32_WASI_RUNNER: wasmtime run --wasm-features all --dir . | |
run: cargo test --target ${{ matrix.rust.target }} --all-features | |
- name: switch over to native cpu features | |
run: mv .cargo-ci .cargo | |
- name: Test with 'native' CPU features + No Default Cargo Features | |
if: matrix.rust.target == 'i586-pc-windows-msvc' || matrix.rust.target == 'i686-pc-windows-msvc' || matrix.rust.target == 'x86_64-pc-windows-msvc' || matrix.rust.target == 'wasm32-wasi' | |
run: cargo test --target ${{ matrix.rust.target }} --no-default-features | |
- name: Test with 'native' CPU features + All Cargo Features | |
if: matrix.rust.target == 'i586-pc-windows-msvc' || matrix.rust.target == 'i686-pc-windows-msvc' || matrix.rust.target == 'x86_64-pc-windows-msvc' || matrix.rust.target == 'wasm32-wasi' | |
run: cargo test --target ${{ matrix.rust.target }} --all-features | |
cross_compile_aarch64: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: [1.59,stable,nightly] | |
features: ["", "std"] | |
steps: | |
- name: Installing emulator and linker | |
run: | | |
sudo apt-get update | |
sudo apt-get install qemu binfmt-support qemu-user-static gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu | |
- name: Installing Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
override: true | |
toolchain: ${{ matrix.rust }} | |
target: aarch64-unknown-linux-musl | |
- uses: actions/checkout@v2 | |
- name: build | |
run: > | |
cargo build --verbose --no-default-features --target aarch64-unknown-linux-musl --features "$FEATURES" | |
env: | |
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER: aarch64-linux-gnu-gcc | |
- name: test | |
run: > | |
cargo test --tests --benches --no-default-features --target aarch64-unknown-linux-musl --features "$FEATURES" | |
env: | |
FEATURES: ${{ matrix.features }} | |
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER: aarch64-linux-gnu-gcc |