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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2023-03-03 20:46:06+0700, Đoàn Trần Công Danh <congdanhqx@xxxxxxxxx> wrote:
> Signed-off-by: Đoàn Trần Công Danh <congdanhqx@xxxxxxxxx>
> ---
>  .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)"

Oops, this is wrong, it should be:

	CI_OS_NAME="$(uname -s)-$(uname -m)"

> +	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
> 

-- 
Danh



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux