59
59
TEST_BSP_ROOT : ${{ matrix.platform.RTT_BSP }}
60
60
TEST_CONFIG_FILE : ${{ matrix.config_file }}
61
61
TEST_SD_FILE : ${{ matrix.platform.SD_FILE }}
62
- RUN_FLAG : ${{ matrix.platform.RUN }}
62
+ RUN_FLAG : ${{ RUN_FLAG }}
63
63
KERNEL_FLAG : ${{ matrix.platform.KERNEL }}
64
64
steps :
65
65
- uses : actions/checkout@v4
77
77
TOOLCHAIN_INSTALLED=""
78
78
79
79
# Install Arm ToolChains
80
- if [[ "${{ matrix.platform.QEMU_ARCH }}" == "arm" && "${{ matrix.platform.KERNEL }}" == "standard" && "${{ matrix.config_file }}" != "rtsmart/rtsmart.cfg" ] ]; then
80
+ if [ TEST_QEMU_ARCH == "arm" && KERNEL_FLAG == "standard" && TEST_CONFIG_FILE != "rtsmart/rtsmart.cfg" ]; then
81
81
wget -q https://github.com/RT-Thread/toolchains-ci/releases/download/v1.3/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
82
82
sudo tar xjf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 -C /opt
83
83
/opt/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-gcc --version
87
87
fi
88
88
89
89
# Install Arm Musl ToolChains
90
- if [[ "${{ matrix.platform.QEMU_ARCH }}" == "arm" && "${{ matrix.platform.KERNEL }}" == "rtsmart" && "${{ matrix.config_file }}" == "rtsmart/rtsmart.cfg" ] ]; then
90
+ if [ TEST_QEMU_ARCH == "arm" && KERNEL_FLAG == "rtsmart" && TEST_CONFIG_FILE == "rtsmart/rtsmart.cfg" ]; then
91
91
wget -q https://github.com/RT-Thread/toolchains-ci/releases/download/v1.7/arm-linux-musleabi_for_x86_64-pc-linux-gnu_stable.tar.bz2
92
92
sudo tar xjf arm-linux-musleabi_for_x86_64-pc-linux-gnu_stable.tar.bz2 -C /opt
93
93
/opt/arm-linux-musleabi_for_x86_64-pc-linux-gnu/bin/arm-linux-musleabi-gcc --version
97
97
fi
98
98
99
99
# Install RISC-V ToolChains
100
- if [[ "${{ matrix.platform.QEMU_ARCH }}" == "riscv64" && "${{ matrix.platform.KERNEL }}" == "standard" && "${{ matrix.config_file }}" != "rtsmart/rtsmart.cfg" ] ]; then
100
+ if [ "TEST_QEMU_ARCH == "riscv64" && KERNEL_FLAG == "standard" && TEST_CONFIG_FILE != "rtsmart/rtsmart.cfg" ]; then
101
101
wget -q https://github.com/RT-Thread/toolchains-ci/releases/download/v1.4/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz
102
102
sudo tar zxvf riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz -C /opt
103
103
/opt/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gcc --version
@@ -106,7 +106,7 @@ jobs:
106
106
fi
107
107
108
108
# Install RISC-V Musl ToolChains
109
- if [[ "${{ matrix.platform.QEMU_ARCH }}" == "riscv64" && "${{ matrix.platform.KERNEL }}" == "rtsmart" && "${{ matrix.config_file }}" == "rtsmart/rtsmart.cfg" ] ]; then
109
+ if [ TEST_QEMU_ARCH == "riscv64" && KERNEL_FLAG == "rtsmart" && TEST_CONFIG_FILE == "rtsmart/rtsmart.cfg" ]; then
110
110
wget -q https://github.com/RT-Thread/toolchains-ci/releases/download/v1.7/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2
111
111
sudo tar xjf riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2 -C /opt
112
112
/opt/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/bin/riscv64-unknown-linux-musl-gcc --version
@@ -116,7 +116,7 @@ jobs:
116
116
fi
117
117
118
118
# Install AARCH64 Musl ToolChains
119
- if [[ "${{ matrix.platform.QEMU_ARCH }}" == "aarch64" && "${{ matrix.platform.KERNEL }}" == "rtsmart" && "${{ matrix.config_file }}" == "rtsmart/rtsmart.cfg" ] ]; then
119
+ if [ TEST_QEMU_ARCH == "aarch64" && KERNEL_FLAG == "rtsmart" && TEST_CONFIG_FILE == "rtsmart/rtsmart.cfg" ]; then
120
120
wget -q https://github.com/RT-Thread/toolchains-ci/releases/download/v1.7/aarch64-linux-musleabi_for_x86_64-pc-linux-gnu_stable.tar.bz2
121
121
sudo tar xjf aarch64-linux-musleabi_for_x86_64-pc-linux-gnu_stable.tar.bz2 -C /opt
122
122
/opt/aarch64-linux-musleabi_for_x86_64-pc-linux-gnu/bin/aarch64-linux-musleabi-gcc --version
@@ -126,7 +126,7 @@ jobs:
126
126
fi
127
127
128
128
# Install CPP11 Preprocessing Toolchain
129
- if [[ "${{ matrix.platform.QEMU_ARCH }}" == "arm" && "${{ matrix.config_file }}" == "cpp11/cpp11.cfg" ] ]; then
129
+ if [ TEST_QEMU_ARCH == "arm" && TEST_CONFIG_FILE == "cpp11/cpp11.cfg" ]; then
130
130
sudo rm -f /opt/gcc-arm-none-eabi-10-2020-q4-major/arm-none-eabi/include/c++/10.2.1/thread
131
131
sudo rm -f /opt/gcc-arm-none-eabi-10-2020-q4-major/arm-none-eabi/include/c++/10.2.1/mutex
132
132
sudo rm -f /opt/gcc-arm-none-eabi-10-2020-q4-major/arm-none-eabi/include/c++/10.2.1/condition_variable
@@ -138,18 +138,18 @@ jobs:
138
138
139
139
if [[ -z "$TOOLCHAIN_INSTALLED" ]]; then
140
140
echo "No valid toolchain installed, stopping the workflow."
141
- exit 1
142
141
fi
143
142
144
143
- name : Build BSP
144
+ if : ${{ RUN_FLAG == 'yes' && env.TOOLCHAIN_INSTALLED != '' && success() }}
145
145
run : |
146
146
echo CONFIG_RT_USING_UTESTCASES=y >> $TEST_BSP_ROOT/.config
147
147
cat .github/utest/$TEST_CONFIG_FILE >> $TEST_BSP_ROOT/.config
148
148
scons --pyconfig-silent -C $TEST_BSP_ROOT
149
149
scons -j$(nproc) --strict -C $TEST_BSP_ROOT
150
150
151
151
- name : QEMU Run Test
152
- if : ${{ matrix.platform.RUN == 'yes' && env.TOOLCHAIN_INSTALLED != '' && success() }}
152
+ if : ${{ RUN_FLAG == 'yes' && env.TOOLCHAIN_INSTALLED != '' && success() }}
153
153
run : |
154
154
if [ "$TEST_SD_FILE" != "None" ]; then
155
155
dd if=/dev/zero of=$TEST_BSP_ROOT/sd.bin bs=1024 count=65536
@@ -162,7 +162,7 @@ jobs:
162
162
disown $QEMU_PID
163
163
164
164
- name : Monitor qemu log
165
- if : ${{ matrix.platform.RUN == 'yes' && env.TOOLCHAIN_INSTALLED != '' && success() }}
165
+ if : ${{ RUN_FLAG == 'yes' && env.TOOLCHAIN_INSTALLED != '' && success() }}
166
166
run : |
167
167
FAILURE_DETECTED=false
168
168
ERROR_LOGS=""
0 commit comments