CI #3816
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: CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| schedule: | |
| - cron: "50 6 * * *" | |
| workflow_dispatch: | |
| env: | |
| rust_toolchain: nightly | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| jobs: | |
| compile: | |
| name: "${{ matrix.target }} / ${{ matrix.idf-version }}${{ matrix.extra-components-label != '' && format(' (+{0})', matrix.extra-components-label) || '' }}" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: | |
| - riscv32imc-esp-espidf | |
| - riscv32imac-esp-espidf | |
| - riscv32imafc-esp-espidf | |
| - xtensa-esp32-espidf | |
| - xtensa-esp32s2-espidf | |
| - xtensa-esp32s3-espidf | |
| idf-version: | |
| # - v5.1.6 | |
| # - v5.2.5 | |
| - v5.3.4 | |
| - v5.4.3 | |
| - v5.5.3 | |
| - v6.0 | |
| extra-components-label: | |
| - "" | |
| extra-components-files: | |
| - "" | |
| include: | |
| # Also test v6.0 with remote components that were moved out of the main tree | |
| # mqtt and eth SPI drivers work on all targets; eth PHY drivers only support esp32 and esp32p4 | |
| - target: riscv32imc-esp-espidf | |
| idf-version: v6.0 | |
| extra-components-label: v6_mqtt | |
| # We could add v6_eth_spi here, but example is esp32-only. | |
| extra-components-files: ".github/configs/extra_components_v6_mqtt.toml" | |
| - target: xtensa-esp32-espidf | |
| idf-version: v6.0 | |
| extra-components-label: v6_mqtt v6_eth_spi v6_eth_phy | |
| extra-components-files: ".github/configs/extra_components_v6_mqtt.toml,.github/configs/extra_components_v6_eth_spi.toml,.github/configs/extra_components_v6_eth_phy.toml" | |
| # esp32p4 also supports eth, but examples are esp32-only for now | |
| #- target: riscv32imafc-esp-espidf | |
| # idf-version: v6.0 | |
| # extra-components-label: v6_mqtt v6_eth_spi v6_eth_phy | |
| # extra-components-files: ".github/configs/extra_components_v6_mqtt.toml,.github/configs/extra_components_v6_eth_spi.toml,.github/configs/extra_components_v6_eth_phy.toml" | |
| env: | |
| ESP_IDF_SYS_EXTRA_COMPONENTS_FILE: ${{ matrix.extra-components-files }} | |
| steps: | |
| - name: Setup | Checkout | |
| uses: actions/checkout@v3 | |
| - name: Setup | Rust | |
| if: matrix.target == 'riscv32imc-esp-espidf' | |
| uses: dtolnay/rust-toolchain@v1 | |
| with: | |
| toolchain: ${{ env.rust_toolchain }} | |
| components: rustfmt, clippy, rust-src | |
| - name: Install Rust for Xtensa | |
| if: matrix.target != 'riscv32imc-esp-espidf' | |
| uses: esp-rs/xtensa-toolchain@v1.6 | |
| with: | |
| default: true | |
| ldproxy: true | |
| - name: Build | Fmt Check | |
| if: matrix.target != 'riscv32imac-esp-espidf' || matrix.idf-version != 'v4.4.8' | |
| run: cargo fmt -- --check | |
| - name: Build | Clippy | |
| if: matrix.target != 'riscv32imac-esp-espidf' || matrix.idf-version != 'v4.4.8' | |
| env: | |
| ESP_IDF_VERSION: ${{ matrix.idf-version }} | |
| ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults" | |
| RUSTFLAGS: "${{ startsWith(matrix.idf-version, 'v4') && '--cfg espidf_time32' || '--cfg espidf_time64' }}" | |
| run: cargo clippy --features nightly,experimental --no-deps --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -- -Dwarnings | |
| - name: Build | Compile | |
| if: matrix.target != 'riscv32imac-esp-espidf' || matrix.idf-version != 'v4.4.8' | |
| env: | |
| ESP_IDF_VERSION: ${{ matrix.idf-version }} | |
| ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults" | |
| RUSTFLAGS: "${{ startsWith(matrix.idf-version, 'v4') && '--cfg espidf_time32' || '--cfg espidf_time64' }}" | |
| run: cargo build --target ${{ matrix.target }} -Zbuild-std=std,panic_abort | |
| - name: Build | Compile, experimental, nightly, no_std | |
| if: matrix.target != 'riscv32imac-esp-espidf' || matrix.idf-version != 'v4.4.8' | |
| env: | |
| ESP_IDF_VERSION: ${{ matrix.idf-version }} | |
| ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults" | |
| RUSTFLAGS: "${{ startsWith(matrix.idf-version, 'v4') && '--cfg espidf_time32' || '--cfg espidf_time64' }}" | |
| run: cargo build --no-default-features --features nightly,experimental --target ${{ matrix.target }} -Zbuild-std=std,panic_abort | |
| - name: Build | Compile, experimental, nightly, alloc | |
| if: matrix.target != 'riscv32imac-esp-espidf' || matrix.idf-version != 'v4.4.8' | |
| env: | |
| ESP_IDF_VERSION: ${{ matrix.idf-version }} | |
| ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults" | |
| RUSTFLAGS: "${{ startsWith(matrix.idf-version, 'v4') && '--cfg espidf_time32' || '--cfg espidf_time64' }}" | |
| run: cargo build --no-default-features --features nightly,experimental,alloc --target ${{ matrix.target }} -Zbuild-std=std,panic_abort | |
| - name: Setup | ldproxy | |
| if: matrix.target == 'riscv32imc-esp-espidf' | |
| run: | | |
| curl -L https://github.com/esp-rs/embuild/releases/latest/download/ldproxy-x86_64-unknown-linux-gnu.zip -o $HOME/.cargo/bin/ldproxy.zip | |
| unzip "$HOME/.cargo/bin/ldproxy.zip" -d "$HOME/.cargo/bin/" | |
| chmod a+x $HOME/.cargo/bin/ldproxy | |
| - name: Clippy | Examples | |
| if: matrix.target != 'riscv32imac-esp-espidf' || matrix.idf-version != 'v4.4.8' | |
| env: | |
| ESP_IDF_VERSION: ${{ matrix.idf-version }} | |
| ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults" | |
| RUSTFLAGS: "${{ startsWith(matrix.idf-version, 'v4') && '--cfg espidf_time32' || '--cfg espidf_time64' }}" | |
| WIFI_SSID: "ssid" | |
| WIFI_PASS: "pass" | |
| ESP_DEVICE_IP: "192.168.1.250" | |
| GATEWAY_IP: "192.168.1.1" | |
| GATEWAY_NETMASK: "24" | |
| run: cargo clippy --examples --features experimental --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -- -Dwarnings | |
| - name: Build | Examples | |
| if: matrix.target != 'riscv32imac-esp-espidf' || matrix.idf-version != 'v4.4.8' | |
| env: | |
| ESP_IDF_VERSION: ${{ matrix.idf-version }} | |
| ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults" | |
| RUSTFLAGS: "${{ startsWith(matrix.idf-version, 'v4') && '--cfg espidf_time32' || '--cfg espidf_time64' }}" | |
| WIFI_SSID: "ssid" | |
| WIFI_PASS: "pass" | |
| ESP_DEVICE_IP: "192.168.1.250" | |
| GATEWAY_IP: "192.168.1.1" | |
| GATEWAY_NETMASK: "24" | |
| run: cargo build --examples --features experimental --target ${{ matrix.target }} -Zbuild-std=std,panic_abort |