29
.github/actions/setup_toolchain/action.yml
vendored
29
.github/actions/setup_toolchain/action.yml
vendored
@@ -4,8 +4,8 @@ inputs:
|
|||||||
toolchain:
|
toolchain:
|
||||||
description: 'Toolchain name'
|
description: 'Toolchain name'
|
||||||
required: true
|
required: true
|
||||||
toolchain_url:
|
toolchain_version:
|
||||||
description: 'Toolchain URL or version'
|
description: 'Toolchain version'
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
@@ -27,7 +27,28 @@ runs:
|
|||||||
uses: ./.github/actions/setup_toolchain/espressif
|
uses: ./.github/actions/setup_toolchain/espressif
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ inputs.toolchain }}
|
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
|
- name: Download Toolchain
|
||||||
if: >-
|
if: >-
|
||||||
@@ -37,7 +58,7 @@ runs:
|
|||||||
uses: ./.github/actions/setup_toolchain/download
|
uses: ./.github/actions/setup_toolchain/download
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ inputs.toolchain }}
|
toolchain: ${{ inputs.toolchain }}
|
||||||
toolchain_url: ${{ inputs.toolchain_url }}
|
toolchain_url: ${{ steps.set-toolchain-url.outputs.toolchain_url }}
|
||||||
|
|
||||||
- name: Set toolchain option
|
- name: Set toolchain option
|
||||||
id: set-toolchain-option
|
id: set-toolchain-option
|
||||||
|
@@ -4,7 +4,7 @@ inputs:
|
|||||||
toolchain:
|
toolchain:
|
||||||
description: 'Toolchain name'
|
description: 'Toolchain name'
|
||||||
required: true
|
required: true
|
||||||
toolchain_url:
|
toolchain_version:
|
||||||
description: 'Toolchain URL or version'
|
description: 'Toolchain URL or version'
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
@@ -22,14 +22,14 @@ runs:
|
|||||||
id: cache-toolchain-espressif
|
id: cache-toolchain-espressif
|
||||||
with:
|
with:
|
||||||
path: ${{ env.DOCKER_ESP_IDF }}
|
path: ${{ env.DOCKER_ESP_IDF }}
|
||||||
key: ${{ inputs.toolchain }}-${{ inputs.toolchain_url }}
|
key: ${{ inputs.toolchain }}-${{ inputs.toolchain_version }}
|
||||||
|
|
||||||
- name: Pull and Save Docker Image
|
- name: Pull and Save Docker Image
|
||||||
if: steps.cache-toolchain-espressif.outputs.cache-hit != 'true'
|
if: steps.cache-toolchain-espressif.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
docker pull espressif/idf:${{ inputs.toolchain_url }}
|
docker pull espressif/idf:${{ inputs.toolchain_version }}
|
||||||
mkdir -p $(dirname $DOCKER_ESP_IDF)
|
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
|
du -sh $DOCKER_ESP_IDF
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@@ -66,7 +66,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
build-system: 'cmake'
|
build-system: 'cmake'
|
||||||
toolchain: ${{ matrix.toolchain }}
|
toolchain: ${{ matrix.toolchain }}
|
||||||
toolchain_url: ${{ fromJSON(needs.set-matrix.outputs.json)[matrix.toolchain].toolchain_url }}
|
|
||||||
build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.toolchain].family) }}
|
build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.toolchain].family) }}
|
||||||
one-per-family: ${{ github.event_name != 'pull_request' }}
|
one-per-family: ${{ github.event_name != 'pull_request' }}
|
||||||
|
|
||||||
@@ -90,7 +89,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
build-system: 'make'
|
build-system: 'make'
|
||||||
toolchain: ${{ matrix.toolchain }}
|
toolchain: ${{ matrix.toolchain }}
|
||||||
toolchain_url: ${{ fromJSON(needs.set-matrix.outputs.json)[matrix.toolchain].toolchain_url }}
|
|
||||||
build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.toolchain].family) }}
|
build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.toolchain].family) }}
|
||||||
one-per-family: ${{ github.event_name != 'pull_request' }}
|
one-per-family: ${{ github.event_name != 'pull_request' }}
|
||||||
|
|
||||||
@@ -125,7 +123,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
build-system: 'cmake'
|
build-system: 'cmake'
|
||||||
toolchain: 'esp-idf'
|
toolchain: 'esp-idf'
|
||||||
toolchain_url: 'v5.1.1'
|
toolchain_version: 'v5.1.1'
|
||||||
build-args: '["-b${{ matrix.board }}"]'
|
build-args: '["-b${{ matrix.board }}"]'
|
||||||
|
|
||||||
# ---------------------------------------
|
# ---------------------------------------
|
||||||
|
6
.github/workflows/build_util.yml
vendored
6
.github/workflows/build_util.yml
vendored
@@ -9,7 +9,7 @@ on:
|
|||||||
toolchain:
|
toolchain:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
toolchain_url:
|
toolchain_version:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
build-args:
|
build-args:
|
||||||
@@ -40,7 +40,7 @@ jobs:
|
|||||||
uses: ./.github/actions/setup_toolchain
|
uses: ./.github/actions/setup_toolchain
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ inputs.toolchain }}
|
toolchain: ${{ inputs.toolchain }}
|
||||||
toolchain_url: ${{ inputs.toolchain_url }}
|
toolchain_version: ${{ inputs.toolchain_version }}
|
||||||
|
|
||||||
- name: Get Dependencies
|
- name: Get Dependencies
|
||||||
uses: ./.github/actions/get_deps
|
uses: ./.github/actions/get_deps
|
||||||
@@ -65,4 +65,4 @@ jobs:
|
|||||||
- name: Build using ESP-IDF docker
|
- name: Build using ESP-IDF docker
|
||||||
if: inputs.toolchain == 'esp-idf'
|
if: inputs.toolchain == 'esp-idf'
|
||||||
run: |
|
run: |
|
||||||
docker run --rm -v $PWD:/project -w /project espressif/idf:${{ inputs.toolchain_url }} python3 tools/build.py ${{ matrix.arg }}
|
docker run --rm -v $PWD:/project -w /project espressif/idf:${{ inputs.toolchain_version }} python3 tools/build.py ${{ matrix.arg }}
|
||||||
|
22
.github/workflows/ci_set_matrix.py
vendored
22
.github/workflows/ci_set_matrix.py
vendored
@@ -1,15 +1,15 @@
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
# toolchain, url
|
# toolchain, url
|
||||||
toolchain_list = {
|
toolchain_list = [
|
||||||
"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",
|
"aarch64-gcc",
|
||||||
"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-clang",
|
||||||
"arm-iar": "",
|
"arm-iar",
|
||||||
"arm-gcc": "",
|
"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",
|
"msp430-gcc",
|
||||||
"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",
|
"riscv-gcc",
|
||||||
"rx-gcc": "http://gcc-renesas.com/downloads/get.php?f=rx/8.3.0.202004-gnurx/gcc-8.3.0.202004-GNURX-ELF.run",
|
"rx-gcc"
|
||||||
}
|
]
|
||||||
|
|
||||||
# family: [supported toolchain]
|
# family: [supported toolchain]
|
||||||
family_list = {
|
family_list = {
|
||||||
@@ -44,7 +44,7 @@ family_list = {
|
|||||||
|
|
||||||
def set_matrix_json():
|
def set_matrix_json():
|
||||||
matrix = {}
|
matrix = {}
|
||||||
for toolchain in toolchain_list.keys():
|
for toolchain in toolchain_list:
|
||||||
filtered_families = [family for family, supported_toolchain in family_list.items() if
|
filtered_families = [family for family, supported_toolchain in family_list.items() if
|
||||||
toolchain in supported_toolchain]
|
toolchain in supported_toolchain]
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ def set_matrix_json():
|
|||||||
hfp_boards = [f"-b{board['name']}" for board in hfp_data['boards']]
|
hfp_boards = [f"-b{board['name']}" for board in hfp_data['boards']]
|
||||||
filtered_families = filtered_families + hfp_boards
|
filtered_families = filtered_families + hfp_boards
|
||||||
|
|
||||||
matrix[toolchain] = {"family": filtered_families, "toolchain_url": toolchain_list[toolchain]}
|
matrix[toolchain] = {"family": filtered_families}
|
||||||
|
|
||||||
print(json.dumps(matrix))
|
print(json.dumps(matrix))
|
||||||
|
|
||||||
|
1
.github/workflows/hil_test.yml
vendored
1
.github/workflows/hil_test.yml
vendored
@@ -53,7 +53,6 @@ jobs:
|
|||||||
uses: ./.github/actions/setup_toolchain
|
uses: ./.github/actions/setup_toolchain
|
||||||
with:
|
with:
|
||||||
toolchain: 'riscv-gcc'
|
toolchain: 'riscv-gcc'
|
||||||
toolchain_url: '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'
|
|
||||||
|
|
||||||
- name: Get Dependencies
|
- name: Get Dependencies
|
||||||
uses: ./.github/actions/get_deps
|
uses: ./.github/actions/get_deps
|
||||||
|
Reference in New Issue
Block a user