@@ -21,29 +21,34 @@ runs:
2121
2222 - name : Install Toolchain
2323 if : steps.cache-toolchain-download.outputs.cache-hit != 'true'
24+ env :
25+ TOOLCHAIN : ${{ inputs.toolchain }}
26+ TOOLCHAIN_URL : ${{ inputs.toolchain_url }}
2427 run : |
25- mkdir -p ~/cache/${{ inputs.toolchain } }
28+ mkdir -p ~/cache/${TOOLCHAIN }
2629
27- if [[ ${{ inputs.toolchain } } == rx-gcc ]]; then
28- wget --progress=dot:giga ${{ inputs.toolchain_url } } -O toolchain.run
30+ if [[ ${TOOLCHAIN } == rx-gcc ]]; then
31+ wget --progress=dot:giga ${TOOLCHAIN_URL } -O toolchain.run
2932 chmod +x toolchain.run
30- ./toolchain.run -p ~/cache/${{ inputs.toolchain } }/gnurx -y
31- elif [[ ${{ inputs.toolchain } } == arm-iar ]]; then
32- wget --progress=dot:giga https://netstorage.iar.com/FileStore/STANDARD/001/003/926/iar-lmsc-tools_1.8_amd64.deb -O ~/cache/${{ inputs.toolchain } }/iar-lmsc-tools.deb
33- wget --progress=dot:giga ${{ inputs.toolchain_url }} -O ~/cache/${{ inputs.toolchain } }/cxarm.deb
33+ ./toolchain.run -p ~/cache/${TOOLCHAIN }/gnurx -y
34+ elif [[ ${TOOLCHAIN } == arm-iar ]]; then
35+ 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
36+ wget --progress=dot:giga ${TOOLCHAIN_URL} -O ~/cache/${TOOLCHAIN }/cxarm.deb
3437 else
35- wget --progress=dot:giga ${{ inputs.toolchain_url } } -O toolchain.tar.gz
36- tar -C ~/cache/${{ inputs.toolchain } } -xaf toolchain.tar.gz
38+ wget --progress=dot:giga ${TOOLCHAIN_URL } -O toolchain.tar.gz
39+ tar -C ~/cache/${TOOLCHAIN } -xaf toolchain.tar.gz
3740 fi
3841 shell : bash
3942
4043 - name : Setup Toolchain
44+ env :
45+ TOOLCHAIN : ${{ inputs.toolchain }}
4146 run : |
42- if [[ ${{ inputs.toolchain } } == arm-iar ]]; then
43- sudo dpkg -i ~/cache/${{ inputs.toolchain } }/iar-lmsc-tools.deb
44- sudo apt install -y ~/cache/${{ inputs.toolchain } }/cxarm.deb
47+ if [[ ${TOOLCHAIN } == arm-iar ]]; then
48+ sudo dpkg -i ~/cache/${TOOLCHAIN }/iar-lmsc-tools.deb
49+ sudo apt install -y ~/cache/${TOOLCHAIN }/cxarm.deb
4550 echo >> $GITHUB_PATH "/opt/iar/cxarm/arm/bin"
4651 else
47- echo >> $GITHUB_PATH `echo ~/cache/${{ inputs.toolchain } }/*/bin`
52+ echo >> $GITHUB_PATH `echo ~/cache/${TOOLCHAIN }/*/bin`
4853 fi
4954 shell : bash
0 commit comments