summaryrefslogtreecommitdiff
path: root/.github/actions
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2024-08-09 22:45:35 +0700
committerGitHub <[email protected]>2024-08-09 22:45:35 +0700
commitea64dd4999618ce14aea90118ee9218b4aefeba6 (patch)
tree2dcf144ac2638ac313569258d99d6d5eb6540b28 /.github/actions
parent643a26ca8dff6893912a029eeda57219d6cc424b (diff)
Update ci toolchain (#2758)
* move toolchain url to its setup action
Diffstat (limited to '.github/actions')
-rw-r--r--.github/actions/setup_toolchain/action.yml29
-rw-r--r--.github/actions/setup_toolchain/espressif/action.yml8
2 files changed, 29 insertions, 8 deletions
diff --git a/.github/actions/setup_toolchain/action.yml b/.github/actions/setup_toolchain/action.yml
index 19fe28b0c..d173d6903 100644
--- a/.github/actions/setup_toolchain/action.yml
+++ b/.github/actions/setup_toolchain/action.yml
@@ -4,8 +4,8 @@ inputs:
toolchain:
description: 'Toolchain name'
required: true
- toolchain_url:
- description: 'Toolchain URL or version'
+ toolchain_version:
+ description: 'Toolchain version'
required: false
outputs:
@@ -27,7 +27,28 @@ runs:
uses: ./.github/actions/setup_toolchain/espressif
with:
toolchain: ${{ inputs.toolchain }}
- toolchain_url: ${{ inputs.toolchain_url }}
+ toolchain_version: ${{ inputs.toolchain_version }}
+
+ - name: Get Toolchain URL
+ if: >-
+ inputs.toolchain != 'arm-gcc' &&
+ inputs.toolchain != 'arm-iar' &&
+ inputs.toolchain != 'esp-idf'
+ id: set-toolchain-url
+ run: |
+ TOOLCHAIN_JSON='{
+ "aarch64-gcc": "https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz",
+ "arm-clang": "https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-17.0.1/LLVMEmbeddedToolchainForArm-17.0.1-Linux-x86_64.tar.xz",
+ "arm-iar": "",
+ "arm-gcc": "",
+ "msp430-gcc": "http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/9_2_0_0/export/msp430-gcc-9.2.0.50_linux64.tar.bz2",
+ "riscv-gcc": "https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v13.2.0-2/xpack-riscv-none-elf-gcc-13.2.0-2-linux-x64.tar.gz",
+ "rx-gcc": "http://gcc-renesas.com/downloads/get.php?f=rx/8.3.0.202004-gnurx/gcc-8.3.0.202004-GNURX-ELF.run"
+ }'
+ TOOLCHAIN_URL=$(echo $TOOLCHAIN_JSON | jq -r '.["${{ inputs.toolchain }}"]')
+ echo "toolchain_url=$TOOLCHAIN_URL"
+ echo "toolchain_url=$TOOLCHAIN_URL" >> $GITHUB_OUTPUT
+ shell: bash
- name: Download Toolchain
if: >-
@@ -37,7 +58,7 @@ runs:
uses: ./.github/actions/setup_toolchain/download
with:
toolchain: ${{ inputs.toolchain }}
- toolchain_url: ${{ inputs.toolchain_url }}
+ toolchain_url: ${{ steps.set-toolchain-url.outputs.toolchain_url }}
- name: Set toolchain option
id: set-toolchain-option
diff --git a/.github/actions/setup_toolchain/espressif/action.yml b/.github/actions/setup_toolchain/espressif/action.yml
index 46da02911..3129329dd 100644
--- a/.github/actions/setup_toolchain/espressif/action.yml
+++ b/.github/actions/setup_toolchain/espressif/action.yml
@@ -4,7 +4,7 @@ inputs:
toolchain:
description: 'Toolchain name'
required: true
- toolchain_url:
+ toolchain_version:
description: 'Toolchain URL or version'
required: true
@@ -22,14 +22,14 @@ runs:
id: cache-toolchain-espressif
with:
path: ${{ env.DOCKER_ESP_IDF }}
- key: ${{ inputs.toolchain }}-${{ inputs.toolchain_url }}
+ key: ${{ inputs.toolchain }}-${{ inputs.toolchain_version }}
- name: Pull and Save Docker Image
if: steps.cache-toolchain-espressif.outputs.cache-hit != 'true'
run: |
- docker pull espressif/idf:${{ inputs.toolchain_url }}
+ docker pull espressif/idf:${{ inputs.toolchain_version }}
mkdir -p $(dirname $DOCKER_ESP_IDF)
- docker save -o $DOCKER_ESP_IDF espressif/idf:${{ inputs.toolchain_url }}
+ docker save -o $DOCKER_ESP_IDF espressif/idf:${{ inputs.toolchain_version }}
du -sh $DOCKER_ESP_IDF
shell: bash