@@ -9,54 +9,31 @@ inputs:
99 - cache
1010 - restore
1111
12- platform :
12+ port :
1313 required : false
1414 default : none
15- type : choice
16- options :
17- - arm
18- - aarch
19- - esp
20- - riscv
21- - none
15+ type : string
2216
2317runs :
2418 using : composite
2519 steps :
26- # aarch
27- - name : Get aarch toolchain
28- if : inputs.platform == 'aarch'
29- run : |
30- wget --no-verbose https://adafruit-circuit-python.s3.amazonaws.com/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz
31- sudo tar -C /usr --strip-components=1 -xaf gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz
32- sudo apt-get install -y mtools
33- shell : bash
34- - name : Install mkfs.fat
35- if : inputs.platform == 'aarch'
36- run : |
37- wget https://github.com/dosfstools/dosfstools/releases/download/v4.2/dosfstools-4.2.tar.gz
38- tar -xaf dosfstools-4.2.tar.gz
39- cd dosfstools-4.2
40- ./configure
41- make -j 2
42- cd src
43- echo >> $GITHUB_PATH $(pwd)
44- shell : bash
45-
4620 # arm
4721 - name : Get arm toolchain
48- if : inputs.platform == 'aarch' || inputs.platform == 'arm'
22+ if : >-
23+ inputs.port != 'none' &&
24+ inputs.port != 'litex' &&
25+ inputs.port != 'espressif'
4926 uses : carlosperate/arm-none-eabi-gcc-action@v1
5027 with :
5128 release : ' 10-2020-q4'
5229
53- # esp
54- - name : Get esp toolchain
55- if : inputs.platform == 'esp '
30+ # espressif
31+ - name : Get espressif toolchain
32+ if : inputs.port == 'espressif '
5633 run : sudo apt-get install -y ninja-build
5734 shell : bash
5835 - name : Install IDF tools
59- if : inputs.platform == 'esp '
36+ if : inputs.port == 'espressif '
6037 run : |
6138 echo "Installing ESP-IDF tools"
6239 $IDF_PATH/tools/idf_tools.py --non-interactive install required
@@ -66,24 +43,16 @@ runs:
6643 rm -rf $IDF_TOOLS_PATH/dist
6744 shell : bash
6845 - name : Set environment
69- if : inputs.platform == 'esp '
46+ if : inputs.port == 'espressif '
7047 run : |
7148 source $IDF_PATH/export.sh
7249 echo >> $GITHUB_ENV "IDF_PYTHON_ENV_PATH=$IDF_PYTHON_ENV_PATH"
7350 echo >> $GITHUB_PATH "$PATH"
7451 shell : bash
7552
76- # riscv
77- - name : Get riscv toolchain
78- if : inputs.platform == 'riscv'
79- run : |
80- wget https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz
81- sudo tar -C /usr --strip-components=1 -xaf riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz
82- shell : bash
83-
8453 # common
8554 - name : Cache python dependencies
86- if : inputs.platform != 'esp '
55+ if : inputs.port != 'espressif '
8756 uses : ./.github/actions/deps/python
8857 with :
8958 action : ${{ inputs.action }}
0 commit comments