chore: Release #1094
This file contains hidden or 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: Continuous Integration | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| style: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo fmt -- --check | |
| - run: cargo check | |
| - run: cargo clippy --workspace --all-targets --all-features -- -D warnings | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| cache-dependency-path: py/pyproject.toml | |
| - name: Install Python tools | |
| working-directory: py | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e ".[dev,test]" | |
| - name: Check Python | |
| working-directory: py | |
| run: python -m ruff format --check miniconf test.py | |
| - working-directory: py | |
| run: python -m ruff check miniconf test.py | |
| - working-directory: py | |
| run: python -m compileall miniconf test.py | |
| documentation: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: RUSTDOCFLAGS="-D warnings" cargo doc --all-features --no-deps | |
| compile: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| toolchain: | |
| - stable | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust ${{ matrix.toolchain }} | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.toolchain }} | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo check --verbose | |
| - run: cargo build --no-default-features | |
| - run: cargo build | |
| - run: cargo build --release | |
| - run: cargo build --examples | |
| - run: cargo run --example cli | |
| - run: cargo run --example scpi | |
| - run: cargo run --example trace --features schema | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| toolchain: | |
| - stable | |
| command: | |
| - cargo test | |
| - cargo test --no-default-features | |
| - cargo test -p miniconf --no-default-features | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Start Broker | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y mosquitto mosquitto-clients | |
| sudo service mosquitto start | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{matrix.toolchain}} | |
| components: rust-src | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: ${{ matrix.command }} | |
| package: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| cache-dependency-path: py/pyproject.toml | |
| - name: Build Python package | |
| working-directory: py | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install build | |
| python -m build | |
| web: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| cache-dependency-path: web/package-lock.json | |
| - run: npm ci | |
| working-directory: web | |
| - run: npm test | |
| working-directory: web | |
| - run: npm run build | |
| working-directory: web | |
| - name: Check static Pages artifact | |
| working-directory: web | |
| run: | | |
| test -s dist/index.html | |
| test "$(find dist -type f | wc -l)" -eq 1 | |
| test-embedded: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| target: thumbv7m-none-eabi | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install QEMU | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y qemu-system-arm binutils-arm-none-eabi | |
| - run: cargo build --bins | |
| env: | |
| RUSTFLAGS: -D warnings | |
| working-directory: miniconf/tests/benchmark | |
| - run: ./run.sh | |
| env: | |
| RUSTFLAGS: -D warnings | |
| working-directory: miniconf/tests/benchmark | |
| test-mqtt: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| example: | |
| - mqtt | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Start Broker | |
| run: | | |
| sudo apt-get install mosquitto mosquitto-clients | |
| sudo service mosquitto start | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: sh py/test.sh |