From 440008767570f9779f32ab34dd35e77cacab79be Mon Sep 17 00:00:00 2001 From: Lup Yuen Lee Date: Sun, 8 Dec 2024 10:06:52 +0800 Subject: [PATCH] Add article --- README.md | 2 ++ patch-ci-macos.sh | 2 +- run-build-macos.sh | 2 +- run-ci-macos.sh | 2 +- run-job-macos.sh | 2 +- run.sh | 37 +++++++------------------------------ 6 files changed, 13 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index e91f756..ab0944a 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ Read the articles... - ["Your very own Build Farm for Apache NuttX RTOS"](https://lupyuen.codeberg.page/articles/ci2.html) +- ["macOS Build Farm for Apache NuttX RTOS (Apple Silicon)"](https://lupyuen.github.io/articles/ci5) + - ["Optimising the Continuous Integration for Apache NuttX RTOS (GitHub Actions)"](https://lupyuen.codeberg.page/articles/ci3.html) - ["Continuous Integration Dashboard for Apache NuttX RTOS (Prometheus and Grafana)"](https://lupyuen.github.io/articles/ci4) diff --git a/patch-ci-macos.sh b/patch-ci-macos.sh index 6805d8f..b78b55d 100755 --- a/patch-ci-macos.sh +++ b/patch-ci-macos.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash ## Patch the NuttX CI Job for macOS (darwin_arm64.sh), so that it runs on Build Farm -## Read the article: https://lupyuen.codeberg.page/articles/ci2.html +## Read the article: https://lupyuen.github.io/articles/ci5 ## We change the Python Environment from: ## python_tools() { ... diff --git a/run-build-macos.sh b/run-build-macos.sh index 25b2498..e3f035b 100755 --- a/run-build-macos.sh +++ b/run-build-macos.sh @@ -7,7 +7,7 @@ ## To re-download the toolchains: ## rm -rf /tmp/run-build-macos -## Read the article: https://lupyuen.codeberg.page/articles/ci2.html +## Read the article: https://lupyuen.github.io/articles/ci5 echo Now running https://github.com/lupyuen/nuttx-build-farm/blob/main/run-build-macos.sh $1 echo utc_time=$(date -u +'%Y-%m-%dT%H:%M:%S') diff --git a/run-ci-macos.sh b/run-ci-macos.sh index cf24252..f8d8e27 100755 --- a/run-ci-macos.sh +++ b/run-ci-macos.sh @@ -17,7 +17,7 @@ ## Which means the GitLab Snippets will be created in the existing GitLab Repo "lupyuen/nuttx-build-log" ## To re-download the toolchain: rm -rf /tmp/run-job-macos -## Read the article: https://lupyuen.codeberg.page/articles/ci2.html + ## Read the article: https://lupyuen.github.io/articles/ci5 echo Now running https://github.com/lupyuen/nuttx-build-farm/blob/main/run-ci-macos.sh device=ci diff --git a/run-job-macos.sh b/run-job-macos.sh index a725823..9d3788a 100755 --- a/run-job-macos.sh +++ b/run-job-macos.sh @@ -4,7 +4,7 @@ ## ./run-job-macos.sh arm-01 ## To re-download the toolchain: rm -rf /tmp/run-job-macos -## Read the article: https://lupyuen.codeberg.page/articles/ci2.html +## Read the article: https://lupyuen.github.io/articles/ci5 echo Now running https://github.com/lupyuen/nuttx-build-farm/blob/main/run-job-macos.sh $1 echo Called by https://github.com/lupyuen/nuttx-build-farm/blob/main/run-ci-macos.sh diff --git a/run.sh b/run.sh index d437453..b70ab3b 100755 --- a/run.sh +++ b/run.sh @@ -1,10 +1,15 @@ #!/usr/bin/env bash -# Run NuttX Build Farm for macOS +## Run NuttX Build Farm for macOS +## Read the article: https://lupyuen.github.io/articles/ci5 ## Set the GitHub Token ## export GITHUB_TOKEN=... . $HOME/github-token-macos.sh +## Or GitLab Token +## export GITLAB_TOKEN=... +## . $HOME/gitlab-token-macos.sh + set -e # Exit when any command fails set -x # Echo commands @@ -12,32 +17,4 @@ set -x # Echo commands ./run-ci-macos.sh ## Run One Single NuttX CI Job on macOS -# ./run-job-macos.sh risc-v-05 - -exit -tmp_dir=/tmp/241116 -pushd $tmp_dir - -## test_example.py: Reduce the timeout to 1 second -## Change: p.sendCommand("pipe", "redirect_reader: Returning success", timeout=60) -## To: p.sendCommand("pipe", "redirect_reader: Returning success", timeout=1) -file=nuttx-patched/tools/ci/testrun/script/test_example/test_example.py -tmp_file=$tmp_dir/test_example.py -search='timeout=[0-9]*' -replace='timeout=1' -cat $file \ - | sed "s/$search/$replace/g" \ - >$tmp_file -mv $tmp_file $file - -## test_openposix_.py: Reduce the timeout to 1 second -## Change: p.sendCommand( \n "ltp_interfaces_mq_send_4_2", ["PASSED", "passed", "Passed", "PASS"], timeout=10 \n ) -## To: p.sendCommand( \n "ltp_interfaces_mq_send_4_2", ["PASSED", "passed", "Passed", "PASS"], timeout=1 \n ) -file=nuttx-patched/tools/ci/testrun/script/test_open_posix/test_openposix_.py -tmp_file=$tmp_dir/test_openposix_.py -search='timeout=[0-9]*' -replace='timeout=1' -cat $file \ - | sed "s/$search/$replace/g" \ - >$tmp_file -mv $tmp_file $file +## ./run-job-macos.sh risc-v-05