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 0125f8d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 54 deletions.
11 changes: 5 additions & 6 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 @@ -60,13 +58,14 @@ openbsd_task:
compute_engine_instance:
image_project: pg-ci-images
# https://github.com/anarazel/pg-vm-images/blob/main/packer/openbsd.pkrvars.hcl
image: family/pg-ci-openbsd-vanilla-7-2
image: family/pg-ci-openbsd-vanilla-7-3
platform: openbsd
env:
TARGET: x86_64-unknown-openbsd
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
68 changes: 20 additions & 48 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 Down Expand Up @@ -40,13 +40,23 @@ 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
- 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
Expand All @@ -65,62 +75,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

0 comments on commit 0125f8d

Please sign in to comment.