Skip to content

Commit

Permalink
Don't build the imac target against ESP IDF 4.4 as this is not suppor…
Browse files Browse the repository at this point in the history
…ted; put ESP IDF 5.3 in the supported targets
  • Loading branch information
ivmarkov committed Jan 2, 2025
1 parent 88541eb commit 15ce753
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
matrix:
target:
- riscv32imc-esp-espidf
- riscv32imac-esp-espidf
- xtensa-esp32-espidf
- xtensa-esp32s2-espidf
- xtensa-esp32s3-espidf
Expand Down Expand Up @@ -57,25 +58,29 @@ jobs:
# run: cargo clippy --features pio --no-deps --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort -- -Dwarnings

- name: Build | Clippy
if: matrix.target != 'riscv32imac-esp-espidf' || matrix.idf-version != 'release/v4.4'
env:
ESP_IDF_VERSION: ${{ matrix.idf-version }}
ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults"
RUSTFLAGS: "${{ startsWith(matrix.idf-version, 'v5') && '--cfg espidf_time64' || startsWith(matrix.idf-version, 'v4') && '--cfg espidf_time32' }}"
run: cargo clippy --no-deps --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort -- -Dwarnings -Adeprecated

- name: Build | Compile (Native)
if: matrix.target != 'riscv32imac-esp-espidf' || matrix.idf-version != 'release/v4.4'
env:
ESP_IDF_VERSION: ${{ matrix.idf-version }}
RUSTFLAGS: "${{ startsWith(matrix.idf-version, 'v5') && '--cfg espidf_time64' || startsWith(matrix.idf-version, 'v4') && '--cfg espidf_time32' }}"
run: cargo build --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort

- name: Build | Compile (Native), no_std
if: matrix.target != 'riscv32imac-esp-espidf' || matrix.idf-version != 'release/v4.4'
env:
ESP_IDF_VERSION: ${{ matrix.idf-version }}
RUSTFLAGS: "${{ startsWith(matrix.idf-version, 'v5') && '--cfg espidf_time64' || startsWith(matrix.idf-version, 'v4') && '--cfg espidf_time32' }}"
run: cargo build --target ${{ matrix.target }} --no-default-features -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort

# - name: Build | Compile (Native), alloc
# if: matrix.target != 'riscv32imac-esp-espidf' || matrix.idf-version != 'release/v4.4'
# env:
# ESP_IDF_VERSION: ${{ matrix.idf-version }}
# RUSTFLAGS: "${{ startsWith(matrix.idf-version, 'v5') && '--cfg espidf_time64' || '' }}"
Expand All @@ -89,6 +94,7 @@ jobs:
chmod a+x $HOME/.cargo/bin/ldproxy
- name: Build | Examples
if: matrix.target != 'riscv32imac-esp-espidf' || matrix.idf-version != 'release/v4.4'
env:
ESP_IDF_VERSION: ${{ matrix.idf-version }}
RUSTFLAGS: "${{ startsWith(matrix.idf-version, 'v5') && '--cfg espidf_time64' || startsWith(matrix.idf-version, 'v4') && '--cfg espidf_time32' }}"
Expand Down
2 changes: 1 addition & 1 deletion build/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub const NO_PATCHES: &[&str] = &[];
pub const V_5_0_PATCHES: &[&str] = &["patches/esp_app_format_weak_v5.0.diff"];

#[allow(dead_code)]
pub const V_4_4_3_PATCHES: &[&str] = &["patches/esp_app_format_weak_v4.4.diff"];
pub const V_4_4_PATCHES: &[&str] = &["patches/esp_app_format_weak_v4.4.diff"];

const TOOLS_WORKSPACE_INSTALL_DIR: &str = ".embuild";

Expand Down
10 changes: 5 additions & 5 deletions build/native/cargo_driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use self::chip::Chip;
use crate::common::{
self, list_specific_sdkconfigs, manifest_dir, sanitize_c_env_vars, sanitize_project_path,
setup_clang_env, workspace_dir, EspIdfBuildOutput, EspIdfComponents, InstallDir, NO_PATCHES,
V_4_4_3_PATCHES, V_5_0_PATCHES,
V_4_4_PATCHES, V_5_0_PATCHES,
};
use crate::config::{BuildConfig, ESP_IDF_GLOB_VAR_PREFIX, ESP_IDF_TOOLS_INSTALL_DIR_VAR};

Expand Down Expand Up @@ -308,17 +308,17 @@ pub fn build() -> Result<EspIdfBuildOutput> {
{
cargo::print_warning(
"Building against ESP-IDF `master` is not officially supported. \
Supported versions are 'v5.2(.X)', 'v5.1(.X)', 'v5.0(.X)', 'v4.4(.X)'",
Supported versions are 'v5.3(.X)', 'v5.2(.X)', 'v5.1(.X)', 'v5.0(.X)', 'v4.4(.X)'",
);
NO_PATCHES
}
Ok((4, 4, _)) => V_4_4_3_PATCHES,
Ok((4, 4, _)) => V_4_4_PATCHES,
Ok((5, 0, _)) => V_5_0_PATCHES,
Ok((5, 1, _)) | Ok((5, 2, _)) => NO_PATCHES,
Ok((5, 1, _)) | Ok((5, 2, _)) | Ok((5, 3, _)) => NO_PATCHES,
Ok((major, minor, patch)) => {
cargo::print_warning(format_args!(
"Building against ESP-IDF version ({major}.{minor}.{patch}) is not officially supported. \
Supported versions are 'v5.2(.X)', 'v5.1(.X)', 'v5.0(.X)', 'v4.4(.X)'",
Supported versions are 'v5.3(.X)', 'v5.2(.X)', 'v5.1(.X)', 'v5.0(.X)', 'v4.4(.X)'",
));
NO_PATCHES
}
Expand Down

0 comments on commit 15ce753

Please sign in to comment.