-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
217 additions
and
140 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Build and test | ||
|
||
on: [push, pull_request] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
CARGO_NET_GIT_FETCH_WITH_CLI: true | ||
|
||
jobs: | ||
test-asan: | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
RUSTFLAGS: -Zsanitizer=address -C debuginfo=2 ${{ matrix.rustflags }} | ||
RUSTDOCFLAGS: -Zsanitizer=address -C debuginfo=2 ${{ matrix.rustflags }} | ||
CARGO_BUILD_RUSTFLAGS: -C debuginfo=2 | ||
ASAN_OPTIONS: symbolize=1 detect_leaks=0 | ||
timeout-minutes: 20 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# TODO: enable windows, macos | ||
os: [ubuntu-latest] | ||
toolchain: ["nightly-2023-09-01"] | ||
rustflags: ["--cfg mfio_assume_linear_types --cfg tokio_unstable", "--cfg tokio_unstable"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.toolchain }} | ||
override: true | ||
|
||
- name: Get rustc target | ||
run: | | ||
echo "RUSTC_TARGET=$(rustc -vV | sed -n 's|host: ||p')" >> $GITHUB_OUTPUT | ||
id: target | ||
- name: Install llvm | ||
run: sudo apt update && sudo apt install llvm-13 | ||
- run: rustup component add rust-src | ||
- name: Run all tests | ||
run: cargo -Zbuild-std test --verbose --target ${{ steps.target.outputs.RUSTC_TARGET }} | ||
|
||
test-asan-lite: | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
RUSTFLAGS: -Zsanitizer=address ${{ matrix.rustflags }} | ||
RUSTDOCFLAGS: -Zsanitizer=address ${{ matrix.rustflags }} | ||
ASAN_OPTIONS: symbolize=1 detect_leaks=0 | ||
timeout-minutes: 20 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# TODO: enable windows, macos | ||
os: [ubuntu-latest] | ||
toolchain: ["nightly-2023-09-01"] | ||
rustflags: ["--cfg mfio_assume_linear_types --cfg tokio_unstable", "--cfg tokio_unstable"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.toolchain }} | ||
override: true | ||
|
||
- name: Get rustc target | ||
run: | | ||
echo "RUSTC_TARGET=$(rustc -vV | sed -n 's|host: ||p')" >> $GITHUB_OUTPUT | ||
id: target | ||
- name: Install llvm | ||
run: sudo apt update && sudo apt install llvm-13 | ||
- name: Run all tests | ||
run: cargo test --verbose --target ${{ steps.target.outputs.RUSTC_TARGET }} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Build and test | ||
|
||
on: [push, pull_request] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
CARGO_NET_GIT_FETCH_WITH_CLI: true | ||
|
||
jobs: | ||
build-coverage: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
path: 'mfio-repo' | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly-2023-09-01 | ||
override: true | ||
- run: cargo install grcov | ||
- name: Run tests with coverage | ||
run: | | ||
cd mfio-repo | ||
export CARGO_INCREMENTAL=0 | ||
export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort" | ||
export RUSTDOCFLAGS="-Cpanic=abort" | ||
cargo build --workspace --exclude mfio-derive --all-features | ||
cargo test --workspace --exclude mfio-derive --all-features | ||
grcov ./target/debug/ -s . -t lcov --llvm --branch --ignore-not-existing -o ./target/debug/coverage | ||
bash <(curl -s https://codecov.io/bash) -f ./target/debug/coverage -t ${{ secrets.CODECOV_TOKEN }}; | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Build and test | ||
|
||
on: [push, pull_request] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
CARGO_NET_GIT_FETCH_WITH_CLI: true | ||
|
||
jobs: | ||
lint: | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
RUSTFLAGS: ${{ matrix.rustflags }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
features: ["--all-features", ""] | ||
rustflags: ["--cfg mfio_assume_linear_types --cfg tokio_unstable", "--cfg tokio_unstable"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: rustup component add clippy | ||
- name: Check formatting | ||
run: cargo fmt -- --check | ||
- uses: actions-rs/clippy-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --all-targets ${{ matrix.features }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Build and test | ||
|
||
on: [push, pull_request] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
CARGO_NET_GIT_FETCH_WITH_CLI: true | ||
|
||
jobs: | ||
miri: | ||
runs-on: ubuntu-latest | ||
env: | ||
RUSTFLAGS: ${{ matrix.rustflags }} | ||
strategy: | ||
matrix: | ||
toolchain: ["nightly-2023-09-01"] | ||
seed: [1, 2, 3, 4, 5, 6, 7, 8] | ||
rustflags: ["--cfg mfio_assume_linear_types --cfg tokio_unstable", "--cfg tokio_unstable"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.toolchain }} | ||
override: true | ||
- run: rustup component add miri | ||
- name: Run miri | ||
run: | | ||
MIRIFLAGS="-Zmiri-seed=${{ matrix.seed }} -Zmiri-ignore-leaks -Zmiri-symbolic-alignment-check -Zmiri-retag-fields=all -Zmiri-symbolic-alignment-check -Zmiri-strict-provenance -Zmiri-disable-isolation -Zmiri-tree-borrows" cargo miri test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Build and test | ||
|
||
on: [push, pull_request] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
CARGO_NET_GIT_FETCH_WITH_CLI: true | ||
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: catchsegv | ||
|
||
jobs: | ||
|
||
test: | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
RUSTFLAGS: ${{ matrix.rustflags }} | ||
timeout-minutes: 20 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
toolchain: ["1.72", "stable"] | ||
rustflags: ["--cfg mfio_assume_linear_types --cfg tokio_unstable", "--cfg tokio_unstable"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.toolchain }} | ||
override: true | ||
|
||
- run: sudo apt update && sudo apt install libc-bin glibc-tools | ||
if: matrix.os == 'ubuntu-latest' | ||
- name: Run all tests | ||
run: cargo test --verbose | ||
|
||
test-all-features: | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
RUSTFLAGS: ${{ matrix.rustflags }} | ||
timeout-minutes: 20 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
toolchain: ["1.72", "stable", "nightly-2023-09-01"] | ||
rustflags: ["--cfg mfio_assume_linear_types --cfg tokio_unstable", "--cfg tokio_unstable"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.toolchain }} | ||
override: true | ||
|
||
- run: sudo apt update && sudo apt install libc-bin glibc-tools | ||
if: matrix.os == 'ubuntu-latest' | ||
- name: Run all tests | ||
run: cargo test --workspace --all-features --verbose | ||
|
||
|