Skip to content

Commit

Permalink
Fix CI, use build instead of check to detect linker errors
Browse files Browse the repository at this point in the history
  • Loading branch information
MabezDev committed Oct 23, 2023
1 parent 2bd4f3e commit 1b131ef
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 64 deletions.
128 changes: 64 additions & 64 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ jobs:
ldproxy: false
- uses: Swatinem/rust-cache@v1

- name: check-fmt
run: cargo fmt --check
- name: build-fmt
run: cargo fmt --build

checks-xtensa:
builds-xtensa:
strategy:
matrix:
chip: ["esp32", "esp32s2", "esp32s3"]
Expand All @@ -55,44 +55,44 @@ jobs:
ldproxy: false
- uses: Swatinem/rust-cache@v1

- name: check
run: cd examples-${{ matrix.chip }} && cargo check
- name: check (common features)
run: cd examples-${{ matrix.chip }} && cargo check --features=async,wifi,esp-now,embassy-net,log
- name: check (common features + defmt)
run: cd examples-${{ matrix.chip }} && cargo check --no-default-features --features=${{ matrix.chip }},async,wifi,esp-now,embassy-net,defmt
- name: check (dhcp)
run: cd examples-${{ matrix.chip }} && cargo build --release --example=dhcp --features=wifi
- name: check (static_ip)
run: cd examples-${{ matrix.chip }} && cargo build --release --example=static_ip --features=wifi
- name: check (esp_now)
run: cd examples-${{ matrix.chip }} && cargo build --release --example=esp_now --features=esp-now
- name: check (embassy_esp_now)
run: cd examples-${{ matrix.chip }} && cargo build --release --example=embassy_esp_now --features=async,esp-now
- name: check (embassy_esp_now_duplex)
run: cd examples-${{ matrix.chip }} && cargo build --release --example=embassy_esp_now_duplex --features=async,esp-now
- name: check (embassy_dhcp)
run: cd examples-${{ matrix.chip }} && cargo build --release --example=embassy_dhcp --features=async,wifi,embassy-net
- name: check (embassy_access_point)
run: cd examples-${{ matrix.chip }} && cargo build --release --example=embassy_access_point --features=async,wifi,embassy-net
- name: build
run: cargo b${{ matrix.chip }}
- name: build (common features)
run: cargo b${{ matrix.chip }} --features=async,wifi,esp-now,embassy-net,log
- name: build (common features + defmt)
run: cargo b${{ matrix.chip }} --no-default-features --features=async,wifi,esp-now,embassy-net,defmt
- name: build (dhcp)
run: cargo b${{ matrix.chip }} --release --example=dhcp --features=wifi
- name: build (static_ip)
run: cargo b${{ matrix.chip }} --release --example=static_ip --features=wifi
- name: build (esp_now)
run: cargo b${{ matrix.chip }} --release --example=esp_now --features=esp-now
- name: build (embassy_esp_now)
run: cargo b${{ matrix.chip }} --release --example=embassy_esp_now --features=async,esp-now
- name: build (embassy_esp_now_duplex)
run: cargo b${{ matrix.chip }} --release --example=embassy_esp_now_duplex --features=async,esp-now
- name: build (embassy_dhcp)
run: cargo b${{ matrix.chip }} --release --example=embassy_dhcp --features=async,wifi,embassy-net
- name: build (embassy_access_point)
run: cargo b${{ matrix.chip }} --release --example=embassy_access_point --features=async,wifi,embassy-net

- name: check (common features + ble)
- name: build (common features + ble)
if: ${{ matrix.chip == 'esp32' || matrix.chip == 'esp32s3' }}
run: cd examples-${{ matrix.chip }} && cargo check --features=async,wifi,ble,esp-now,embassy-net,log
- name: check (common features + ble + defmt)
run: cargo b${{ matrix.chip }} --features=async,wifi,ble,esp-now,embassy-net,log
- name: build (common features + ble + defmt)
if: ${{ matrix.chip == 'esp32' || matrix.chip == 'esp32s3' }}
run: cd examples-${{ matrix.chip }} && cargo check --no-default-features --features=${{ matrix.chip }},async,wifi,ble,esp-now,embassy-net,defmt
- name: check (ble)
run: cargo b${{ matrix.chip }} --no-default-features --features=async,wifi,ble,esp-now,embassy-net,defmt
- name: build (ble)
if: ${{ matrix.chip == 'esp32' || matrix.chip == 'esp32s3' }}
run: cd examples-${{ matrix.chip }} && cargo build --release --example=ble --features=ble
- name: check (async_ble)
run: cargo b${{ matrix.chip }} --release --example=ble --features=ble
- name: build (async_ble)
if: ${{ matrix.chip == 'esp32' || matrix.chip == 'esp32s3' }}
run: cd examples-${{ matrix.chip }} && cargo build --release --example=async_ble --features=async,ble
- name: check (coex)
run: cargo b${{ matrix.chip }} --release --example=async_ble --features=async,ble
- name: build (coex)
if: ${{ matrix.chip == 'esp32' || matrix.chip == 'esp32s3' }}
run: cd examples-${{ matrix.chip }} && cargo build --release --example=coex --features=wifi,ble,coex
run: cargo b${{ matrix.chip }} --release --example=coex --features=wifi,ble,coex

checks-riscv:
builds-riscv:
strategy:
matrix:
chip: ["esp32c2", "esp32c3", "esp32c6"]
Expand All @@ -107,35 +107,35 @@ jobs:
components: rust-src,rustfmt
- uses: Swatinem/rust-cache@v1

- name: check
run: cd examples-${{ matrix.chip }} && cargo +nightly-2023-05-16 check
- name: check (common features)
run: cd examples-${{ matrix.chip }} && cargo +nightly-2023-05-16 check --features=async,wifi,esp-now,embassy-net,log
- name: check (common features + defmt)
run: cd examples-${{ matrix.chip }} && cargo +nightly-2023-05-16 check --no-default-features --features=${{ matrix.chip }},async,wifi,esp-now,embassy-net,defmt
- name: check (dhcp)
run: cd examples-${{ matrix.chip }} && cargo +nightly-2023-05-16 build --release --example=dhcp --features=wifi
- name: check (static_ip)
run: cd examples-${{ matrix.chip }} && cargo +nightly-2023-05-16 build --release --example=static_ip --features=wifi
- name: check (esp_now)
run: cd examples-${{ matrix.chip }} && cargo +nightly-2023-05-16 build --release --example=esp_now --features=esp-now
- name: check (embassy_esp_now)
run: cd examples-${{ matrix.chip }} && cargo +nightly-2023-05-16 build --release --example=embassy_esp_now --features=async,esp-now
- name: check (embassy_esp_now_duplex)
run: cd examples-${{ matrix.chip }} && cargo +nightly-2023-05-16 build --release --example=embassy_esp_now_duplex --features=async,esp-now
- name: check (embassy_dhcp)
run: cd examples-${{ matrix.chip }} && cargo +nightly-2023-05-16 build --release --example=embassy_dhcp --features=async,wifi,embassy-net
- name: check (embassy_access_point)
run: cd examples-${{ matrix.chip }} && cargo +nightly-2023-05-16 build --release --example=embassy_access_point --features=async,wifi,embassy-net
- name: build
run: cargo +nightly-2023-05-16 b${{ matrix.chip }}
- name: build (common features)
run: cargo +nightly-2023-05-16 b${{ matrix.chip }} --features=async,wifi,esp-now,embassy-net,log
- name: build (common features + defmt)
run: cargo +nightly-2023-05-16 b${{ matrix.chip }} --no-default-features --features=async,wifi,esp-now,embassy-net,defmt
- name: build (dhcp)
run: cargo +nightly-2023-05-16 b${{ matrix.chip }} --release --example=dhcp --features=wifi
- name: build (static_ip)
run: cargo +nightly-2023-05-16 b${{ matrix.chip }} --release --example=static_ip --features=wifi
- name: build (esp_now)
run: cargo +nightly-2023-05-16 b${{ matrix.chip }} --release --example=esp_now --features=esp-now
- name: build (embassy_esp_now)
run: cargo +nightly-2023-05-16 b${{ matrix.chip }} --release --example=embassy_esp_now --features=async,esp-now
- name: build (embassy_esp_now_duplex)
run: cargo +nightly-2023-05-16 b${{ matrix.chip }} --release --example=embassy_esp_now_duplex --features=async,esp-now
- name: build (embassy_dhcp)
run: cargo +nightly-2023-05-16 b${{ matrix.chip }} --release --example=embassy_dhcp --features=async,wifi,embassy-net
- name: build (embassy_access_point)
run: cargo +nightly-2023-05-16 b${{ matrix.chip }} --release --example=embassy_access_point --features=async,wifi,embassy-net

- name: check (common features + ble)
run: cd examples-${{ matrix.chip }} && cargo +nightly-2023-05-16 check --features=async,wifi,ble,esp-now,embassy-net,log
- name: check (common features + ble + defmt)
run: cd examples-${{ matrix.chip }} && cargo +nightly-2023-05-16 check --no-default-features --features=${{ matrix.chip }},async,wifi,ble,esp-now,embassy-net,defmt
- name: check (ble)
run: cd examples-${{ matrix.chip }} && cargo +nightly-2023-05-16 build --release --example=ble --features=ble
- name: check (async_ble)
run: cd examples-${{ matrix.chip }} && cargo +nightly-2023-05-16 build --release --example=async_ble --features=async,ble
- name: check (coex)
- name: build (common features + ble)
run: cargo +nightly-2023-05-16 b${{ matrix.chip }} --features=async,wifi,ble,esp-now,embassy-net,log
- name: build (common features + ble + defmt)
run: cargo +nightly-2023-05-16 b${{ matrix.chip }} --no-default-features --features=async,wifi,ble,esp-now,embassy-net,defmt
- name: build (ble)
run: cargo +nightly-2023-05-16 b${{ matrix.chip }} --release --example=ble --features=ble
- name: build (async_ble)
run: cargo +nightly-2023-05-16 b${{ matrix.chip }} --release --example=async_ble --features=async,ble
- name: build (coex)
if: ${{ matrix.chip == 'esp32c3' }}
run: cd examples-${{ matrix.chip }} && cargo +nightly-2023-05-16 build --release --example=coex --features=wifi,ble,coex
run: cargo +nightly-2023-05-16 b${{ matrix.chip }} --release --example=coex --features=wifi,ble,coex
7 changes: 7 additions & 0 deletions esp-wifi/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ esp32c2 = "run --features esp32c2 --target riscv32imc-unknown-none-elf"
esp32c3 = "run --features esp32c3 --target riscv32imc-unknown-none-elf"
esp32c6 = "run --features esp32c6 --target riscv32imac-unknown-none-elf"

besp32 = "build --features esp32 --target xtensa-esp32-none-elf"
besp32s2 = "build --features esp32s2 --target xtensa-esp32s2-none-elf"
besp32s3 = "build --features esp32s3 --target xtensa-esp32s3-none-elf"
besp32c2 = "build --features esp32c2 --target riscv32imc-unknown-none-elf"
besp32c3 = "build --features esp32c3 --target riscv32imc-unknown-none-elf"
besp32c6 = "build --features esp32c6 --target riscv32imac-unknown-none-elf"

[target.riscv32imc-unknown-none-elf]
runner = "espflash flash --monitor"
rustflags = [
Expand Down

0 comments on commit 1b131ef

Please sign in to comment.