Suppress darwin.sh warning

This commit is contained in:
Lup Yuen Lee 2024-11-09 15:23:17 +08:00
parent 38fdcad69b
commit 37d8a5cd9a
3 changed files with 30 additions and 8 deletions

View file

@ -90,8 +90,8 @@ cat <<'EOF' | tr '\n' '\r'
python_tools() {
#### TODO: We fixed the Python Environment
python3 -m venv \/tmp\/nuttx-macos.venv
source \/tmp\/nuttx-macos.venv\/bin\/activate
python3 -m venv .venv
source .venv\/bin\/activate
# workaround for Cython issue
EOF

View file

@ -44,15 +44,37 @@ git clone https://github.com/apache/nuttx-apps apps
pushd nuttx ; echo NuttX Source: https://github.com/apache/nuttx/tree/$(git rev-parse HEAD) ; popd
pushd apps ; echo NuttX Apps: https://github.com/apache/nuttx-apps/tree/$(git rev-parse HEAD) ; popd
## Patch the CI Job for Apple Silicon Mac
## Patch the macOS CI Job for Apple Silicon: darwin.sh
pushd nuttx
$script_dir/patch-ci-macos.sh
git status
popd
## Run the CI Job
## Suppress darwin.sh warning: We rename "nuttx/tools/ci" as "nuttx/tools/__pycache__"
## Why __pycache__? Because it's skipped by "nuttx/tools/.gitignore"
pushd nuttx
mv tools/ci tools/__pycache__
git restore tools/ci
git status
popd
## Patch CI Job cibuild.sh to point to __pycache__
## Change: CIPLAT=${CIWORKSPACE}/nuttx/tools/ci/platforms
## To: CIPLAT=${CIWORKSPACE}/nuttx/tools/__pycache__/platforms
file=nuttx/tools/__pycache__/cibuild.sh
tmp_file=$tmp_dir/cibuild.sh
search='\/ci\/'
replace='\/__pycache__\/'
cat $file \
| sed "s/$search/$replace/g" \
>$tmp_file
mv $tmp_file $file
chmod +x $file
## Run the CI Job in __pycache__
## ./cibuild.sh -i -c -A -R testlist/macos.dat
## ./cibuild.sh -i -c -A -R testlist/arm-01.dat
pushd nuttx/tools/ci
pushd nuttx/tools/__pycache__
(
./cibuild.sh -i -c -A -R testlist/$job.dat \
|| echo '***** BUILD FAILED'

6
run.sh
View file

@ -8,8 +8,8 @@
set -e # Exit when any command fails
set -x # Echo commands
## Run a NuttX CI Job on macOS
# ./run-job-macos.sh arm-01
## Run All NuttX CI Jobs on macOS
./run-ci-macos.sh
## Run a NuttX CI Job on macOS
# ./run-job-macos.sh arm-01