fix(runtime): use Weak to break reference cycle (#490)
#851
This file contains hidden or 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: Test | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | |
| cancel-in-progress: true | |
| env: | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.setup.os }} | |
| strategy: | |
| matrix: | |
| toolchain: ['nightly', 'beta', 'stable'] | |
| setup: | |
| - os: 'ubuntu-22.04' | |
| - os: 'ubuntu-22.04' | |
| features: 'polling' # fusion | |
| - os: 'ubuntu-22.04' | |
| features: 'io-uring-sqe128,io-uring-cqe32' | |
| - os: 'ubuntu-22.04' | |
| features: 'polling,ring' | |
| no_default_features: true | |
| - os: 'ubuntu-22.04' | |
| features: 'polling,native-tls,ring' | |
| no_default_features: true | |
| - os: 'ubuntu-22.04' | |
| features: 'codec-serde-json' | |
| - os: 'windows-latest' | |
| target: 'x86_64-pc-windows-msvc' | |
| - os: 'windows-latest' | |
| target: 'x86_64-pc-windows-gnu' | |
| - os: 'windows-latest' | |
| target: 'i686-pc-windows-msvc' | |
| - os: 'windows-latest' | |
| target: 'x86_64-pc-windows-msvc' | |
| features: 'iocp-global' | |
| - os: 'windows-latest' | |
| target: 'x86_64-pc-windows-msvc' | |
| features: 'iocp-wait-packet' | |
| - os: 'macos-13' | |
| - os: 'macos-14' | |
| - os: 'macos-15' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust Toolchain | |
| run: rustup toolchain install ${{ matrix.toolchain }} | |
| - name: Setup target | |
| if: ${{ matrix.setup.target }} | |
| run: rustup +${{ matrix.toolchain }} target install ${{ matrix.setup.target }} | |
| - name: Test on ${{ matrix.setup.os }} ${{ matrix.toolchain }} ${{ matrix.setup.target }} | |
| shell: bash | |
| run: | | |
| set -ex | |
| ARGS=("--features" "all") | |
| # Add feature "nightly" if toolchain is nightly | |
| if [[ "${{ matrix.toolchain }}" == "nightly" ]]; then | |
| ARGS+=("--features" "nightly") | |
| fi | |
| # Add features if features is not empty | |
| if [[ -n "${{ matrix.setup.features }}" ]]; then | |
| ARGS+=("--features" "${{ matrix.setup.features }}") | |
| fi | |
| # Add no-default-features if no_default_features is true | |
| if [[ -n "${{ matrix.setup.no_default_features }}" ]]; then | |
| ARGS+=("--no-default-features") | |
| fi | |
| # Specify target if target is not empty | |
| if [[ -n "${{ matrix.setup.target }}" ]]; then | |
| ARGS+=("--target" "${{ matrix.setup.target }}") | |
| fi | |
| # Add doctest-xcompile if on windows and nightly | |
| if [[ "${{ matrix.setup.os }}" == "windows-latest" && ${{ matrix.toolchain }} == "nightly" ]]; then | |
| ARGS+=("-Z" "doctest-xcompile") | |
| fi | |
| cargo +${{ matrix.toolchain }} test --workspace "${ARGS[@]}" |