Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Jul 17, 2023
1 parent c86c389 commit 6fc1839
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 57 deletions.
9 changes: 4 additions & 5 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
only_if: $CIRRUS_TAG == '' && ($CIRRUS_PR != '' || $CIRRUS_BRANCH == 'master')
only_if: $CIRRUS_TAG == '' && ($CIRRUS_PR != '' || $CIRRUS_BRANCH == 'taiki-e/ci')
auto_cancellation: $CIRRUS_BRANCH != 'master'
env:
CARGO_INCREMENTAL: '0'
CARGO_NET_GIT_FETCH_WITH_CLI: 'true'
CARGO_NET_RETRY: '10'
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: 'sparse'
CARGO_TERM_COLOR: always
RUST_BACKTRACE: '1'
RUSTDOCFLAGS: -D warnings
Expand All @@ -21,11 +19,11 @@ freebsd_task:
- env:
TARGET: i686-unknown-freebsd
setup_script:
# https://github.com/cirruslabs/cirrus-ci-docs/issues/483
- sudo sysctl net.inet.tcp.blackhole=0
- pkg install -y git
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable --target $TARGET
test_script:
# https://github.com/cirruslabs/cirrus-ci-docs/issues/483
- sudo sysctl net.inet.tcp.blackhole=0
- . $HOME/.cargo/env
- cargo test --target $TARGET
# Test async-io
Expand Down Expand Up @@ -67,6 +65,7 @@ openbsd_task:
setup_script:
# OpenBSD is tier 3 target, so install rust from package manager instead of rustup
- pkg_add git rust
- rustc -Vv
test_script:
- cargo test
# Test async-io
Expand Down
71 changes: 22 additions & 49 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:
push:
branches:
- master
- taiki-e/ci
schedule:
- cron: '0 2 * * 0'

Expand All @@ -31,6 +31,7 @@ jobs:
strategy:
fail-fast: false
matrix:
target: ['']
os: [ubuntu-latest, windows-latest, macos-latest]
rust: [nightly, beta, stable]
include:
Expand All @@ -40,21 +41,31 @@ jobs:
rust: nightly-i686-pc-windows-msvc
- os: windows-latest
rust: nightly-i686-pc-windows-gnu
- os: ubuntu-latest
rust: nightly
target: arm-linux-androideabi@21 # epoll_create1 requires API level 21+
- os: ubuntu-latest
rust: nightly
target: x86_64-pc-windows-gnu # Wine
steps:
- uses: actions/checkout@v3
- name: Install Rust
# --no-self-update is necessary because the windows environment cannot self-update rustup.exe.
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- uses: taiki-e/setup-cross-toolchain-action@more
with:
target: ${{ matrix.target }}
if: matrix.target != ''
- run: cargo build --all --all-features --all-targets
- run: cargo test
- run: cargo test
env:
# Note: This cfg is intended to make it easy for polling developers to test
# the backend that uses poll, and is not a public API.
RUSTFLAGS: ${{ env.RUSTFLAGS }} --cfg polling_test_poll_backend
if: startsWith(matrix.os, 'ubuntu')
if: startsWith(matrix.os, 'ubuntu') && matrix.target == ''
- run: cargo hack build --feature-powerset --no-dev-deps
- name: Clone async-io
run: git clone https://github.com/smol-rs/async-io.git
Expand All @@ -65,62 +76,24 @@ jobs:
- name: Test async-io
run: cargo test --manifest-path=async-io/Cargo.toml

# Android and Windows are tested in test job.
# BSDs are tested in Cirrus CI.
cross:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust
run: rustup update stable
- name: Install cross
uses: taiki-e/install-action@cross
# We don't test BSDs, since we already test them in Cirrus.
- name: Android
if: startsWith(matrix.os, 'ubuntu')
run: cross test --target arm-linux-androideabi
- name: Install Targets
run: rustup target add aarch64-apple-ios x86_64-unknown-linux-gnux32 x86_64-unknown-fuchsia x86_64-unknown-illumos
- name: iOS
if: startsWith(matrix.os, 'macos')
run: |
rustup target add aarch64-apple-ios
cross build --target aarch64-apple-ios
run: cargo build --target aarch64-apple-ios
- name: Linux x32
if: startsWith(matrix.os, 'ubuntu')
run: |
rustup target add x86_64-unknown-linux-gnux32
cross check --target x86_64-unknown-linux-gnux32
run: cargo build --target x86_64-unknown-linux-gnux32
- name: Fuchsia
if: startsWith(matrix.os, 'ubuntu')
run: |
rustup target add x86_64-unknown-fuchsia
cargo build --target x86_64-unknown-fuchsia
run: cargo build --target x86_64-unknown-fuchsia
- name: illumos
if: startsWith(matrix.os, 'ubuntu')
run: |
rustup target add x86_64-unknown-illumos
cargo build --target x86_64-unknown-illumos
wine:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install Rust
run: rustup update stable
- uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: x86_64-pc-windows-gnu
runner: [email protected]
- run: cargo test --target x86_64-pc-windows-gnu
- name: Clone async-io
run: git clone https://github.com/smol-rs/async-io.git
- name: Add patch section
run: echo '[patch.crates-io]' >> async-io/Cargo.toml
- name: Patch polling
run: echo 'polling = { path = ".." }' >> async-io/Cargo.toml
- name: Test async-io
run: cargo test --manifest-path=async-io/Cargo.toml
run: cargo build --target x86_64-unknown-illumos

msrv:
runs-on: ${{ matrix.os }}
Expand Down
3 changes: 0 additions & 3 deletions Cross.toml

This file was deleted.

0 comments on commit 6fc1839

Please sign in to comment.