Skip to content

feat: swap support for windows, android, openwrt and netbsd #867

feat: swap support for windows, android, openwrt and netbsd

feat: swap support for windows, android, openwrt and netbsd #867

Workflow file for this run

on: [push, pull_request]
name: CI
jobs:
lint:
runs-on: ubuntu-latest
name: Lint
env:
RUSTFLAGS: "-Dwarnings"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Bootstrap
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Formatting
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all-targets --all-features
checks:
name: ${{ matrix.name }} (${{ matrix.target }})
runs-on: ${{ matrix.os }}
env:
PROGRAM: ${{ matrix.cross && 'cross' || 'cargo' }}
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-gnu
- x86_64-apple-darwin
- x86_64-pc-windows-msvc
- x86_64-unknown-netbsd
- x86_64-unknown-freebsd
- aarch64-linux-android
- aarch64-unknown-linux-gnu
- armv7-unknown-linux-gnueabihf
include:
- os: ubuntu-latest
name: Linux
target: x86_64-unknown-linux-gnu
cross: false
test: true
- os: macos-latest
name: macOS
target: x86_64-apple-darwin
cross: false
test: true
- os: windows-latest
name: Windows
target: x86_64-pc-windows-msvc
cross: false
test: true
- os: ubuntu-latest
name: NetBSD
target: x86_64-unknown-netbsd
cross: true
test: false
- os: ubuntu-latest
name: FreeBSD
target: x86_64-unknown-freebsd
cross: true
test: false
- os: ubuntu-latest
name: Android
target: aarch64-linux-android
cross: true
test: true
- os: ubuntu-latest
name: OpenWrt
target: aarch64-unknown-linux-gnu
cross: true
test: true
cargo_args: --features "openwrt"
- os: ubuntu-latest
name: Linux ARMv7
target: armv7-unknown-linux-gnueabihf
cross: true
test: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Bootstrap
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install cross
run: cargo install cross
if: ${{ matrix.cross }}
- name: Build
run: ${{ env.PROGRAM }} build --target=${{ matrix.target }} ${{ matrix.cargo_args }}
- name: Test
run: ${{ env.PROGRAM }} test --target=${{ matrix.target }} ${{ matrix.cargo_args }}
if: ${{ matrix.test }}