Skip to content

Commit

Permalink
build_util.yml support esp32
Browse files Browse the repository at this point in the history
  • Loading branch information
hathach committed May 10, 2024
1 parent bba993b commit e9086b0
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 71 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup_toolchain/action.yml
Expand Up @@ -19,7 +19,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
Expand Down
28 changes: 15 additions & 13 deletions .github/workflows/build_esp.yml
Expand Up @@ -36,21 +36,23 @@ jobs:
# ESP32-S3
- 'espressif_s3_devkitm'
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Checkout TinyUSB
uses: actions/checkout@v4

- name: Setup Toolchain
uses: ./.github/actions/setup_toolchain
- name: Build
uses: ./.github/workflows/build_util.yml
with:
toolchain: 'esp-idf'
build-system: 'cmake'
toolchain: 'esp-idf'
toolchain_url: 'v5.1.1'
build-args: '[${{ matrix.board }}]'

- name: Build
run: docker run --rm -v $PWD:/project -w /project espressif/idf:v5.1.1 python3 tools/build.py -b ${{ matrix.board }}
# - name: Setup Toolchain
# uses: ./.github/actions/setup_toolchain
# with:
# toolchain: 'esp-idf'
# # toolchain_url: is used as idf version
# toolchain_url: 'v5.1.1'
#
# - name: Build
# run: docker run --rm -v $PWD:/project -w /project espressif/idf:v5.1.1 python3 tools/build.py -b ${{ matrix.board }}

- name: Upload Artifacts for Hardware Testing
if: matrix.board == 'espressif_s3_devkitm' && github.repository_owner == 'hathach'
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/build_util.yml
Expand Up @@ -52,10 +52,13 @@ jobs:

- name: Get Dependencies
run: |
sudo apt install -y ninja-build
if [[ "${{ inputs.os }}" == "ubuntu-latest" ]]; then
apt install -y ninja-build
fi
python3 tools/get_deps.py ${{ matrix.arg }}
- name: Build
if: inputs.toolchain != 'esp-idf'
run: |
OPTION=""
if [[ "${{ inputs.toolchain }}" == *"clang"* ]]; then
Expand All @@ -65,3 +68,8 @@ jobs:
python tools/build.py -s ${{ inputs.build-system }} $OPTION ${{ matrix.arg }}
env:
PICO_SDK_PATH: ${{ github.workspace }}/pico-sdk

- name: Build using ESP-IDF docker
if: inputs.toolchain == 'esp-idf'
run: |
docker run --rm -v $PWD:/project -w /project espressif/idf:${{ inputs.toolchain_url }} python3 tools/build.py ${{ matrix.arg }}
56 changes: 0 additions & 56 deletions .github/workflows/build_win_mac.yml

This file was deleted.

0 comments on commit e9086b0

Please sign in to comment.