diff options
| author | Ha Thach <[email protected]> | 2024-05-10 18:55:43 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-05-10 18:55:43 +0700 |
| commit | 3e2ea7750681b27238043c7158ff5508f01914a3 (patch) | |
| tree | 11f9198467f561c1ff4cfd3c45e9a7b02cf9f572 /.github/actions | |
| parent | bf9cf107c638f5f674be716b8ac7cd983aa05804 (diff) | |
More ci tweak (#2636)
* change concurrency group to ${{ github.workflow }}-${{ github.ref }}
* use argparse for build.py hil_test.py, remove the need to install click
* move ci win/mac to build_cmake.yml
* rename build_family.yml to build_util.yml
* build_util.yml support esp32
* integrate build-espressif into build.yml
* build.py support make with --board option
* add get_deps action
* update hil test to reuse action
Diffstat (limited to '.github/actions')
| -rw-r--r-- | .github/actions/get_deps/action.yml (renamed from .github/actions/prepare_build/action.yml) | 23 | ||||
| -rw-r--r-- | .github/actions/setup_toolchain/action.yml | 18 |
2 files changed, 28 insertions, 13 deletions
diff --git a/.github/actions/prepare_build/action.yml b/.github/actions/get_deps/action.yml index 5f2c544c1..38b44a70e 100644 --- a/.github/actions/prepare_build/action.yml +++ b/.github/actions/get_deps/action.yml @@ -1,30 +1,29 @@ -name: Prepare to build +name: Get dependencies inputs: - family: + arg: required: true type: string runs: using: "composite" steps: - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - name: Checkout pico-sdk for rp2040 - if: contains(inputs.family, 'rp2040') + if: contains(inputs.arg, 'rp2040') || contains(inputs.arg, 'raspberry_pi_pico') uses: actions/checkout@v4 with: repository: raspberrypi/pico-sdk ref: develop path: pico-sdk - - name: Get Dependencies + - name: Linux dependencies + if: runner.os == 'Linux' run: | sudo apt install -y ninja-build - pip install click - python3 tools/get_deps.py ${{ inputs.family }} - echo >> $GITHUB_ENV "PICO_SDK_PATH=$GITHUB_WORKSPACE/pico-sdk" + shell: bash + + - name: Get Dependencies + run: | + python3 tools/get_deps.py ${{ inputs.arg }} + echo "PICO_SDK_PATH=${{ github.workspace }}/pico-sdk" >> $GITHUB_ENV shell: bash diff --git a/.github/actions/setup_toolchain/action.yml b/.github/actions/setup_toolchain/action.yml index b59ece116..e6c79e7dd 100644 --- a/.github/actions/setup_toolchain/action.yml +++ b/.github/actions/setup_toolchain/action.yml @@ -8,6 +8,11 @@ inputs: required: false type: string +outputs: + build_option: + description: 'Build option for the toolchain e.g --toolchain clang' + value: ${{ steps.set-toolchain-option.outputs.build_option }} + runs: using: "composite" steps: @@ -19,7 +24,7 @@ runs: - name: Pull ESP-IDF docker if: inputs.toolchain == 'esp-idf' - run: docker pull espressif/idf:latest + run: docker pull espressif/idf:${{ inputs.toolchain_url }} shell: bash - name: Download Toolchain @@ -29,3 +34,14 @@ runs: uses: ./.github/actions/setup_toolchain/download with: toolchain_url: ${{ inputs.toolchain_url }} + + - name: Set toolchain option + id: set-toolchain-option + run: | + BUILD_OPTION="" + if [[ "${{ inputs.toolchain }}" == *"clang"* ]]; then + BUILD_OPTION="--toolchain clang" + fi + echo "build_option=$BUILD_OPTION" + echo "build_option=$BUILD_OPTION" >> $GITHUB_OUTPUT + shell: bash |
