From 21b2ce626dddc4326b1d28df1a5f3f5ef0f07dcc Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Mon, 23 Dec 2024 09:15:12 +0000 Subject: [PATCH] Extend the CI against ESP-IDF master with more branches --- .github/workflows/ci-esp-idf-master.yml | 41 ----------- .github/workflows/ci-esp-idf-next.yml | 95 +++++++++++++++++++++++++ 2 files changed, 95 insertions(+), 41 deletions(-) delete mode 100644 .github/workflows/ci-esp-idf-master.yml create mode 100644 .github/workflows/ci-esp-idf-next.yml diff --git a/.github/workflows/ci-esp-idf-master.yml b/.github/workflows/ci-esp-idf-master.yml deleted file mode 100644 index 84f46911165..00000000000 --- a/.github/workflows/ci-esp-idf-master.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: CIEspIdfMaster - -on: - push: - branches: - - master - workflow_dispatch: - schedule: - - cron: '50 5 * * *' - -env: - rust_toolchain: nightly - -jobs: - compile: - name: Compile - runs-on: ubuntu-latest - steps: - - name: Setup | Checkout - uses: actions/checkout@v3 - - - name: Setup | Rust - uses: dtolnay/rust-toolchain@v1 - with: - toolchain: ${{ env.rust_toolchain }} - components: rustfmt, clippy, rust-src - - - name: Build | Fmt Check - run: cargo fmt -- --check - - - name: Build | Compile Native ESP-IDF master no_std - run: export RUSTFLAGS="--cfg espidf_time64"; export ESP_IDF_VERSION=master; export ESP_IDF_SDKCONFIG_DEFAULTS=$(pwd)/.github/configs/sdkconfig.defaults; cargo clean; cargo build --no-default-features --target riscv32imc-esp-espidf -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort - - - name: Setup | ldproxy - 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: Build | Compile Native ESP-IDF master examples - run: export RUSTFLAGS="--cfg espidf_time64"; export ESP_IDF_VERSION=master; export ESP_IDF_SDKCONFIG_DEFAULTS=$(pwd)/.github/configs/sdkconfig.defaults; cargo clean; cargo build --examples --target riscv32imc-esp-espidf -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort diff --git a/.github/workflows/ci-esp-idf-next.yml b/.github/workflows/ci-esp-idf-next.yml new file mode 100644 index 00000000000..78334c6cf47 --- /dev/null +++ b/.github/workflows/ci-esp-idf-next.yml @@ -0,0 +1,95 @@ +name: CIEspIdfNext + +on: + push: + branches: + - master + workflow_dispatch: + schedule: + - cron: '50 5 * * *' + +env: + rust_toolchain: nightly + +jobs: + compile: + name: Compile + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + target: + - riscv32imc-esp-espidf + - riscv32imac-esp-espidf + - xtensa-esp32-espidf + - xtensa-esp32s2-espidf + - xtensa-esp32s3-espidf + idf-version: + - release/v5.3 + - release/v5.4 + - master + steps: + - name: Setup | Checkout + uses: actions/checkout@v3 + + - name: Setup | libncurses5 + run: sudo apt-get install libncurses5 + + - 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.5.1 + with: + default: true + + - name: Build | Fmt Check + run: cargo fmt -- --check + + - name: Build | Clippy + env: + ESP_IDF_VERSION: ${{ matrix.idf-version }} + ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults" + RUSTFLAGS: "${{ matrix.idf-version != 'release/v4.4' && '--cfg espidf_time64' || matrix.idf-version == 'release/v4.4' && '--cfg espidf_time32' }}" + run: cargo clippy --features experimental --no-deps --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort -- -Dwarnings + + - name: Build | Compile, all + env: + ESP_IDF_VERSION: ${{ matrix.idf-version }} + ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults" + RUSTFLAGS: "${{ matrix.idf-version != 'release/v4.4' && '--cfg espidf_time64' || matrix.idf-version == 'release/v4.4' && '--cfg espidf_time32' }}" + run: cargo build --target ${{ matrix.target }} --features nightly,experimental,critical-section,embassy-sync -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort + + - name: Build | Compile, no_std + env: + ESP_IDF_VERSION: ${{ matrix.idf-version }} + ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults" + RUSTFLAGS: "${{ matrix.idf-version != 'release/v4.4' && '--cfg espidf_time64' || matrix.idf-version == 'release/v4.4' && '--cfg espidf_time32' }}" + run: cargo build --no-default-features --features experimental --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort + + - name: Build | Compile, no_std, alloc + env: + ESP_IDF_VERSION: ${{ matrix.idf-version }} + ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults" + RUSTFLAGS: "${{ matrix.idf-version != 'release/v4.4' && '--cfg espidf_time64' || matrix.idf-version == 'release/v4.4' && '--cfg espidf_time32' }}" + run: cargo build --features alloc --no-default-features --features experimental --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_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: Build | Examples + if: matrix.target != 'riscv32imac-esp-espidf' + env: + ESP_IDF_VERSION: ${{ matrix.idf-version }} + ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults" + RUSTFLAGS: "${{ matrix.idf-version != 'release/v4.4' && '--cfg espidf_time64' || matrix.idf-version == 'release/v4.4' && '--cfg espidf_time32' }} ${{ matrix.target == 'riscv32imc-esp-espidf' && '-C default-linker-libraries' || ''}}" + run: cargo build --examples --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort