Skip to content

Commit

Permalink
try an ARM ci
Browse files Browse the repository at this point in the history
  • Loading branch information
carllerche committed Nov 17, 2022
1 parent d658262 commit ab5a081
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 9 deletions.
33 changes: 26 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ jobs:
- test-unstable
- miri
- asan
- cross
- cross-check
- cross-test
- features
- minrust
- minimal-versions
Expand Down Expand Up @@ -234,13 +235,12 @@ jobs:
# Ignore `trybuild` errors as they are irrelevant and flaky on nightly
TRYBUILD: overwrite

cross:
name: cross
cross-check:
name: cross-check
runs-on: ubuntu-latest
strategy:
matrix:
target:
- i686-unknown-linux-gnu
- powerpc-unknown-linux-gnu
- powerpc64-unknown-linux-gnu
- mips-unknown-linux-gnu
Expand All @@ -259,13 +259,32 @@ jobs:
use-cross: true
command: check
args: --workspace --all-features --target ${{ matrix.target }}
env:
RUSTFLAGS: --cfg tokio_unstable -Dwarnings

cross-test:
name: cross-check
runs-on: ubuntu-latest
strategy:
matrix:
target:
- i686-unknown-linux-gnu
- armv7-unknown-linux-gnueabihf
steps:
- uses: actions/checkout@v3
- name: Install Rust ${{ env.rust_stable }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.rust_stable }}
target: ${{ matrix.target }}
override: true
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: check
args: --workspace --all-features --target ${{ matrix.target }}
command: test
args: -p tokio --all-features --target ${{ matrix.target }} --tests
env:
RUSTFLAGS: --cfg tokio_unstable -Dwarnings
RUSTFLAGS: --cfg tokio_unstable -Dwarnings --cfg tokio_no_ipv6

features:
name: features
Expand Down
3 changes: 1 addition & 2 deletions tokio/tests/rt_common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -869,14 +869,13 @@ rt_test! {
#[test]
fn io_notify_while_shutting_down() {
use tokio::net::UdpSocket;
use std::net::Ipv6Addr;
use std::sync::Arc;

for _ in 1..10 {
let runtime = rt();

runtime.block_on(async {
let socket = UdpSocket::bind((Ipv6Addr::LOCALHOST, 0)).await.unwrap();
let socket = UdpSocket::bind("127.0.0.1:0").await.unwrap();
let addr = socket.local_addr().unwrap();
let send_half = Arc::new(socket);
let recv_half = send_half.clone();
Expand Down
1 change: 1 addition & 0 deletions tokio/tests/tcp_connect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ async fn connect_v4() {
}

#[tokio::test]
#[cfg(not(tokio_no_ipv6))]
async fn connect_v6() {
let srv = assert_ok!(TcpListener::bind("[::1]:0").await);
let addr = assert_ok!(srv.local_addr());
Expand Down
1 change: 1 addition & 0 deletions tokio/tests/tcp_socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ async fn basic_usage_v4() {
}

#[tokio::test]
#[cfg(not(tokio_no_ipv6))]
async fn basic_usage_v6() {
// Create server
let addr = assert_ok!("[::1]:0".parse());
Expand Down

0 comments on commit ab5a081

Please sign in to comment.