Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GITHUB ACTIONS TEST PLEASE IGNORE #175

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 0 additions & 61 deletions .cirrus.yml

This file was deleted.

106 changes: 5 additions & 101 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
rust: [nightly, beta, stable]
os: [ubuntu-latest]
rust: [stable]
steps:
- uses: actions/checkout@v4
- 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 }}
- run: cargo build --all --all-features --all-targets
- run: sudo apt update && sudo apt install -y seatd && (seatd &) && ls /var/run
if: startsWith(matrix.os, 'ubuntu')
- name: Run cargo check (without dev-dependencies to catch missing feature flags)
if: startsWith(matrix.rust, 'nightly')
run: cargo check -Z features=dev_dep
Expand All @@ -49,103 +51,5 @@ jobs:
# - name: Check selected Tier 3 targets
# if: startsWith(matrix.rust, 'nightly') && matrix.os == 'ubuntu-latest'
# run: cargo check -Z build-std --target=riscv32imc-esp-espidf
- run: sudo chown runner:runner /var/run/seatd.sock
- run: cargo test

# Copied from: https://github.com/rust-lang/stacker/pull/19/files
windows_gnu:
runs-on: windows-latest
strategy:
matrix:
rust: [nightly]
target:
- x86_64-pc-windows-gnu
steps:
- uses: actions/checkout@v4
- 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 }}
- run: rustup target add ${{ matrix.target }}
- run: cargo build --target ${{ matrix.target }} --all --all-features --all-targets
- run: cargo test --target ${{ matrix.target }}

cross:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- 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: iOS
if: startsWith(matrix.os, 'macos')
run: |
rustup target add aarch64-apple-ios
cross 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
- name: Fuchsia
if: startsWith(matrix.os, 'ubuntu')
run: |
rustup target add x86_64-unknown-fuchsia
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

msrv:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
# When updating this, the reminder to update the minimum supported
# Rust version in Cargo.toml.
rust: ['1.63']
steps:
- uses: actions/checkout@v4
- 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 }}
- run: cargo build

clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable
- run: cargo clippy --all-features --all-targets

fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable
- run: cargo fmt --all --check

security_audit:
permissions:
checks: write
contents: read
issues: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# https://github.com/rustsec/audit-check/issues/2
- uses: rustsec/audit-check@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
11 changes: 11 additions & 0 deletions tests/async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ fn spawn<T: Send + 'static>(
Box::pin(async move { r.recv().await.unwrap() })
}

#[cfg(target_os = "linux")]
#[test]
fn socket() {
future::block_on(async {
let _sock =
async_io::Async::<std::os::unix::net::UnixStream>::connect("/var/run/seatd.sock")
.await
.unwrap();
});
}

#[test]
fn tcp_connect() -> io::Result<()> {
future::block_on(async {
Expand Down