From 2faad42cb1d258155f714e5140bb27bc1ed30caf Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 17 Mar 2023 15:54:25 +0700 Subject: [PATCH] update ci - remove submodules init - pre-commit: forbid new submodule, run in ci --- .github/workflows/build_aarch64.yml | 3 --- .github/workflows/build_arm.yml | 8 +------- .github/workflows/build_iar.yml | 8 +++----- .github/workflows/build_msp430.yml | 5 +---- .github/workflows/build_renesas.yml | 3 --- .github/workflows/build_riscv.yml | 3 --- .github/workflows/build_win_mac.yml | 3 --- .github/workflows/pre-commit.yml | 3 +++ .pre-commit-config.yaml | 3 ++- 9 files changed, 10 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build_aarch64.yml b/.github/workflows/build_aarch64.yml index 30df2bdf0..cc8ddb070 100644 --- a/.github/workflows/build_aarch64.yml +++ b/.github/workflows/build_aarch64.yml @@ -42,9 +42,6 @@ jobs: - name: Checkout TinyUSB uses: actions/checkout@v3 - - name: Checkout common submodules in lib - run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip - - name: Checkout hathach/linkermap uses: actions/checkout@v3 with: diff --git a/.github/workflows/build_arm.yml b/.github/workflows/build_arm.yml index b5a92d6e3..7aecb8386 100644 --- a/.github/workflows/build_arm.yml +++ b/.github/workflows/build_arm.yml @@ -65,9 +65,6 @@ jobs: - name: Checkout TinyUSB uses: actions/checkout@v3 - - name: Checkout common submodules in lib - run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip - - name: Checkout hathach/linkermap uses: actions/checkout@v3 with: @@ -145,9 +142,6 @@ jobs: - name: Checkout TinyUSB uses: actions/checkout@v3 - - name: Checkout common submodules in lib - run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip - - name: Build run: python3 tools/build_board.py ${{ matrix.example }} @@ -275,4 +269,4 @@ jobs: - name: Test dfu_runtime run: | ./flash.sh dfu_runtime.elf - while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 10 ]; do :; done + while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 10 ]; do :; done diff --git a/.github/workflows/build_iar.yml b/.github/workflows/build_iar.yml index afb6efb6b..a5d24892f 100644 --- a/.github/workflows/build_iar.yml +++ b/.github/workflows/build_iar.yml @@ -30,7 +30,7 @@ jobs: family: # Alphabetical order # Note: bundle multiple families into a matrix since there is only one self-hosted instance can - # run IAR build. Too many matrix can hurt due to setup/teardown overhead. + # run IAR build. Too many matrix can hurt due to setup/teardown overhead. - 'stm32f0 stm32f1 stm32f4 stm32f7 stm32g4 stm32h7 stm32l4' steps: - name: Clean workspace @@ -42,10 +42,8 @@ jobs: - name: Checkout TinyUSB uses: actions/checkout@v3 - - name: Checkout submodules and dependencies - run: | - git submodule update --init lib/FreeRTOS-Kernel lib/lwip - python3 tools/get_family_deps.py ${{ matrix.family }} + - name: Get Dependencies + run: python3 tools/get_family_deps.py ${{ matrix.family }} - name: Build run: python3 tools/build_family.py ${{ matrix.family }} CC=iccarm diff --git a/.github/workflows/build_msp430.yml b/.github/workflows/build_msp430.yml index 6832c54b3..7cb60dceb 100644 --- a/.github/workflows/build_msp430.yml +++ b/.github/workflows/build_msp430.yml @@ -21,7 +21,7 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true -jobs: +jobs: build-msp430: runs-on: ubuntu-latest strategy: @@ -40,9 +40,6 @@ jobs: - name: Checkout TinyUSB uses: actions/checkout@v3 - - name: Checkout common submodules in lib - run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip - - name: Checkout hathach/linkermap uses: actions/checkout@v3 with: diff --git a/.github/workflows/build_renesas.yml b/.github/workflows/build_renesas.yml index 7ce674485..ffdeedb71 100644 --- a/.github/workflows/build_renesas.yml +++ b/.github/workflows/build_renesas.yml @@ -39,9 +39,6 @@ jobs: - name: Checkout TinyUSB uses: actions/checkout@v3 - - name: Checkout common submodules in lib - run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip - - name: Checkout hathach/linkermap uses: actions/checkout@v3 with: diff --git a/.github/workflows/build_riscv.yml b/.github/workflows/build_riscv.yml index 876ebbdef..87c7b522e 100644 --- a/.github/workflows/build_riscv.yml +++ b/.github/workflows/build_riscv.yml @@ -41,9 +41,6 @@ jobs: - name: Checkout TinyUSB uses: actions/checkout@v3 - - name: Checkout common submodules in lib - run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip - - name: Checkout hathach/linkermap uses: actions/checkout@v3 with: diff --git a/.github/workflows/build_win_mac.yml b/.github/workflows/build_win_mac.yml index 7c884abd9..4b743a686 100644 --- a/.github/workflows/build_win_mac.yml +++ b/.github/workflows/build_win_mac.yml @@ -46,9 +46,6 @@ jobs: - name: Checkout TinyUSB uses: actions/checkout@v3 - - name: Checkout common submodules in lib - run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip - - name: Get Dependencies run: python3 tools/get_family_deps.py stm32f4 diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index d2150d13f..6deee872f 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -26,6 +26,9 @@ jobs: - name: Checkout TinyUSB uses: actions/checkout@v3 + - name: Run pre-commit + uses: pre-commit/action@v3.0.0 + - name: Run codespell uses: codespell-project/actions-codespell@master diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 865307896..ea2372f07 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,11 +4,12 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.0.1 + rev: v4.4.0 hooks: - id: check-yaml - id: trailing-whitespace - id: end-of-file-fixer + - id: forbid-submodules - repo: local hooks: