mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 14:44:12 +00:00
wip: use tokios runtime
This commit is contained in:
parent
13e58daa20
commit
6cc4dac3a3
1 changed files with 49 additions and 31 deletions
80
.github/workflows/miri.yml
vendored
80
.github/workflows/miri.yml
vendored
|
@ -38,36 +38,54 @@ jobs:
|
||||||
# - os: windows-latest
|
# - os: windows-latest
|
||||||
# host_target: i686-pc-windows-msvc
|
# host_target: i686-pc-windows-msvc
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Set the tag GC interval to 1 on linux
|
- name: Set the tag GC interval to 1 on linux
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
run: echo "MIRIFLAGS=-Zmiri-tag-gc=1" >> $GITHUB_ENV
|
run: echo "MIRIFLAGS=-Zmiri-tag-gc=1" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Install Rust ${{ env.rust_nightly }}
|
||||||
|
uses: dtolnay/rust-toolchain@master
|
||||||
|
with:
|
||||||
|
toolchain: ${{ env.rust_nightly }}
|
||||||
|
components: miri
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
- name: miri
|
||||||
|
# Many of tests in tokio/tests and doctests use #[tokio::test] or
|
||||||
|
# #[tokio::main] that calls epoll_create1 that Miri does not support.
|
||||||
|
# run: cargo miri test --features full --lib --no-fail-fast
|
||||||
|
run: |
|
||||||
|
cargo miri test --package dioxus-core --test miri_stress -- --exact --nocapture
|
||||||
|
cargo miri test --package dioxus-native-core --test miri_native -- --exact --nocapture
|
||||||
|
|
||||||
|
# working-directory: tokio
|
||||||
|
env:
|
||||||
|
MIRIFLAGS: -Zmiri-disable-isolation -Zmiri-strict-provenance -Zmiri-retag-fields
|
||||||
|
PROPTEST_CASES: 10
|
||||||
|
|
||||||
# Cache the global cargo directory, but NOT the local `target` directory which
|
# Cache the global cargo directory, but NOT the local `target` directory which
|
||||||
# we cannot reuse anyway when the nightly changes (and it grows quite large
|
# we cannot reuse anyway when the nightly changes (and it grows quite large
|
||||||
# over time).
|
# over time).
|
||||||
- name: Add cache for cargo
|
# - name: Add cache for cargo
|
||||||
id: cache
|
# id: cache
|
||||||
uses: actions/cache@v3
|
# uses: actions/cache@v3
|
||||||
with:
|
# with:
|
||||||
path: |
|
# path: |
|
||||||
# Taken from <https://doc.rust-lang.org/nightly/cargo/guide/cargo-home.html#caching-the-cargo-home-in-ci>.
|
# # Taken from <https://doc.rust-lang.org/nightly/cargo/guide/cargo-home.html#caching-the-cargo-home-in-ci>.
|
||||||
~/.cargo/bin
|
# ~/.cargo/bin
|
||||||
~/.cargo/registry/index
|
# ~/.cargo/registry/index
|
||||||
~/.cargo/registry/cache
|
# ~/.cargo/registry/cache
|
||||||
~/.cargo/git/db
|
# ~/.cargo/git/db
|
||||||
# contains package information of crates installed via `cargo install`.
|
# # contains package information of crates installed via `cargo install`.
|
||||||
~/.cargo/.crates.toml
|
# ~/.cargo/.crates.toml
|
||||||
~/.cargo/.crates2.json
|
# ~/.cargo/.crates2.json
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
# key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-cargo
|
# restore-keys: ${{ runner.os }}-cargo
|
||||||
|
|
||||||
- name: Install rustup-toolchain-install-master
|
# - name: Install rustup-toolchain-install-master
|
||||||
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
|
# if: ${{ steps.cache.outputs.cache-hit != 'true' }}
|
||||||
shell: bash
|
# shell: bash
|
||||||
run: |
|
# run: |
|
||||||
cargo install -f rustup-toolchain-install-master
|
# cargo install -f rustup-toolchain-install-master
|
||||||
# - name: Install "master" toolchain
|
# - name: Install "master" toolchain
|
||||||
# shell: bash
|
# shell: bash
|
||||||
# run: |
|
# run: |
|
||||||
|
@ -76,12 +94,12 @@ jobs:
|
||||||
# git ls-remote https://github.com/rust-lang/rust/ HEAD | cut -f 1 > rust-version
|
# git ls-remote https://github.com/rust-lang/rust/ HEAD | cut -f 1 > rust-version
|
||||||
# fi
|
# fi
|
||||||
# toolchain --host ${{ matrix.host_target }}
|
# toolchain --host ${{ matrix.host_target }}
|
||||||
- name: Show Rust version
|
# - name: Show Rust version
|
||||||
run: |
|
# run: |
|
||||||
rustup show
|
# rustup show
|
||||||
rustc -Vv
|
# rustc -Vv
|
||||||
cargo -V
|
# cargo -V
|
||||||
- name: Test
|
# - name: Test
|
||||||
run: |
|
# run: |
|
||||||
MIRIFLAGS="-Zmiri-disable-isolation -Zmiri-ignore-leaks" cargo +nightly miri test --package dioxus-core --test miri_stress -- --exact --nocapture
|
# MIRIFLAGS="-Zmiri-disable-isolation -Zmiri-ignore-leaks" cargo +nightly miri test --package dioxus-core --test miri_stress -- --exact --nocapture
|
||||||
MIRIFLAGS="-Zmiri-disable-isolation -Zmiri-ignore-leaks" cargo +nightly miri test --package dioxus-native-core --test miri_native -- --exact --nocapture
|
# MIRIFLAGS="-Zmiri-disable-isolation -Zmiri-ignore-leaks" cargo +nightly miri test --package dioxus-native-core --test miri_native -- --exact --nocapture
|
||||||
|
|
Loading…
Reference in a new issue