maht commented on a change in pull request #3: Initial checkin CI related 
scripts and testlist files
URL: 
https://github.com/apache/incubator-nuttx-testing/pull/3#discussion_r373740857
 
 

 ##########
 File path: cibuild.sh
 ##########
 @@ -0,0 +1,171 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+WD=$PWD
+nuttx=$WD/../nuttx
+apps=$WD/../apps
+tools=$WD/../tools
+prebuilt=$WD/../prebuilt
+
+# genromfs
+install=("if [ ! -d \"$prebuilt/genromfs/usr/bin\" ]; then \
+            if [ ! -d "$tools" ]; then \
+              git clone https://github.com/nuttx/tools.git $tools; \
+            fi; \
+            mkdir -p $prebuilt; cd $tools; \
+            tar zxf genromfs-0.5.2.tar.gz -C $prebuilt; \
+            cd $prebuilt/genromfs-0.5.2; \
+            make install PREFIX=$prebuilt/genromfs; \
+            cd $prebuilt; rm -rf genromfs-0.5.2; \
+          fi; \
+          genromfs -h; \
+          ")
+path=("$prebuilt/genromfs/usr/bin")
+
+# kconfig-frontends
+install+=("if [ ! -d \"$prebuilt/kconfig-frontends/bin\" ]; then \
+             cd $tools/kconfig-frontends; \
+             ./configure --prefix=$prebuilt/kconfig-frontends --enable-mconf 
--disable-gconf --disable-qconf --enable-static; \
+             make install; \
+             cd $tools; git clean -xfd; \
+           fi; \
+           ")
+path+=("$prebuilt/kconfig-frontends/bin")
+
+# arm gcc toolchain
+install+=("if [ ! -d \"$prebuilt/gcc-arm-none-eabi/bin\" ]; then \
+             cd $prebuilt; \
+             wget 
https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/RC2.1/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2;
 \
+             tar jxf gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2; \
+             mv gcc-arm-none-eabi-9-2019-q4-major gcc-arm-none-eabi; \
+             rm gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2; \
+           fi; \
+           arm-none-eabi-gcc --version; \
+           ")
+path+=("$prebuilt/gcc-arm-none-eabi/bin")
+
+# mips gcc toolchain
+install+=("if [ ! -d \"$prebuilt/pinguino-compilers/linux64/p32/bin\" ]; then \
+             cd $prebuilt; \
+             git clone https://github.com/PinguinoIDE/pinguino-compilers; \
+           fi; \
+           p32-gcc --version; \
+           ")
+path+=("$prebuilt/pinguino-compilers/linux64/p32/bin")
+
+# risc-v gcc toolchain
+install+=("if [ ! -d \"$prebuilt/riscv64-unknown-elf-gcc/bin\" ]; then \
+             cd $prebuilt; \
+             wget 
https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-ubuntu14.tar.gz;
 \
+             tar zxf 
riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-ubuntu14.tar.gz; \
+             mv riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-ubuntu14 
riscv64-unknown-elf-gcc; \
+             rm 
riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-ubuntu14.tar.gz; \
+           fi; \
+           riscv64-unknown-elf-gcc --version; \
+           ")
+path+=("$prebuilt/riscv64-unknown-elf-gcc/bin")
+
+# ccache
 
 Review comment:
   I think having the option to enable/disable ccache would be useful: ccache 
is used to cache compilations, but in CI is better to compile from scratch, 
since usually repeatability is desired despite of the speed. Or is ccache being 
used because the script `testbuild.sh` tries to compile the same files many 
times due to different configurations? If the caching is not being used 
disabling it would be better as the cache miss seems to have a significant 
performance cost (see https://ccache.dev/performance.html), and only enable it 
for the case a developer want to test the script locally before sending to 
upstream.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to