Skip to content

bugfix: Try to fix Windows #341

bugfix: Try to fix Windows

bugfix: Try to fix Windows #341

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- master
schedule:
- cron: '0 2 * * *'
env:
RUSTFLAGS: -D warnings
RUST_BACKTRACE: 1
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
rust: [nightly, stable]
steps:
- uses: actions/checkout@v3
- name: Install Rust
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
- run: cargo build --all --all-features --all-targets
- name: Run cargo check (without dev-dependencies to catch missing feature flags)
if: startsWith(matrix.rust, 'nightly')
run: cargo check -Z features=dev_dep
- 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: ubuntu-latest
strategy:
matrix:
# When updating this, the reminder to update the minimum supported
# Rust version in Cargo.toml and .clippy.toml.
ad_rust: ['1.63']
dp_rust: ['1.63']
steps:
- uses: actions/checkout@v3
- name: Install Rust for async-dns
run: rustup update ${{ matrix.ad_rust }} && rustup default ${{ matrix.ad_rust }}
- run: cargo build
- name: Install Rust for dns-protocol
run: rustup update ${{ matrix.dp_rust }} && rustup default ${{ matrix.dp_rust }}
- run: cargo build -p dns-protocol
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust
run: rustup update stable
- run: cargo clippy --all-features --all-targets
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust
run: rustup update stable
- run: cargo fmt --all --check
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}