Skip to content

CI

CI #2165

Workflow file for this run

on:
push:
branches:
- main
tags:
- '**'
pull_request:
schedule:
- cron: "13 3 * * *"
name: CI
jobs:
build:
name: Build
runs-on: ubuntu-latest
env: {"RUSTFLAGS": "-D warnings"}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly # 1.77
- run: cargo build
- run: cargo build --all-features
- run: cargo build -p testsuite
build_no_std:
name: Build no_std
runs-on: ubuntu-latest
env: {"RUSTFLAGS": "-D warnings"}
strategy:
matrix:
target:
- "thumbv6m-none-eabi"
- "thumbv7em-none-eabi"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly # 1.77
with:
target: ${{ matrix.target }}
- run: cargo build --target ${{ matrix.target }} -p w5500-ll
- run: cargo build --target ${{ matrix.target }} -p w5500-hl
- run: cargo build --target ${{ matrix.target }} -p w5500-dhcp
- run: cargo build --target ${{ matrix.target }} -p w5500-dns
- run: cargo build --target ${{ matrix.target }} -p w5500-mqtt
- run: cargo build --target ${{ matrix.target }} -p w5500-sntp
- run: cargo build --target ${{ matrix.target }} -p w5500-tls
- run: cargo build --target ${{ matrix.target }} -p w5500-ll --features defmt
- run: cargo build --target ${{ matrix.target }} -p w5500-hl --features defmt
- run: cargo build --target ${{ matrix.target }} -p w5500-dhcp --features defmt
- run: cargo build --target ${{ matrix.target }} -p w5500-dns --features defmt
- run: cargo build --target ${{ matrix.target }} -p w5500-mqtt --features defmt
- run: cargo build --target ${{ matrix.target }} -p w5500-tls --features defmt
- run: cargo build --target ${{ matrix.target }} -p w5500-ll --features eh0,eh1
- run: cargo build --target ${{ matrix.target }} -p w5500-hl --features eh0,eh1
- run: cargo build --target ${{ matrix.target }} -p w5500-dhcp --features eh0,eh1
- run: cargo build --target ${{ matrix.target }} -p w5500-dns --features eh0,eh1
- run: cargo build --target ${{ matrix.target }} -p w5500-mqtt --features eh0,eh1
- run: cargo build --target ${{ matrix.target }} -p w5500-sntp --features eh0,eh1
- run: cargo build --target ${{ matrix.target }} -p w5500-tls --features eh0,eh1
- run: cargo build --target ${{ matrix.target }} -p w5500-dhcp --features log
- run: cargo build --target ${{ matrix.target }} -p w5500-dns --features log
- run: cargo build --target ${{ matrix.target }} -p w5500-mqtt --features log
- run: cargo build --target ${{ matrix.target }} -p w5500-sntp --features log
- run: cargo build --target ${{ matrix.target }} -p w5500-tls --features log
- run: cargo build --target ${{ matrix.target }} -p w5500-sntp --features time
- run: cargo build --target ${{ matrix.target }} -p w5500-sntp --features chrono
- run: cargo build --target ${{ matrix.target }} -p w5500-sntp --features num-rational
- run: cargo build --target ${{ matrix.target }} -p w5500-mqtt --features w5500-tls
- run: cargo build --target ${{ matrix.target }} -p w5500-ll --features eha1
- run: cargo build --target ${{ matrix.target }} -p w5500-tls --features p256-cm4
if: ${{ matrix.target == 'thumbv7em-none-eabi' }}
- run: cargo build --target ${{ matrix.target }} -p w5500-mqtt --features w5500-tls,p256-cm4
if: ${{ matrix.target == 'thumbv7em-none-eabi' }}
test:
name: Test
runs-on: ubuntu-latest
env: {"RUSTFLAGS": "-D warnings"}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly # 1.77
- run: cargo test-all
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly # 1.77
with:
components: clippy
- run: cargo clippy --all-features --all-targets -- --deny warnings
format:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- run: cargo +nightly fmt -- --check
rustdoc:
name: rustdoc
runs-on: ubuntu-latest
env: {"RUSTDOCFLAGS": "-D warnings --cfg docsrs"}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: rustdoc
run: |
cd dhcp
cargo +nightly rustdoc --all-features
cd ../dns
cargo +nightly rustdoc --all-features
cd ../hl
cargo +nightly rustdoc --all-features
cd ../ll
cargo +nightly rustdoc --all-features
cd ../mqtt
cargo +nightly rustdoc --all-features
cd ../regsim
cargo +nightly rustdoc --all-features
cd ../sntp
cargo +nightly rustdoc --all-features
release-ll:
name: w5500-ll crates.io release
if: startsWith(github.ref, 'refs/tags/ll/v')
needs:
- build
- build_no_std
- test
- clippy
- format
- rustdoc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: Publish
run: |
cd ll
cargo publish --no-verify --token ${CRATES_IO_TOKEN}
env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
release-hl:
name: w5500-hl crates.io release
if: startsWith(github.ref, 'refs/tags/hl/v')
needs:
- build
- build_no_std
- test
- clippy
- format
- rustdoc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: Publish
run: |
cd hl
cargo publish --no-verify --token ${CRATES_IO_TOKEN}
env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
release-dhcp:
name: w5500-dhcp crates.io release
if: startsWith(github.ref, 'refs/tags/dhcp/v')
needs:
- build
- build_no_std
- test
- clippy
- format
- rustdoc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: Publish
run: |
cd dhcp
cargo publish --no-verify --token ${CRATES_IO_TOKEN}
env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
release-regsim:
name: w5500-regsim crates.io release
if: startsWith(github.ref, 'refs/tags/regsim/v')
needs:
- build
- build_no_std
- test
- clippy
- format
- rustdoc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: Publish
run: |
cd regsim
cargo publish --no-verify --token ${CRATES_IO_TOKEN}
env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
release-dns:
name: w5500-dns crates.io release
if: startsWith(github.ref, 'refs/tags/dns/v')
needs:
- build
- build_no_std
- test
- clippy
- format
- rustdoc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: Publish
run: |
cd dns
cargo publish --no-verify --token ${CRATES_IO_TOKEN}
env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
release-mqtt:
name: w5500-mqtt crates.io release
if: startsWith(github.ref, 'refs/tags/mqtt/v')
needs:
- build
- build_no_std
- test
- clippy
- format
- rustdoc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: Publish
run: |
cd mqtt
cargo publish --no-verify --token ${CRATES_IO_TOKEN}
env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
release-sntp:
name: w5500-sntp crates.io release
if: startsWith(github.ref, 'refs/tags/sntp/v')
needs:
- build
- build_no_std
- test
- clippy
- format
- rustdoc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: Publish
run: |
cd sntp
cargo publish --no-verify --token ${CRATES_IO_TOKEN}
env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
release-tls:
name: w5500-tls crates.io release
if: startsWith(github.ref, 'refs/tags/tls/v')
needs:
- build
- build_no_std
- test
- clippy
- format
- rustdoc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: Publish
run: |
cd tls
cargo publish --no-verify --token ${CRATES_IO_TOKEN}
env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}