@@ -9,54 +9,31 @@ inputs:
9
9
- cache
10
10
- restore
11
11
12
- platform :
12
+ port :
13
13
required : false
14
14
default : none
15
- type : choice
16
- options :
17
- - arm
18
- - aarch
19
- - esp
20
- - riscv
21
- - none
15
+ type : string
22
16
23
17
runs :
24
18
using : composite
25
19
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
-
46
20
# arm
47
21
- 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'
49
26
uses : carlosperate/arm-none-eabi-gcc-action@v1
50
27
with :
51
28
release : ' 10-2020-q4'
52
29
53
- # esp
54
- - name : Get esp toolchain
55
- if : inputs.platform == 'esp '
30
+ # espressif
31
+ - name : Get espressif toolchain
32
+ if : inputs.port == 'espressif '
56
33
run : sudo apt-get install -y ninja-build
57
34
shell : bash
58
35
- name : Install IDF tools
59
- if : inputs.platform == 'esp '
36
+ if : inputs.port == 'espressif '
60
37
run : |
61
38
echo "Installing ESP-IDF tools"
62
39
$IDF_PATH/tools/idf_tools.py --non-interactive install required
@@ -66,24 +43,16 @@ runs:
66
43
rm -rf $IDF_TOOLS_PATH/dist
67
44
shell : bash
68
45
- name : Set environment
69
- if : inputs.platform == 'esp '
46
+ if : inputs.port == 'espressif '
70
47
run : |
71
48
source $IDF_PATH/export.sh
72
49
echo >> $GITHUB_ENV "IDF_PYTHON_ENV_PATH=$IDF_PYTHON_ENV_PATH"
73
50
echo >> $GITHUB_PATH "$PATH"
74
51
shell : bash
75
52
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
-
84
53
# common
85
54
- name : Cache python dependencies
86
- if : inputs.platform != 'esp '
55
+ if : inputs.port != 'espressif '
87
56
uses : ./.github/actions/deps/python
88
57
with :
89
58
action : ${{ inputs.action }}
0 commit comments