Skip to content

Commit 15991b5

Browse files
HIL: Allow manually running tests on other repos/branches (#625)
* style: Covnert println to log message * ci: Allow manual trigger in other repo and branch
1 parent 7cd71c8 commit 15991b5

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

.github/workflows/hil.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,15 @@ on:
1212
- "**/ci.yml"
1313
- "**/*.md"
1414
workflow_dispatch:
15-
15+
inputs:
16+
repository:
17+
description: "Owner and repository to test"
18+
required: true
19+
default: 'esp-rs/espflash'
20+
branch:
21+
description: "Branch, tag or SHA to checkout."
22+
required: true
23+
default: "main"
1624
env:
1725
CARGO_TERM_COLOR: always
1826

@@ -31,6 +39,13 @@ jobs:
3139
runs-on: ubuntu-20.04
3240
steps:
3341
- uses: actions/checkout@v4
42+
if: github.event_name != 'workflow_dispatch'
43+
44+
- uses: actions/checkout@v4
45+
if: github.event_name == 'workflow_dispatch'
46+
with:
47+
repository: ${{ github.event.inputs.repository }}
48+
ref: ${{ github.event.inputs.branch }}
3449

3550
- uses: ./.github/actions/setup-target
3651
with:

espflash/src/targets/esp32c2.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
use std::{collections::HashMap, ops::Range};
22

3+
use log::debug;
4+
35
#[cfg(feature = "serialport")]
46
use crate::{connection::Connection, targets::bytes_to_mac_addr};
57
use crate::{
@@ -95,11 +97,11 @@ impl Target for Esp32c2 {
9597
) -> Result<IdfBootloaderFormat<'a>, Error> {
9698
let booloader: &'static [u8] = match xtal_freq {
9799
XtalFrequency::_40Mhz => {
98-
println!("Using 40MHz bootloader");
100+
debug!("Using 40MHz bootloader");
99101
include_bytes!("../../resources/bootloaders/esp32c2-bootloader.bin")
100102
}
101103
XtalFrequency::_26Mhz => {
102-
println!("Using 26MHz bootloader");
104+
debug!("Using 26MHz bootloader");
103105
include_bytes!("../../resources/bootloaders/esp32c2_26-bootloader.bin")
104106
}
105107
_ => {

0 commit comments

Comments
 (0)