Merge pull request #175 from rust-lang/feature/more-actions
Delete travis config, move tests to github actions.
This commit is contained in:
commit
081240a663
35
.github/workflows/ci.yml
vendored
35
.github/workflows/ci.yml
vendored
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
|
82
.travis.yml
82
.travis.yml
@ -1,82 +0,0 @@
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
language: rust
|
||||
rust:
|
||||
- nightly
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
# Linux (aarch64)
|
||||
- name: "aarch64-unknown-linux-gnu (neon)"
|
||||
os: linux
|
||||
arch: arm64
|
||||
|
||||
- name: "aarch64-unknown-linux-gnu (neon, sve)"
|
||||
os: linux
|
||||
arch: arm64
|
||||
env: RUSTFLAGS=-Ctarget-feature=+sve
|
||||
|
||||
- name: "aarch64-unknown-linux-gnu (native, see log for cfg)"
|
||||
os: linux
|
||||
arch: arm64
|
||||
env: RUSTFLAGS=-Ctarget-cpu=native
|
||||
|
||||
# Linux (powerpc64le)
|
||||
- name: "powerpc64le-unknown-linux-gnu (altivec, vsx, power8-*)"
|
||||
os: linux
|
||||
arch: ppc64le
|
||||
|
||||
- name: "powerpc64le-unknown-linux-gnu (native, see log for cfg)"
|
||||
os: linux
|
||||
arch: ppc64le
|
||||
env: RUSTFLAGS=-Ctarget-cpu=native
|
||||
|
||||
# Linux (x86_64) (for AVX512, which sadly seems to only *usually* be present
|
||||
# on the github actions linux runner...)
|
||||
- name: "x86_64-unknown-linux-gnu+avx512vl"
|
||||
os: linux
|
||||
arch: amd64
|
||||
env: RUSTFLAGS=-Ctarget-feature=+avx512vl
|
||||
|
||||
# WebAssembly (wasm-bindgen)
|
||||
- name: "wasm32-unknown-unknown (firefox)"
|
||||
os: linux
|
||||
arch: amd64
|
||||
addons:
|
||||
firefox: latest-nightly
|
||||
install:
|
||||
- curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||
script:
|
||||
- wasm-pack test --firefox --headless crates/core_simd
|
||||
- wasm-pack test --firefox --headless crates/core_simd --release
|
||||
|
||||
# FIXME: See https://github.com/rust-lang/stdsimd/issues/92
|
||||
# - name: "wasm32-unknown-unknown+simd128 (firefox)"
|
||||
# os: linux
|
||||
# arch: amd64
|
||||
# addons:
|
||||
# firefox: latest-nightly
|
||||
# install:
|
||||
# - curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||
# script:
|
||||
# - export RUSTFLAGS="-C target-feature=+simd128"
|
||||
# - wasm-pack test --firefox --headless crates/core_simd
|
||||
# - wasm-pack test --firefox --headless crates/core_simd --release
|
||||
|
||||
script:
|
||||
- echo "## Requested target configuration (RUSTFLAGS=$RUSTFLAGS)"
|
||||
- rustc --print=cfg $RUSTFLAGS
|
||||
|
||||
- echo "## Supported target configuration"
|
||||
- rustc --print=cfg -Ctarget-cpu=native
|
||||
|
||||
- echo "\n---\n"
|
||||
|
||||
- echo "## Running tests (debug)"
|
||||
- cargo test -v
|
||||
|
||||
- echo "## Running tests (release)"
|
||||
- cargo test -v --release
|
@ -119,7 +119,7 @@ pub fn convert<U>(self) -> Mask<U, LANES>
|
||||
// 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();
|
||||
}
|
||||
@ -136,7 +136,7 @@ pub fn convert<U>(self) -> Mask<U, LANES>
|
||||
// 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();
|
||||
}
|
||||
|
@ -86,6 +86,10 @@ fn roundtrip_bitmask_conversion() {
|
||||
|
||||
mod mask_api {
|
||||
test_mask_api! { i8 }
|
||||
test_mask_api! { i16 }
|
||||
test_mask_api! { i32 }
|
||||
test_mask_api! { i64 }
|
||||
test_mask_api! { isize }
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Loading…
Reference in New Issue
Block a user