Wasm simd128 #153
Workflow file for this run
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: | |
branches: | |
- master | |
paths: | |
- '.github/workflows/rust.yml' | |
- 'src/**.rs' | |
- 'tests/**' | |
- 'Cargo.toml' | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
branches: | |
- '**' | |
paths: | |
- '.github/workflows/rust.yml' | |
- 'src/**.rs' | |
- 'tests/**' | |
- 'Cargo.toml' | |
jobs: | |
full-test: | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.draft == false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust Unix | |
run: | | |
if rustup --version >/dev/null 2>&1; then | |
rustup update | |
else | |
curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain stable | |
echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
fi | |
#- name: Install Miri | |
# run: | | |
# rustup toolchain install nightly | |
# rustup +nightly component add miri | |
- name: Install Valgrind | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y valgrind | |
- name: Rust version | |
run: | | |
cargo --version | |
rustc --version | |
- name: Check build | |
run: cargo check --features xxh32,const_xxh32,xxh64,const_xxh64,xxh3,const_xxh3 | |
- name: Test | |
run: cargo test --features xxh32,const_xxh32,xxh64,const_xxh64,xxh3,const_xxh3 | |
- name: Valgrind Test | |
env: | |
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: "valgrind --leak-check=full --error-exitcode=1" | |
run: cargo test --release --features xxh32,const_xxh32,xxh64,const_xxh64,xxh3,const_xxh3 | |
- name: Valgrind Test(No SSE2) | |
env: | |
RUSTFLAGS: "-Ctarget-feature=-sse2" | |
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: "valgrind --leak-check=full --error-exitcode=1" | |
run: cargo test --release --features xxh32,const_xxh32,xxh64,const_xxh64,xxh3,const_xxh3 | |
#- name: Miri Test(No SSE2) | |
# env: | |
# RUSTFLAGS: "-Ctarget-feature=-sse2" | |
# MIRIFLAGS: "-Zmiri-tag-raw-pointers" | |
# run: | | |
# cargo +nightly miri test --features xxh32,const_xxh32,xxh64,const_xxh64,xxh3,const_xxh3 | |
# cargo +nightly miri test --release --features xxh32,const_xxh32,xxh64,const_xxh64,xxh3,const_xxh3 | |
wasm-platform-test: | |
needs: full-test | |
runs-on: ubuntu-latest | |
container: ghcr.io/webassembly/wasi-sdk | |
if: github.event.pull_request.draft == false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install system packages | |
run: apt-get update && apt-get install -y curl | |
- name: Install Rust Unix | |
run: | | |
if rustup --version >/dev/null 2>&1; then | |
rustup update | |
else | |
curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain stable | |
echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
fi | |
- name: Install Wasi runtime | |
env: | |
VERSION: "17.0.1" | |
run: | | |
curl https://github.com/bytecodealliance/wasmtime/releases/download/v$VERSION/wasmtime-v$VERSION-x86_64-linux.tar.xz -o wasmtime.tar.xz | |
mkdir $HOME/wasmtime | |
tar -xf wasmtime.tar.xz -C $HOME/wasmtime --strip-components 1 | |
echo "$HOME/wasmtime/" >> $GITHUB_PATH | |
cargo install cargo-wasi | |
- name: Test | |
run: cargo wasi test --features xxh32,const_xxh32,xxh64,const_xxh64,xxh3,const_xxh3,test_no_std -- --nocapture | |
- name: Test simd128 | |
env: | |
RUSTFLAGS: "-Ctarget-feature=+simd128" | |
run: cargo wasi test --features xxh32,const_xxh32,xxh64,const_xxh64,xxh3,const_xxh3,test_no_std -- --nocapture | |
cross-platform-test: | |
needs: full-test | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.draft == false | |
strategy: | |
matrix: | |
target: [ | |
"arm-unknown-linux-musleabi", | |
"i586-unknown-linux-musl", | |
"powerpc-unknown-linux-gnu", | |
"aarch64-unknown-linux-musl", | |
#"mips-unknown-linux-musl", | |
#"mips64-unknown-linux-gnuabi64" | |
] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust Unix | |
run: | | |
if rustup --version >/dev/null 2>&1; then | |
rustup update | |
else | |
curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain stable | |
echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
fi | |
- name: Install Cross | |
run: | | |
curl -L https://github.com/cross-rs/cross/releases/download/v0.2.5/cross-x86_64-unknown-linux-musl.tar.gz | tar xfz - | |
cp cross $HOME/.cargo/bin | |
- name: Test ${{ matrix.target }} | |
run: cross test --features xxh32,const_xxh32,xxh64,const_xxh64,xxh3,const_xxh3 --release --target ${{ matrix.target }} |