- run arm-iar using github action
- add skip_ci.txt to family folder to skip boards in ci run
This commit is contained in:
62
.github/workflows/build.yml
vendored
62
.github/workflows/build.yml
vendored
@@ -110,35 +110,51 @@ jobs:
|
|||||||
one-per-family: true
|
one-per-family: true
|
||||||
|
|
||||||
# ---------------------------------------
|
# ---------------------------------------
|
||||||
# Build IAR on HFP self-hosted
|
# Build IAR
|
||||||
# Since IAR Token secret is not passed to forked PR, only build on PR from the same repo
|
# Since IAR Token secret is not passed to forked PR, only build on PR from the same repo
|
||||||
# ---------------------------------------
|
# ---------------------------------------
|
||||||
arm-iar:
|
arm-iar:
|
||||||
if: github.repository_owner == 'hathach' && github.event_name == 'push'
|
if: github.repository_owner == 'hathach' && github.event_name == 'push'
|
||||||
needs: set-matrix
|
needs: set-matrix
|
||||||
runs-on: [self-hosted, Linux, X64, hifiphile]
|
uses: ./.github/workflows/build_util.yml
|
||||||
env:
|
secrets: inherit
|
||||||
BUILD_ARGS: ${{ join(fromJSON(needs.set-matrix.outputs.json)['arm-iar'], ' ') }}
|
strategy:
|
||||||
IAR_LMS_BEARER_TOKEN: ${{ secrets.IAR_LMS_BEARER_TOKEN }}
|
fail-fast: false
|
||||||
steps:
|
matrix:
|
||||||
- name: Clean workspace
|
build-system:
|
||||||
run: |
|
- 'cmake'
|
||||||
echo "Cleaning up previous run"
|
with:
|
||||||
rm -rf "${{ github.workspace }}"
|
build-system: ${{ matrix.build-system }}
|
||||||
mkdir -p "${{ github.workspace }}"
|
toolchain: 'arm-iar'
|
||||||
|
build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)['arm-iar']) }}
|
||||||
|
one-per-family: ${{ github.event_name == 'push' }}
|
||||||
|
|
||||||
- name: Toolchain version
|
# arm-iar:
|
||||||
run: |
|
# if: github.repository_owner == 'hathach' && github.event_name == 'push'
|
||||||
iccarm --version
|
# needs: set-matrix
|
||||||
|
# runs-on: [self-hosted, Linux, X64, hifiphile]
|
||||||
- name: Checkout TinyUSB
|
# env:
|
||||||
uses: actions/checkout@v4
|
# BUILD_ARGS: ${{ join(fromJSON(needs.set-matrix.outputs.json)['arm-iar'], ' ') }}
|
||||||
|
# IAR_LMS_BEARER_TOKEN: ${{ secrets.IAR_LMS_BEARER_TOKEN }}
|
||||||
- name: Get Dependencies
|
# steps:
|
||||||
run: python3 tools/get_deps.py $BUILD_ARGS
|
# - name: Clean workspace
|
||||||
|
# run: |
|
||||||
- name: Build
|
# echo "Cleaning up previous run"
|
||||||
run: python3 tools/build.py --one-per-family --toolchain iar $BUILD_ARGS
|
# rm -rf "${{ github.workspace }}"
|
||||||
|
# mkdir -p "${{ github.workspace }}"
|
||||||
|
#
|
||||||
|
# - name: Toolchain version
|
||||||
|
# run: |
|
||||||
|
# iccarm --version
|
||||||
|
#
|
||||||
|
# - name: Checkout TinyUSB
|
||||||
|
# uses: actions/checkout@v4
|
||||||
|
#
|
||||||
|
# - name: Get Dependencies
|
||||||
|
# run: python3 tools/get_deps.py $BUILD_ARGS
|
||||||
|
#
|
||||||
|
# - name: Build
|
||||||
|
# run: python3 tools/build.py --one-per-family --toolchain iar $BUILD_ARGS
|
||||||
|
|
||||||
# ---------------------------------------
|
# ---------------------------------------
|
||||||
# Zephyr
|
# Zephyr
|
||||||
|
2
.github/workflows/build_util.yml
vendored
2
.github/workflows/build_util.yml
vendored
@@ -58,6 +58,8 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
|
env:
|
||||||
|
IAR_LMS_BEARER_TOKEN: ${{ secrets.IAR_LMS_BEARER_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ inputs.toolchain }}" == "esp-idf" ]; then
|
if [ "${{ inputs.toolchain }}" == "esp-idf" ]; then
|
||||||
docker run --rm -v $PWD:/project -w /project espressif/idf:tinyusb python tools/build.py ${{ matrix.arg }}
|
docker run --rm -v $PWD:/project -w /project espressif/idf:tinyusb python tools/build.py ${{ matrix.arg }}
|
||||||
|
7
hw/bsp/rp2040/skip_ci.txt
Normal file
7
hw/bsp/rp2040/skip_ci.txt
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# boards in this files are skipped when running CI with this family
|
||||||
|
adafruit_feather_rp2040_usb_host
|
||||||
|
adafruit_fruit_jam
|
||||||
|
adafruit_metro_rp2350
|
||||||
|
feather_rp2040_max3421
|
||||||
|
pico_sdk
|
||||||
|
raspberry_pi_pico_w
|
@@ -184,7 +184,7 @@ static MFXSTM32L152_Object_t mfx_obj = { 0 };
|
|||||||
static MFXSTM32L152_IO_Mode_t* mfx_io = NULL;
|
static MFXSTM32L152_IO_Mode_t* mfx_io = NULL;
|
||||||
static uint32_t mfx_vbus_pin[2] = { MFXSTM32L152_GPIO_PIN_7, MFXSTM32L152_GPIO_PIN_9 };
|
static uint32_t mfx_vbus_pin[2] = { MFXSTM32L152_GPIO_PIN_7, MFXSTM32L152_GPIO_PIN_9 };
|
||||||
|
|
||||||
int32_t board_i2c_init(void) {
|
static int32_t board_i2c_init(void) {
|
||||||
__HAL_RCC_I2C1_CLK_ENABLE();
|
__HAL_RCC_I2C1_CLK_ENABLE();
|
||||||
__HAL_RCC_I2C1_FORCE_RESET();
|
__HAL_RCC_I2C1_FORCE_RESET();
|
||||||
__HAL_RCC_I2C1_RELEASE_RESET();
|
__HAL_RCC_I2C1_RELEASE_RESET();
|
||||||
@@ -200,16 +200,16 @@ int32_t board_i2c_init(void) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t board_i2c_deinit(void) {
|
static int32_t board_i2c_deinit(void) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t i2c_readreg(uint16_t DevAddr, uint16_t Reg, uint8_t *pData, uint16_t Length) {
|
static int32_t i2c_readreg(uint16_t DevAddr, uint16_t Reg, uint8_t *pData, uint16_t Length) {
|
||||||
TU_ASSERT (HAL_OK == HAL_I2C_Mem_Read(&i2c_handle, DevAddr, Reg, I2C_MEMADD_SIZE_8BIT, pData, Length, 10000));
|
TU_ASSERT (HAL_OK == HAL_I2C_Mem_Read(&i2c_handle, DevAddr, Reg, I2C_MEMADD_SIZE_8BIT, pData, Length, 10000));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t i2c_writereg(uint16_t DevAddr, uint16_t Reg, uint8_t *pData, uint16_t Length) {
|
static int32_t i2c_writereg(uint16_t DevAddr, uint16_t Reg, uint8_t *pData, uint16_t Length) {
|
||||||
TU_ASSERT(HAL_OK == HAL_I2C_Mem_Write(&i2c_handle, DevAddr, Reg, I2C_MEMADD_SIZE_8BIT, pData, Length, 10000));
|
TU_ASSERT(HAL_OK == HAL_I2C_Mem_Write(&i2c_handle, DevAddr, Reg, I2C_MEMADD_SIZE_8BIT, pData, Length, 10000));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -249,7 +249,7 @@ static inline void board_init2(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// VBUS1 is actually controlled by USB3320C PHY (using dwc2 drivebus signal)
|
// VBUS1 is actually controlled by USB3320C PHY (using dwc2 drivebus signal)
|
||||||
void board_vbus_set(uint8_t rhport, bool state) {
|
static void board_vbus_set(uint8_t rhport, bool state) {
|
||||||
if (mfx_io) {
|
if (mfx_io) {
|
||||||
mfx_io->IO_WritePin(&mfx_obj, mfx_vbus_pin[rhport], state);
|
mfx_io->IO_WritePin(&mfx_obj, mfx_vbus_pin[rhport], state);
|
||||||
}
|
}
|
||||||
|
@@ -80,7 +80,7 @@ void OTG_HS_IRQHandler(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TRACE_ETM
|
#ifdef TRACE_ETM
|
||||||
void trace_etm_init(void) {
|
static void trace_etm_init(void) {
|
||||||
// H7 trace pin is PE2 to PE6
|
// H7 trace pin is PE2 to PE6
|
||||||
GPIO_InitTypeDef gpio_init;
|
GPIO_InitTypeDef gpio_init;
|
||||||
gpio_init.Pin = GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6;
|
gpio_init.Pin = GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6;
|
||||||
@@ -94,7 +94,7 @@ void trace_etm_init(void) {
|
|||||||
DBGMCU->CR |= DBGMCU_CR_DBG_TRACECKEN | DBGMCU_CR_DBG_CKD1EN | DBGMCU_CR_DBG_CKD3EN;
|
DBGMCU->CR |= DBGMCU_CR_DBG_TRACECKEN | DBGMCU_CR_DBG_CKD1EN | DBGMCU_CR_DBG_CKD3EN;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define trace_etm_init()
|
#define trace_etm_init()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void board_init(void) {
|
void board_init(void) {
|
||||||
|
@@ -182,9 +182,14 @@ def build_boards_list(boards, toolchain, build_system, build_flags_on):
|
|||||||
|
|
||||||
|
|
||||||
def build_family(family, toolchain, build_system, build_flags_on, one_per_family, boards):
|
def build_family(family, toolchain, build_system, build_flags_on, one_per_family, boards):
|
||||||
|
skip_ci = ['pico_sdk']
|
||||||
|
if os.getenv('GITHUB_ACTIONS') or os.getenv('CIRCLECI'):
|
||||||
|
skip_ci_file = Path(f"hw/bsp/{family}/skip_ci.txt")
|
||||||
|
if skip_ci_file.exists():
|
||||||
|
skip_ci = skip_ci_file.read_text().split()
|
||||||
all_boards = []
|
all_boards = []
|
||||||
for entry in os.scandir(f"hw/bsp/{family}/boards"):
|
for entry in os.scandir(f"hw/bsp/{family}/boards"):
|
||||||
if entry.is_dir() and entry.name != 'pico_sdk':
|
if entry.is_dir() and not entry.name in skip_ci:
|
||||||
all_boards.append(entry.name)
|
all_boards.append(entry.name)
|
||||||
all_boards.sort()
|
all_boards.sort()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user