CI #758
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: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
schedule: | |
- cron: '50 4 * * *' | |
env: | |
rust_toolchain: nightly | |
jobs: | |
compile: | |
name: Compile | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- xtensa-esp32s3-espidf | |
idf-version: | |
- release/v5.0 | |
steps: | |
- name: Setup | Checkout | |
uses: actions/checkout@v3 | |
# fixes missing libclang error | |
- name: Setup | libncurses5 | |
run: sudo apt-get install libncurses5 | |
- name: Setup | Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ env.rust_toolchain }} | |
components: rustfmt, clippy | |
if: matrix.target == 'riscv32imc-esp-espidf' | |
- name: Setup | Std | |
run: rustup component add rust-src --toolchain ${{ env.rust_toolchain }}-x86_64-unknown-linux-gnu | |
if: matrix.target == 'riscv32imc-esp-espidf' | |
- name: Install Rust for Xtensa | |
uses: esp-rs/[email protected] | |
with: | |
default: true | |
version: "1.66.0" | |
ldproxy: true | |
if: matrix.target == 'xtensa-esp32s3-espidf' | |
- name: Build | Fmt Check (production) | |
run: cargo fmt -- --check | |
working-directory: ./anemometer-production | |
if: matrix.target == 'xtensa-esp32s3-espidf' | |
- name: Build | Fmt Check (calibration) | |
run: cargo fmt -- --check | |
working-directory: ./anemometer-production | |
if: matrix.target == 'xtensa-esp32s3-espidf' | |
- name: Setup | ldproxy | |
run: cargo install ldproxy | |
if: matrix.target == 'riscv32imc-esp-espidf' | |
- name: Build | Compile (production) | |
env: | |
RUSTFLAGS: "${{ matrix.idf-version == 'release/v5.0' && '--cfg espidf_time64' || ''}}" | |
RUST_ESP32_ANEMOMETER_WIFI_SSID: "" | |
RUST_ESP32_ANEMOMETER_WIFI_PASS: "" | |
ESP_IDF_VERSION: ${{ matrix.idf-version }} | |
ESP_IDF_SDKCONFIG_DEFAULTS: $(pwd)/.github/configs/sdkconfig.defaults | |
run: cargo build --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort | |
working-directory: ./anemometer-production | |
if: matrix.target == 'xtensa-esp32s3-espidf' | |
- name: Run rust-clippy (production) | |
env: | |
RUSTFLAGS: "${{ matrix.idf-version == 'release/v5.0' && '--cfg espidf_time64' || ''}}" | |
RUST_ESP32_ANEMOMETER_WIFI_SSID: "" | |
RUST_ESP32_ANEMOMETER_WIFI_PASS: "" | |
ESP_IDF_VERSION: ${{ matrix.idf-version }} | |
ESP_IDF_SDKCONFIG_DEFAULTS: $(pwd)/.github/configs/sdkconfig.defaults | |
run: cargo clippy --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort | |
continue-on-error: true | |
working-directory: ./anemometer-production | |
if: matrix.target == 'xtensa-esp32s3-espidf' | |
- name: Build | Compile (calibration) | |
env: | |
RUSTFLAGS: "${{ matrix.idf-version == 'release/v5.0' && '--cfg espidf_time64' || ''}}" | |
RUST_ESP32_ANEMOMETER_WIFI_SSID: "" | |
RUST_ESP32_ANEMOMETER_WIFI_PASS: "" | |
ESP_IDF_VERSION: ${{ matrix.idf-version }} | |
ESP_IDF_SDKCONFIG_DEFAULTS: $(pwd)/.github/configs/sdkconfig.defaults | |
run: cargo build --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort | |
working-directory: ./anemometer-calibration | |
if: matrix.target == 'xtensa-esp32s3-espidf' | |