diff options
| author | HiFiPhile <[email protected]> | 2024-05-10 00:16:45 +0200 |
|---|---|---|
| committer | HiFiPhile <[email protected]> | 2024-05-10 00:16:45 +0200 |
| commit | f4d4f2da297bb043990d94b9189c7850da772b09 (patch) | |
| tree | f2e464e6ee94a648579fc78a32f4ac45c38794a6 /.github/actions/setup_toolchain | |
| parent | fc7647f9e4f06c8f56207f5ea7f34872887d099b (diff) | |
| parent | 63e64f374bf2023261bcf6733fdf53a73ccca6e6 (diff) | |
Merge remote-tracking branch 'remotes/tinyusb/master' into rx_fb
Diffstat (limited to '.github/actions/setup_toolchain')
| -rw-r--r-- | .github/actions/setup_toolchain/action.yml | 31 | ||||
| -rw-r--r-- | .github/actions/setup_toolchain/download/action.yml | 29 |
2 files changed, 60 insertions, 0 deletions
diff --git a/.github/actions/setup_toolchain/action.yml b/.github/actions/setup_toolchain/action.yml new file mode 100644 index 000000000..b59ece116 --- /dev/null +++ b/.github/actions/setup_toolchain/action.yml @@ -0,0 +1,31 @@ +name: Setup Toolchain + +inputs: + toolchain: + required: true + type: string + toolchain_url: + required: false + type: string + +runs: + using: "composite" + steps: + - name: Install ARM GCC + if: inputs.toolchain == 'arm-gcc' + uses: carlosperate/arm-none-eabi-gcc-action@v1 + with: + release: '12.3.Rel1' + + - name: Pull ESP-IDF docker + if: inputs.toolchain == 'esp-idf' + run: docker pull espressif/idf:latest + shell: bash + + - name: Download Toolchain + if: >- + inputs.toolchain != 'arm-gcc' && + inputs.toolchain != 'esp-idf' + uses: ./.github/actions/setup_toolchain/download + with: + toolchain_url: ${{ inputs.toolchain_url }} diff --git a/.github/actions/setup_toolchain/download/action.yml b/.github/actions/setup_toolchain/download/action.yml new file mode 100644 index 000000000..db85e9027 --- /dev/null +++ b/.github/actions/setup_toolchain/download/action.yml @@ -0,0 +1,29 @@ +name: Download Toolchain + +inputs: + toolchain_url: + required: true + type: string + +runs: + using: "composite" + steps: + - name: Cache Toolchain + uses: actions/cache@v4 + id: cache-toolchain + with: + path: ~/cache/toolchain + key: ${{ runner.os }}-${{ inputs.toolchain_url }} + + - name: Install Toolchain + if: steps.cache-toolchain.outputs.cache-hit != 'true' + run: | + mkdir -p ~/cache/toolchain + wget --progress=dot:mega ${{ inputs.toolchain_url }} -O toolchain.tar.gz + tar -C ~/cache/toolchain -xaf toolchain.tar.gz + shell: bash + + - name: Set Toolchain Path + run: | + echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin` + shell: bash |
