Skip to content

Commit 7ee288b

Browse files
authored
change armgcc setup to manual download due to issue with action (#3377)
* change armgcc setup to manual download due to issue with action * build windows, macos with cmake as well
1 parent 583fe84 commit 7ee288b

File tree

6 files changed

+44
-26
lines changed

6 files changed

+44
-26
lines changed

.github/actions/setup_toolchain/action.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,14 @@ outputs:
1313
runs:
1414
using: "composite"
1515
steps:
16-
- name: Install ARM GCC
17-
if: inputs.toolchain == 'arm-gcc'
18-
uses: carlosperate/arm-none-eabi-gcc-action@v1
19-
with:
20-
release: '14.2.Rel1'
21-
2216
- name: Pull ESP-IDF docker
2317
if: inputs.toolchain == 'esp-idf'
2418
uses: ./.github/actions/setup_toolchain/espressif
2519
with:
2620
toolchain: ${{ inputs.toolchain }}
2721

2822
- name: Get Toolchain URL
29-
if: >-
30-
inputs.toolchain != 'arm-gcc' &&
31-
inputs.toolchain != 'esp-idf'
23+
if: inputs.toolchain != 'esp-idf'
3224
id: set-toolchain-url
3325
env:
3426
TOOLCHAIN: ${{ inputs.toolchain }}
@@ -39,9 +31,7 @@ runs:
3931
shell: bash
4032

4133
- name: Download Toolchain
42-
if: >-
43-
inputs.toolchain != 'arm-gcc' &&
44-
inputs.toolchain != 'esp-idf'
34+
if: inputs.toolchain != 'esp-idf'
4535
uses: ./.github/actions/setup_toolchain/download
4636
with:
4737
toolchain: ${{ inputs.toolchain }}

.github/actions/setup_toolchain/download/action.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ runs:
2626
TOOLCHAIN_URL: ${{ inputs.toolchain_url }}
2727
run: |
2828
mkdir -p ~/cache/${TOOLCHAIN}
29+
FILE_EXT="${TOOLCHAIN_URL##*.}"
2930
3031
if [[ ${TOOLCHAIN} == rx-gcc ]]; then
3132
wget --progress=dot:giga ${TOOLCHAIN_URL} -O toolchain.run
@@ -34,9 +35,16 @@ runs:
3435
elif [[ ${TOOLCHAIN} == arm-iar ]]; then
3536
wget --progress=dot:giga https://netstorage.iar.com/FileStore/STANDARD/001/003/926/iar-lmsc-tools_1.8_amd64.deb -O ~/cache/${TOOLCHAIN}/iar-lmsc-tools.deb
3637
wget --progress=dot:giga ${TOOLCHAIN_URL} -O ~/cache/${TOOLCHAIN}/cxarm.deb
37-
else
38+
elif [[ ${FILE_EXT} == zip ]]; then
39+
curl -L "$TOOLCHAIN_URL" -o toolchain.zip
40+
unzip -q toolchain.zip -d ~/cache/${TOOLCHAIN}
41+
~/cache/${TOOLCHAIN}/xpack-arm-none-eabi-gcc-14.2.1-1.1/bin/arm-none-eabi-gcc.exe --version
42+
elif [[ ${FILE_EXT} == gz ]]; then
3843
wget --progress=dot:giga ${TOOLCHAIN_URL} -O toolchain.tar.gz
3944
tar -C ~/cache/${TOOLCHAIN} -xaf toolchain.tar.gz
45+
else
46+
echo "Unsupported toolchain file extension: ${FILE_EXT}"
47+
exit 1
4048
fi
4149
shell: bash
4250

@@ -47,8 +55,19 @@ runs:
4755
if [[ ${TOOLCHAIN} == arm-iar ]]; then
4856
sudo dpkg -i ~/cache/${TOOLCHAIN}/iar-lmsc-tools.deb
4957
sudo apt install -y ~/cache/${TOOLCHAIN}/cxarm.deb
50-
echo >> $GITHUB_PATH "/opt/iar/cxarm/arm/bin"
58+
TOOLCHAIN_PATH="/opt/iar/cxarm/arm/bin"
5159
else
52-
echo >> $GITHUB_PATH `echo ~/cache/${TOOLCHAIN}/*/bin`
60+
# Find the single toolchain bin directory
61+
TOOLCHAIN_BIN_DIRS=(~/cache/${TOOLCHAIN}/*/bin)
62+
if [[ ${#TOOLCHAIN_BIN_DIRS[@]} -ne 1 ]]; then
63+
echo "Error: Expected exactly one toolchain bin directory, found ${#TOOLCHAIN_BIN_DIRS[@]}"
64+
exit 1
65+
fi
66+
TOOLCHAIN_PATH="${TOOLCHAIN_BIN_DIRS[0]}"
67+
fi
68+
# Convert to native path for Windows compatibility
69+
if [[ "$RUNNER_OS" == "Windows" ]]; then
70+
TOOLCHAIN_PATH=$(cygpath -w "$TOOLCHAIN_PATH")
5371
fi
72+
echo "$TOOLCHAIN_PATH" >> $GITHUB_PATH
5473
shell: bash

.github/actions/setup_toolchain/toolchain.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"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",
33
"arm-clang": "https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-19.1.1/LLVM-ET-Arm-19.1.1-Linux-x86_64.tar.xz",
44
"arm-gcc": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v14.2.1-1.1/xpack-arm-none-eabi-gcc-14.2.1-1.1-linux-x64.tar.gz",
5+
"arm-gcc-macos-latest": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v14.2.1-1.1/xpack-arm-none-eabi-gcc-14.2.1-1.1-darwin-arm64.tar.gz",
6+
"arm-gcc-windows-latest": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v14.2.1-1.1/xpack-arm-none-eabi-gcc-14.2.1-1.1-win32-x64.zip",
57
"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",
68
"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",
79
"rx-gcc": "https://github.com/hathach/rx_device/releases/download/0.0.1/gcc-8.3.0.202411-GNURX-ELF.run",

.github/workflows/build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ on:
1515
- '.github/workflows/build_util.yml'
1616
- '.github/workflows/ci_set_matrix.py'
1717
pull_request:
18-
branches: [ master ]
1918
paths:
2019
- 'src/**'
2120
- 'examples/**'
@@ -49,7 +48,7 @@ jobs:
4948
id: set-matrix-json
5049
run: |
5150
# build matrix
52-
MATRIX_JSON=$(python .github/workflows/ci_set_matrix.py)
51+
MATRIX_JSON=$(python .github/workflows/ci_set_matrix.py)/
5352
echo "matrix=$MATRIX_JSON"
5453
echo "matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT
5554
# hil matrix
@@ -127,19 +126,20 @@ jobs:
127126
one-per-family: true
128127

129128
# ---------------------------------------
130-
# Build Make on Windows/MacOS
129+
# Build Make/CMake on Windows/MacOS
131130
# ---------------------------------------
132-
make-os:
131+
build-os:
133132
if: github.event_name == 'pull_request'
134133
uses: ./.github/workflows/build_util.yml
135134
strategy:
136135
fail-fast: false
137136
matrix:
138137
os: [windows-latest, macos-latest]
138+
build-system: [ 'make', 'cmake' ]
139139
with:
140140
os: ${{ matrix.os }}
141-
build-system: 'make'
142-
toolchain: 'arm-gcc'
141+
build-system: ${{ matrix.build-system }}
142+
toolchain: 'arm-gcc-${{ matrix.os }}'
143143
build-args: '["stm32h7"]'
144144
one-per-family: true
145145

.idea/cmake.xml

Lines changed: 10 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/get_deps.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@
246246
'imxrt kinetis_k32l2 kinetis_kl lpc51 lpc54 lpc55 mcx mm32 msp432e4 nrf saml2x '
247247
'lpc11 lpc13 lpc15 lpc17 lpc18 lpc40 lpc43 '
248248
'stm32c0 stm32f0 stm32f1 stm32f2 stm32f3 stm32f4 stm32f7 stm32g0 stm32g4 stm32h5 '
249-
'stm32h7 stm32h7rs stm32l0 stm32l1 stm32l4 stm32l5 stm32u0 stm32u5 stm32wb stm32wba'
249+
'stm32h7 stm32h7rs stm32l0 stm32l1 stm32l4 stm32l5 stm32u0 stm32u5 stm32wb stm32wba '
250250
'sam3x samd11 samd21 samd51 samd5x_e5x same5x same7x saml2x samg '
251251
'tm4c '],
252252
'lib/CMSIS_6': ['https://github.com/ARM-software/CMSIS_6.git',
@@ -343,7 +343,7 @@ def main():
343343

344344
for f in families:
345345
for d in deps_optional:
346-
if d not in deps and f in deps_optional[d][2]:
346+
if d not in deps and f in deps_optional[d][2].split():
347347
deps.append(d)
348348

349349
if print_only:

0 commit comments

Comments
 (0)