use init struct pattern (#201) #483
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: [ "main" ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
test: | |
name: test-on-${{ matrix.os }}${{ matrix.arch && '-' }}${{ matrix.arch }}${{ matrix.features && '-' }}${{ matrix.features }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: windows-latest | |
no-example: true | |
lint: true | |
- os: windows-latest | |
arch: aarch64 | |
no-example: true | |
no-test: true | |
- os: macos-latest | |
no-example: true | |
lint: true | |
- os: ubuntu-latest | |
lint: true | |
- os: ubuntu-latest | |
arch: arm32 | |
no-example: true | |
no-test: true | |
- os: ubuntu-latest | |
arch: aarch64 | |
no-example: true | |
no-test: true | |
- os: ubuntu-latest | |
features: "use_meter left_handed" | |
lint: true | |
- os: ubuntu-latest | |
features: "async" | |
lint: true | |
- os: ubuntu-latest | |
features: "lightweight async-trait" | |
lint: true | |
- os: ubuntu-latest | |
features: "dynamic_freq" | |
lint: true | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: ./.github/actions/setup-build | |
with: | |
os: ${{ matrix.os }} | |
arch: ${{ matrix.arch }} | |
- uses: taiki-e/install-action@v2 | |
with: | |
tool: nextest | |
if: ${{ matrix.no-test != true }} | |
- run: python3 build.py build --arch "${{ matrix.arch }}" --features "${{ matrix.features }}" ${{ matrix.no-example && '--no-example' }} | |
- run: python3 build.py test --features "${{ matrix.features }}" | |
if: ${{ matrix.no-test != true }} | |
- run: python3 build.py lint --features "${{ matrix.features }}" ${{ matrix.no-example && '--no-example' }} | |
if: ${{ matrix.lint == true }} | |
build-docs: | |
name: build-docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: ./.github/actions/setup-build | |
with: | |
os: ubuntu-latest | |
toolchain: nightly | |
- run: python3 build.py doc | |
- uses: dtolnay/install@cargo-docs-rs | |
- run: | | |
cargo +nightly docs-rs -pautd3 | |
cargo +nightly docs-rs -pautd3-core | |
cargo +nightly docs-rs -pautd3-derive | |
cargo +nightly docs-rs -pautd3-driver | |
cargo +nightly docs-rs -pautd3-firmware-emulator | |
cargo +nightly docs-rs -pautd3-gain-holo | |
cargo +nightly docs-rs -pautd3-link-simulator | |
cargo +nightly docs-rs -pautd3-link-twincat | |
cargo +nightly docs-rs -pautd3-modulation-audio-file | |
cargo +nightly docs-rs -pautd3-protobuf |