Skip to content

Commit

Permalink
Rework CI
Browse files Browse the repository at this point in the history
  • Loading branch information
DoumanAsh committed Apr 20, 2022
1 parent b3beeae commit b033743
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 58 deletions.
47 changes: 0 additions & 47 deletions .github/workflows/cross-rust.yml

This file was deleted.

40 changes: 30 additions & 10 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,20 @@ on:
branches:
- master
paths:
- '.github/workflows/cross-rust.yml'
- '.github/workflows/rust.yml'
- 'src/**.rs'
- 'Cargo.toml'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- '**'
paths:
- '.github/workflows/cross-rust.yml'
- '.github/workflows/rust.yml'
- 'src/**.rs'
- 'Cargo.toml'

jobs:
build:

full-test:
runs-on: ${{ matrix.os }}
if: github.event.pull_request.draft == false

Expand All @@ -39,9 +38,6 @@ jobs:
echo ::add-path::$HOME/.cargo/bin
fi
- name: Rust Cache
uses: Swatinem/rust-cache@v1

- name: Install Valgrind
run: |
sudo apt-get update
Expand All @@ -56,13 +52,37 @@ jobs:
run: cargo check --features xxh32,const_xxh32,xxh64,const_xxh64,xxh3,const_xxh3

- name: Test
env:
QUICKCHECK_TESTS: 10000
run: cargo test --features xxh32,const_xxh32,xxh64,const_xxh64,xxh3,const_xxh3

- name: Valgrind Test
env:
QUICKCHECK_TESTS: 10000
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: "valgrind --leak-check=full"
run: cargo test --release --features xxh32,const_xxh32,xxh64,const_xxh64,xxh3,const_xxh3

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", "mips-unknown-linux-musl", "mips64-unknown-linux-gnuabi64"]

steps:
- uses: actions/checkout@v1

- 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 ::add-path::$HOME/.cargo/bin
fi
- name: Install Cross
run: |
curl -L https://github.com/cross-rs/cross/releases/download/v0.2.1/cross-v0.2.1-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 }}
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# xxhash-rust

![Rust](https://github.com/DoumanAsh/xxhash-rust/workflows/Rust/badge.svg?branch=master)
![Cross-Rust](https://github.com/DoumanAsh/xxhash-rust/workflows/Cross-Rust/badge.svg?branch=master)
[![Crates.io](https://img.shields.io/crates/v/xxhash-rust.svg)](https://crates.io/crates/xxhash-rust)
[![Documentation](https://docs.rs/xxhash-rust/badge.svg)](https://docs.rs/crate/xxhash-rust/)

Expand Down

0 comments on commit b033743

Please sign in to comment.