diff --git a/patch-ci-macos.sh b/patch-ci-macos.sh index dd7d356..21d756a 100755 --- a/patch-ci-macos.sh +++ b/patch-ci-macos.sh @@ -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 diff --git a/run-job-macos.sh b/run-job-macos.sh index dabe8a7..33bd400 100755 --- a/run-job-macos.sh +++ b/run-job-macos.sh @@ -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' diff --git a/run.sh b/run.sh index 0eb02f5..80d2243 100755 --- a/run.sh +++ b/run.sh @@ -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