Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nightly CI errors #3123

Merged
merged 2 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions .github/workflows/ci_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ env:
DEFMT_LOG: trace

jobs:

esp-hal-nightly:
name: esp-hal | nightly (${{ matrix.device.soc }})
runs-on: ubuntu-latest
Expand Down Expand Up @@ -52,20 +51,18 @@ jobs:
target: ${{ matrix.device.target }}
toolchain: nightly

- name: Create or Update GitHub Issue
if: failure()
- if: failure()
name: Create or Update GitHub Issue
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
sudo apt-get install gh -y
ISSUE_NAME=$(gh issue list --state open --search "Nightly CI Failure in:title" --json number --jq '.[0].number')

if [[ -n "$ISSUE_NAME" ]]; then
gh issue comment "$ISSUE_NAME" \
--body "Another CI failure detected! [View the failed job](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})."
else
if [[ -n "$ISSUE_NAME" ]];
then
gh issue create \
--title "Nightly CI Failure" \
--body "Nightly CI Workflow Failed! [View the failed job](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})." \
--label "ci-nightly"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion esp-hal/src/soc/efuse_field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl Efuse {
}

// get data length in bytes (ceil)
let byte_len = (word_bit_len + 7) / 8;
let byte_len = word_bit_len.div_ceil(8);
// represent word as a byte slice
let word_bytes =
unsafe { core::slice::from_raw_parts(&word as *const u32 as *const u8, byte_len) };
Expand Down
2 changes: 1 addition & 1 deletion esp-ieee802154/src/hal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ pub(crate) fn set_multipan_enable_mask(mask: u8) {
// apparently the REGS are garbage and the struct is right?
IEEE802154::regs()
.ctrl_cfg()
.modify(|r, w| unsafe { w.bits(r.bits() & !(0b1111 << 29) | (mask as u32) << 29) });
.modify(|r, w| unsafe { w.bits(r.bits() & !(0b1111 << 29) | ((mask as u32) << 29)) });
}

#[inline(always)]
Expand Down
4 changes: 2 additions & 2 deletions esp-lp-hal/src/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub struct Input<const PIN: u8>;
impl<const PIN: u8> Input<PIN> {
/// Read the input state/level of the pin.
pub fn input_state(&self) -> bool {
unsafe { &*LpIo::PTR }.in_().read().bits() >> PIN & 0x1 != 0
(unsafe { &*LpIo::PTR }.in_().read().bits() >> PIN) & 0x1 != 0
}
}

Expand All @@ -49,7 +49,7 @@ pub struct Output<const PIN: u8>;
impl<const PIN: u8> Output<PIN> {
/// Read the output state/level of the pin.
pub fn output_state(&self) -> bool {
unsafe { &*LpIo::PTR }.out().read().bits() >> PIN & 0x1 != 0
(unsafe { &*LpIo::PTR }.out().read().bits() >> PIN) & 0x1 != 0
}

/// Set the output state/level of the pin.
Expand Down
6 changes: 3 additions & 3 deletions esp-lp-hal/src/i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ impl LpI2c {
self.add_cmd_lp(&mut cmd_iterator, Command::Start)?;

// Load device address and R/W bit into FIFO
self.write_fifo(addr << 1 | OperationType::Write as u8);
self.write_fifo((addr << 1) | OperationType::Write as u8);

self.add_cmd_lp(
&mut cmd_iterator,
Expand Down Expand Up @@ -285,7 +285,7 @@ impl LpI2c {
self.add_cmd_lp(&mut cmd_iterator, Command::Start)?;

// Load device address
self.write_fifo(addr << 1 | OperationType::Read as u8);
self.write_fifo((addr << 1) | OperationType::Read as u8);

self.add_cmd_lp(
&mut cmd_iterator,
Expand All @@ -297,7 +297,7 @@ impl LpI2c {
)?;

self.enable_interrupts(
1 << LP_I2C_TRANS_COMPLETE_INT_ST_S | 1 << LP_I2C_END_DETECT_INT_ST_S,
(1 << LP_I2C_TRANS_COMPLETE_INT_ST_S) | (1 << LP_I2C_END_DETECT_INT_ST_S),
);

let mut remaining_bytes = buffer.len();
Expand Down
2 changes: 1 addition & 1 deletion esp-wifi/src/ble/npl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ unsafe extern "C" fn task_create(
task_handle: *const c_void,
core_id: u32,
) -> i32 {
let name_str = str_from_c(name as *const u8);
let name_str = str_from_c(name as *const _);
trace!(
"task_create {:?} {} {} {:?} {} {:?} {}",
task_func,
Expand Down
1 change: 1 addition & 0 deletions esp-wifi/src/wifi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1628,6 +1628,7 @@ pub(crate) fn wifi_start() -> Result<(), WifiError> {
.copy_from_slice(crate::CONFIG.country_code.as_bytes());
cntry_code[2] = crate::CONFIG.country_code_operating_class;

#[allow(clippy::useless_transmute)]
let country = wifi_country_t {
cc: core::mem::transmute::<[u8; 3], [core::ffi::c_char; 3]>(cntry_code),
schan: 1,
Expand Down
7 changes: 4 additions & 3 deletions esp-wifi/src/wifi/os_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ pub unsafe extern "C" fn task_create_pinned_to_core(
) -> i32 {
trace!("task_create_pinned_to_core task_func {:?} name {} stack_depth {} param {:?} prio {}, task_handle {:?} core_id {}",
task_func,
str_from_c(name as *const u8),
str_from_c(name as *const _),
stack_depth,
param,
prio,
Expand Down Expand Up @@ -1024,6 +1024,7 @@ pub unsafe extern "C" fn phy_enable() {
/// Don't support
///
/// *************************************************************************
#[allow(clippy::unnecessary_cast)]
pub unsafe extern "C" fn phy_update_country_info(
country: *const crate::binary::c_types::c_char,
) -> crate::binary::c_types::c_int {
Expand Down Expand Up @@ -1455,7 +1456,7 @@ pub unsafe extern "C" fn log_write(
format: *const crate::binary::c_types::c_char,
args: ...
) {
crate::binary::log::syslog(level, format as *const u8, args);
crate::binary::log::syslog(level, format as *const _, args);
}

/// **************************************************************************
Expand Down Expand Up @@ -1484,7 +1485,7 @@ pub unsafe extern "C" fn log_writev(
) {
crate::binary::log::syslog(
level,
format as *const u8,
format as *const _,
core::mem::transmute::<crate::binary::include::va_list, core::ffi::VaListImpl<'_>>(args),
);
}
Expand Down