Skip to content

Update polling requirement from 2.8.0 to 3.2.0 #693

Update polling requirement from 2.8.0 to 3.2.0

Update polling requirement from 2.8.0 to 3.2.0 #693

Workflow file for this run

name: CI
on:
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
lints:
name: Run cargo fmt and cargo clippy
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- name: cargo fmt --check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
linux:
name: Test ${{ matrix.rust }} on ubuntu-latest
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust:
- stable
- nightly
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install Rust (${{ matrix.rust }})
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Run cargo clean
run: |
cd ${{ github.workspace }}
/home/runner/.cargo/bin/cargo clean
- name: Run cargo release test compile
uses: actions-rs/cargo@v1
with:
command: test
args: --release --all --no-run
- name: Run cargo release test
run: sudo bash -c "sudo -u runner RUSTUP_TOOLCHAIN=${{ matrix.rust }} RUST_BACKTRACE=1 /home/runner/.cargo/bin/cargo test --release --all"
- name: Run cargo release preemptive example
if: always()
run: |
cd ${{ github.workspace }}/open-coroutine-core
sudo bash -c "sudo -u runner RUSTUP_TOOLCHAIN=${{ matrix.rust }} RUST_BACKTRACE=1 /home/runner/.cargo/bin/cargo run --example preemptive --release --features preemptive-schedule"
- name: Run cargo release test io_uring
if: always()
run: |
cd ${{ github.workspace }}/open-coroutine-iouring
sudo bash -c "sudo -u runner RUSTUP_TOOLCHAIN=${{ matrix.rust }} RUST_BACKTRACE=1 /home/runner/.cargo/bin/cargo test --release"
- name: Run cargo release sleep not coroutine example
if: always()
run: |
cd ${{ github.workspace }}/examples
sudo bash -c "sudo -u runner RUSTUP_TOOLCHAIN=${{ matrix.rust }} RUST_BACKTRACE=1 /home/runner/.cargo/bin/cargo run --example sleep_not_co --release"
- name: Run cargo release sleep coroutine example
if: always()
run: |
cd ${{ github.workspace }}/examples
sudo bash -c "sudo -u runner RUSTUP_TOOLCHAIN=${{ matrix.rust }} RUST_BACKTRACE=1 /home/runner/.cargo/bin/cargo run --example sleep_co --release"
- name: Run cargo release socket not coroutine example
if: always()
run: |
cd ${{ github.workspace }}/examples
sudo bash -c "sudo -u runner RUSTUP_TOOLCHAIN=${{ matrix.rust }} RUST_BACKTRACE=1 /home/runner/.cargo/bin/cargo run --example socket_not_co --release"
- name: Run cargo release socket coroutine server example
if: always()
run: |
cd ${{ github.workspace }}/examples
sudo bash -c "sudo -u runner RUSTUP_TOOLCHAIN=${{ matrix.rust }} RUST_BACKTRACE=1 /home/runner/.cargo/bin/cargo run --example socket_co_server --release"
- name: Run cargo release socket coroutine client example
if: always()
run: |
cd ${{ github.workspace }}/examples
sudo bash -c "sudo -u runner RUSTUP_TOOLCHAIN=${{ matrix.rust }} RUST_BACKTRACE=1 /home/runner/.cargo/bin/cargo run --example socket_co_client --release"
- name: Run cargo release socket coroutine example
if: always()
run: |
cd ${{ github.workspace }}/examples
sudo bash -c "sudo -u runner RUSTUP_TOOLCHAIN=${{ matrix.rust }} RUST_BACKTRACE=1 /home/runner/.cargo/bin/cargo run --example socket_co --release"
macos:
name: Test ${{ matrix.rust }} on macOS-latest
runs-on: macOS-latest
strategy:
fail-fast: false
matrix:
rust:
- stable
- nightly
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install Rust (${{ matrix.rust }})
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Run cargo clean
run: |
cd ${{ github.workspace }}
/Users/runner/.cargo/bin/cargo clean
- name: Run cargo release test compile
uses: actions-rs/cargo@v1
with:
command: test
args: --release --all --no-run
- name: Run cargo release test
run: sudo bash -c "sudo -u runner RUSTUP_TOOLCHAIN=${{ matrix.rust }} RUST_BACKTRACE=1 /Users/runner/.cargo/bin/cargo test --release --all"
- name: Run cargo release preemptive example
if: always()
run: |
cd ${{ github.workspace }}/open-coroutine-core
sudo bash -c "sudo -u runner RUSTUP_TOOLCHAIN=${{ matrix.rust }} RUST_BACKTRACE=1 /Users/runner/.cargo/bin/cargo run --example preemptive --release --features preemptive-schedule"
- name: Run cargo release sleep not coroutine example
if: always()
run: |
cd ${{ github.workspace }}/examples
sudo bash -c "sudo -u runner RUSTUP_TOOLCHAIN=${{ matrix.rust }} RUST_BACKTRACE=1 /Users/runner/.cargo/bin/cargo run --example sleep_not_co --release"
- name: Run cargo release sleep coroutine example
if: always()
run: |
cd ${{ github.workspace }}/examples
sudo bash -c "sudo -u runner RUSTUP_TOOLCHAIN=${{ matrix.rust }} RUST_BACKTRACE=1 /Users/runner/.cargo/bin/cargo run --example sleep_co --release"
- name: Run cargo release socket not coroutine example
if: always()
run: |
cd ${{ github.workspace }}/examples
sudo bash -c "sudo -u runner RUSTUP_TOOLCHAIN=${{ matrix.rust }} RUST_BACKTRACE=1 /Users/runner/.cargo/bin/cargo run --example socket_not_co --release"
- name: Run cargo release socket coroutine server example
if: always()
run: |
cd ${{ github.workspace }}/examples
sudo bash -c "sudo -u runner RUSTUP_TOOLCHAIN=${{ matrix.rust }} RUST_BACKTRACE=1 /Users/runner/.cargo/bin/cargo run --example socket_co_server --release"
- name: Run cargo release socket coroutine client example
if: always()
run: |
cd ${{ github.workspace }}/examples
sudo bash -c "sudo -u runner RUSTUP_TOOLCHAIN=${{ matrix.rust }} RUST_BACKTRACE=1 /Users/runner/.cargo/bin/cargo run --example socket_co_client --release"
- name: Run cargo release socket coroutine example
if: always()
run: |
cd ${{ github.workspace }}/examples
sudo bash -c "sudo -u runner RUSTUP_TOOLCHAIN=${{ matrix.rust }} RUST_BACKTRACE=1 /Users/runner/.cargo/bin/cargo run --example socket_co --release"
windows:
name: Test ${{ matrix.rust }} on windows-latest
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
rust:
# stable is not supported due to static-detour in retour crate
# - stable-x86_64-pc-windows-gnu
- nightly-x86_64-pc-windows-gnu
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install Rust (${{ matrix.rust }})
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Run cargo clean
run: |
cd ${{ github.workspace }}
C://Users//runneradmin//.cargo//bin//cargo.exe clean
- name: Run cargo release test compile
uses: actions-rs/cargo@v1
with:
command: test
args: --release --all --no-run
- name: Run cargo release test
run: bash -c "RUSTUP_TOOLCHAIN=${{ matrix.rust }} RUST_BACKTRACE=1 C://Users//runneradmin//.cargo//bin//cargo.exe test --release --all"
- name: Run cargo release preemptive example
if: always()
run: |
cd ${{ github.workspace }}/open-coroutine-core
bash -c "RUSTUP_TOOLCHAIN=${{ matrix.rust }} RUST_BACKTRACE=1 C://Users//runneradmin//.cargo//bin//cargo.exe run --example preemptive --release --features preemptive-schedule"
- name: Run cargo release sleep not coroutine example
if: always()
run: |
cd ${{ github.workspace }}/examples
bash -c "RUSTUP_TOOLCHAIN=${{ matrix.rust }} RUST_BACKTRACE=1 C://Users//runneradmin//.cargo//bin//cargo.exe run --example sleep_not_co --release"
- name: Run cargo release sleep coroutine example
if: always()
run: |
cd ${{ github.workspace }}/examples
bash -c "RUSTUP_TOOLCHAIN=${{ matrix.rust }} RUST_BACKTRACE=1 C://Users//runneradmin//.cargo//bin//cargo.exe run --example sleep_co --release"
- name: Run cargo release socket not coroutine example
if: always()
run: |
cd ${{ github.workspace }}/examples
bash -c "RUSTUP_TOOLCHAIN=${{ matrix.rust }} RUST_BACKTRACE=1 C://Users//runneradmin//.cargo//bin//cargo.exe run --example socket_not_co --release"
- name: Run cargo release socket coroutine server example
if: always()
run: |
cd ${{ github.workspace }}/examples
bash -c "RUSTUP_TOOLCHAIN=${{ matrix.rust }} RUST_BACKTRACE=1 C://Users//runneradmin//.cargo//bin//cargo.exe run --example socket_co_server --release"
- name: Run cargo release socket coroutine client example
if: always()
run: |
cd ${{ github.workspace }}/examples
bash -c "RUSTUP_TOOLCHAIN=${{ matrix.rust }} RUST_BACKTRACE=1 C://Users//runneradmin//.cargo//bin//cargo.exe run --example socket_co_client --release"
# - name: Run cargo release socket coroutine example
# if: always()
# run: |
# cd ${{ github.workspace }}/examples
# bash -c "RUSTUP_TOOLCHAIN=${{ matrix.rust }} RUST_BACKTRACE=1 C://Users//runneradmin//.cargo//bin//cargo.exe run --example socket_co --release"