Skip to content

Delete travis config, move tests to github actions. #175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 33 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ jobs:
- { target: i586-pc-windows-msvc, target_feature: +sse2, os: windows-latest }

# Annoyingly, the x86_64-unknown-linux-gnu runner *almost* always has
# avx512vl, but occasionally doesn't. As a result, we still run that
# one under travis.
# avx512vl, but occasionally doesn't. Maybe one day we can enable it.

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -141,6 +140,31 @@ jobs:
- name: Test (release)
run: cargo test --verbose --target=${{ matrix.target }} --release

wasm-tests:
name: "wasm (firefox, ${{ matrix.name }})"
runs-on: ubuntu-latest
strategy:
matrix:
include:
- { name: default, RUSTFLAGS: "" }
- { name: simd128, RUSTFLAGS: "-C target-feature=+simd128" }
steps:
- uses: actions/checkout@v2
- name: Setup Rust
run: |
rustup update nightly --no-self-update
rustup default nightly
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Test (debug)
run: wasm-pack test --firefox --headless crates/core_simd
env:
RUSTFLAGS: ${{ matrix.rustflags }}
- name: Test (release)
run: wasm-pack test --firefox --headless crates/core_simd --release
env:
RUSTFLAGS: ${{ matrix.rustflags }}

cross-tests:
name: "${{ matrix.target }} (via cross)"
runs-on: ubuntu-latest
Expand All @@ -163,12 +187,19 @@ jobs:
# 32-bit arm has a few idiosyncracies like having subnormal flushing
# to zero on by default. Ideally we'd set
- armv7-unknown-linux-gnueabihf
- aarch64-unknown-linux-gnu
# Note: The issue above means neither of these mips targets will use
# MSA (mips simd) but MIPS uses a nonstandard binary representation
# for NaNs which makes it worth testing on despite that.
- mips-unknown-linux-gnu
- mips64-unknown-linux-gnuabi64
- riscv64gc-unknown-linux-gnu
# TODO this test works, but it appears to time out
# - powerpc-unknown-linux-gnu
# TODO this test is broken, but it appears to be a problem with QEMU, not us.
# - powerpc64le-unknown-linux-gnu
# TODO enable this once a new version of cross is released
# - powerpc64-unknown-linux-gnu

steps:
- uses: actions/checkout@v2
Expand Down
82 changes: 0 additions & 82 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions crates/core_simd/src/masks/full_masks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ where
// There is a bug where LLVM appears to implement this operation with the wrong
// bit order.
// TODO fix this in a better way
if cfg!(any(target_arch = "mips", target_arch = "mips64")) {
if cfg!(target_endian = "big") {
for x in bitmask.as_mut() {
*x = x.reverse_bits();
}
Expand All @@ -136,7 +136,7 @@ where
// There is a bug where LLVM appears to implement this operation with the wrong
// bit order.
// TODO fix this in a better way
if cfg!(any(target_arch = "mips", target_arch = "mips64")) {
if cfg!(target_endian = "big") {
for x in bitmask.as_mut() {
*x = x.reverse_bits();
}
Expand Down
4 changes: 4 additions & 0 deletions crates/core_simd/tests/masks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ macro_rules! test_mask_api {

mod mask_api {
test_mask_api! { i8 }
test_mask_api! { i16 }
test_mask_api! { i32 }
test_mask_api! { i64 }
test_mask_api! { isize }
}

#[test]
Expand Down