git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 4/4] ci: add arm64 CI environment via CircleCI

From
Đoàn Trần Công Danh <congdanhqx@gmail.com>
Date
Mar 3, 2023, 13:46 UTC
Message-ID
<db5c58fb3ee114b56f110dcd20f938e77d8b476f.1677850518.git.congdanhqx@gmail.com>
In-Reply-To
<cover.1677850517.git.congdanhqx@gmail.com>
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
---
 .circleci/config.yml | 17 +++++++++++++++++
 ci/lib.sh            | 19 +++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 .circleci/config.yml
diff --git a/.circleci/config.yml b/.circleci/config.yml
new file mode 100644
index 0000000000..2f5e0966b7
--- /dev/null
+++ b/.circleci/config.yml
@@ -0,0 +1,17 @@
+# .circleci/config.yml
+jobs:
+  build:
+    machine:
+      image: ubuntu-2004:2022.04.1
+    resource_class: arm.medium
+    environment:
+      jobname: linux-gcc
+      runs_on_pool: ubuntu-arm64
+    steps:
+    - checkout
+    - run: ci/install-dependencies.sh
+    - run:
+        name: Build and Tests
+        command: ci/run-build-and-tests.sh
+    - store_test_results:
+        path: t/out
diff --git a/ci/lib.sh b/ci/lib.sh
index 3c19267a56..8b0c727950 100755
--- a/ci/lib.sh
+++ b/ci/lib.sh
@@ -201,6 +201,25 @@ then
 	MAKEFLAGS="$MAKEFLAGS --jobs=10"
 	test windows != "$CI_OS_NAME" ||
 	GIT_TEST_OPTS="--no-chain-lint --no-bin-wrappers $GIT_TEST_OPTS"
+elif test "$CIRCLECI" = true
+then
+	CI_TYPE=circleci
+	CI_BRANCH="$CIRCLE_BRANCH"
+	CI_COMMIT="$CIRCLE_SHA1"
+	CI_JOB_ID="$CIRCLE_WORKFLOW_JOB_ID"
+	CI_JOB_NUMBER="$CIRCLE_BUILD_NUM"
+	CI_OS_NAME="$(echo "$AGENT_OS" | tr A-Z a-z)"
+	test darwin != "$CI_OS_NAME" || CI_OS_NAME=osx
+	CI_REPO_SLUG="$(expr "$CIRCLE_REPOSITORY_URL" : '.*:\([^/]*/[^/]*\)\.git$')"
+	CC="${CC:-gcc}"
+
+	# use a subdirectory of the cache dir (because the file share is shared
+	# among *all* phases)
+	cache_dir="$HOME/none"
+
+	export GIT_PROVE_OPTS="--timer --jobs 10"
+	export GIT_TEST_OPTS="--verbose-log -x --write-junit-xml"
+	MAKEFLAGS="$MAKEFLAGS --jobs=10"
 else
 	echo "Could not identify CI type" >&2
 	env >&2
-- 
2.40.0.rc1.2.gd15644fe02
Previous: Đoàn Trần Công DanhNext: Đoàn Trần Công Danh
Message 5 of 9 in “Add a CI for unsigned char system”
  1. 0/4 Add a CI for unsigned char systemĐoàn Trần Công Danh, Mar 3, 2023
  2. 1/4 ci/lib.sh: remove an useless breakĐoàn Trần Công Danh, Mar 3, 2023
  3. 2/4 ci/install-dependencies: libify p4 and git-lfs installationĐoàn Trần Công Danh, Mar 3, 2023
  4. 3/4 ci/install-dependencies: install git-lfs for arm64 buildĐoàn Trần Công Danh, Mar 3, 2023
  5. 4/4 ci: add arm64 CI environment via CircleCIĐoàn Trần Công Danh, Mar 3, 2023
  6. Đoàn Trần Công DanhMar 3, 2023
  7. Jeff KingMar 9, 2023
  8. Chris TorekMar 9, 2023
  9. Jeff KingMar 9, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.