Skip to content

Commit 2389844

Browse files
committed
github ci support setup/install iar toolchain
1 parent 3851c7c commit 2389844

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.github/actions/setup_toolchain/action.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ runs:
2828
- name: Get Toolchain URL
2929
if: >-
3030
inputs.toolchain != 'arm-gcc' &&
31-
inputs.toolchain != 'arm-iar' &&
3231
inputs.toolchain != 'esp-idf'
3332
id: set-toolchain-url
3433
run: |
@@ -40,7 +39,6 @@ runs:
4039
- name: Download Toolchain
4140
if: >-
4241
inputs.toolchain != 'arm-gcc' &&
43-
inputs.toolchain != 'arm-iar' &&
4442
inputs.toolchain != 'esp-idf'
4543
uses: ./.github/actions/setup_toolchain/download
4644
with:

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

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,24 @@ runs:
2323
if: steps.cache-toolchain-download.outputs.cache-hit != 'true'
2424
run: |
2525
mkdir -p ~/cache/${{ inputs.toolchain }}
26-
wget --progress=dot:giga ${{ inputs.toolchain_url }} -O toolchain.tar.gz
26+
2727
if [[ ${{ inputs.toolchain }} == rx-gcc ]]; then
28-
mv toolchain.tar.gz toolchain.run
28+
wget --progress=dot:giga ${{ inputs.toolchain_url }} -O toolchain.run
2929
chmod +x toolchain.run
3030
./toolchain.run -p ~/cache/${{ inputs.toolchain }}/gnurx -y
31+
elif [[ ${{ inputs.toolchain }} == arm-iar ]]; then
32+
wget --progress=dot:giga ${{ inputs.toolchain_url }} -O ~/cache/${{ inputs.toolchain }}/cxarm.deb
3133
else
34+
wget --progress=dot:giga ${{ inputs.toolchain_url }} -O toolchain.tar.gz
3235
tar -C ~/cache/${{ inputs.toolchain }} -xaf toolchain.tar.gz
3336
fi
3437
shell: bash
3538

36-
- name: Set Toolchain Path
39+
- name: Setup Toolchain
3740
run: |
38-
echo >> $GITHUB_PATH `echo ~/cache/${{ inputs.toolchain }}/*/bin`
41+
if [[ ${{ inputs.toolchain }} == arm-iar ]]; then
42+
sudo apt-get install -y ~/cache/${{ inputs.toolchain }}/cxarm.deb
43+
else
44+
echo >> $GITHUB_PATH `echo ~/cache/${{ inputs.toolchain }}/*/bin`
45+
fi
3946
shell: bash

0 commit comments

Comments
 (0)