ci: enable DPDK GHA for arm64 with self-hosted runners
cover ci: enable DPDK GHA for arm64 with self-hosted runners
This is to enable DPDK GitHub Actions on arm64 and CI jobs are triggered only for repos installed with given GHApp and runners.
Serena He (1):
ci: enable DPDK GHA for arm64 with self-hosted runners
.github/workflows/build-arm64.yml | 118 ++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 .github/workflows/build-arm64.yml
Signature · 1 line
2.17.1
PATCH 1/1 ci: enable DPDK GHA for arm64 with self-hosted runners
CI jobs are triggered only for repos installed with given GHApp and runners
--- .github/workflows/build-arm64.yml | 118 ++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 .github/workflows/build-arm64.yml
.github/workflows/build-arm64.yml new file +118 -0
@@ -0,0 +1,118 @@ +name: build-arm64 + +on: + push: + schedule: + - cron: '0 0 * * 1' + +defaults: + run: + shell: bash --noprofile --norc -exo pipefail {0} + +jobs: + build: + # Here, runners for arm64 are accessed by installed GitHub APP, thus will not be available by fork. + # you can change the following 'if' and 'runs-on' if you have your own runners installed. + # or request to get your repo on the whitelist to use GitHub APP and delete this 'if'. + if: ${{ github.repository == 'DPDK/dpdk' || github.repository == 'ovsrobot/dpdk' }} + name: ${{ join(matrix.config.*, '-') }} + runs-on: ${{ matrix.config.os }} + env: + ABI_CHECKS: ${{ contains(matrix.config.checks, 'abi') }} + BUILD_DOCS: ${{ contains(matrix.config.checks, 'doc') }} + CL: ${{ matrix.config.compiler == 'clang' }} + CC: ccache ${{ matrix.config.compiler }} + DEF_LIB: ${{ matrix.config.library }} + LIBABIGAIL_VERSION: libabigail-1.8 + REF_GIT_TAG: none + + strategy: + fail-fast: false + matrix: + config: + - os: [self-hosted,arm-ubuntu-20.04] + compiler: gcc + library: static + - os: [self-hosted,arm-ubuntu-20.04] + compiler: gcc + library: shared + checks: doc+tests + - os: [self-hosted,arm-ubuntu-20.04] + compiler: clang + library: static + - os: [self-hosted,arm-ubuntu-20.04] + compiler: clang + library: shared + checks: doc+tests + + steps: + - name: Checkout sources + uses: actions/checkout@v2 + - name: Generate cache keys + id: get_ref_keys + run: | + echo -n '::set-output name=ccache::' + echo 'ccache-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-'$(date -u +%Y-w%W) + echo -n '::set-output name=libabigail::' + echo 'libabigail-${{ matrix.config.os }}' + echo -n '::set-output name=abi::' + echo 'abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.LIBABIGAIL_VERSION }}-${{ env.REF_GIT_TAG }}' + - name: Retrieve ccache cache + uses: actions/cache@v2 + with: + path: ~/.ccache + key: ${{ steps.get_ref_keys.outputs.ccache }}-${{ github.ref }} + restore-keys: | + ${{ steps.get_ref_keys.outputs.ccache }}-refs/heads/main + - name: Retrieve libabigail cache + id: libabigail-cache + uses: actions/cache@v2 + if: env.ABI_CHECKS == 'true' + with: + path: libabigail + key: ${{ steps.get_ref_keys.outputs.libabigail }} + - name: Retrieve ABI reference cache + uses: actions/cache@v2 + if: env.ABI_CHECKS == 'true' + with: + path: reference + key: ${{ steps.get_ref_keys.outputs.abi }} + - name: Update APT cache + run: sudo apt update || true + - name: Install packages + run: sudo apt install -y ccache libnuma-dev python3-setuptools + python3-wheel python3-pip python3-pyelftools ninja-build libbsd-dev + libpcap-dev libibverbs-dev libcrypto++-dev libfdt-dev libjansson-dev + libarchive-dev zlib1g-dev pkgconf + - name: Install libabigail build dependencies if no cache is available + if: env.ABI_CHECKS == 'true' && steps.libabigail-cache.outputs.cache-hit != 'true' + run: sudo apt install -y autoconf automake libtool pkg-config libxml2-dev + libdw-dev + + - name: Install test tools packages + run: sudo apt install -y gdb + - name: Install doc generation packages + if: env.BUILD_DOCS == 'true' + run: sudo apt install -y doxygen graphviz python3-sphinx + python3-sphinx-rtd-theme + - name: Run setup + run: | + .ci/linux-setup.sh + # Workaround on $HOME permissions as EAL checks them for plugin loading + chmod o-w $HOME + - name: Install clang + if: env.CL == 'true' + run: sudo apt install -y clang + - name: Build and test + run: .ci/linux-build.sh + - name: Upload logs on failure + if: failure() + uses: actions/upload-artifact@v2 + with: + name: meson-logs-${{ join(matrix.config.*, '-') }} + path: | + build/meson-logs/testlog.txt + build/.ninja_log + build/meson-logs/meson-log.txt + build/gdb.log +
Signature · 1 line
2.17.1
13/10/2021 10:03, Serena He:
Quoted 1 line
CI jobs are triggered only for repos installed with given GHApp and runners
[...]
.github/workflows/build-arm64.yml line 17
Quoted 4 lines
.github/workflows/build-arm64.yml new file +4
-0+ # Here, runners for arm64 are accessed by installed GitHub APP, thus will not be available by fork. + # you can change the following 'if' and 'runs-on' if you have your own runners installed. + # or request to get your repo on the whitelist to use GitHub APP and delete this 'if'. + if: ${{ github.repository == 'DPDK/dpdk' || github.repository == 'ovsrobot/dpdk' }}
What is this "GitHub APP"?
Hi Thomas, thanks for the feedback.
Quoted 16 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Wednesday, October 13, 2021 5:47 PM
To: Serena He <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Honnappa Nagarahalli <[email protected]>; Ruifeng Wang <[email protected]>; Dean Arnold <[email protected]>
Subject: Re: [PATCH v1 1/1] ci: enable DPDK GHA for arm64 with self-hosted runners13/10/2021 10:03, Serena He:
Quoted 1 line
CI jobs are triggered only for repos installed with given GHApp and runners
[...]
Quoted 1 line
+ # Here, runners for arm64 are accessed by installed GitHub APP, thus
will not be available by fork.
Quoted 9 lines
Quoted 1 line
+ # you can change the following 'if' and 'runs-on' if you have your own
runners installed.
Quoted 1 line
+ # or request to get your repo on the whitelist to use GitHub APP and
delete this 'if'.
Quoted 1 line
+ if: ${{ github.repository == 'DPDK/dpdk' || github.repository ==
'ovsrobot/dpdk' }}
What is this "GitHub APP"?
Apps on GitHub are integrations with the GitHub APIs. This "GitHub APP" should be installed on repository and it will enable requests for arm-based runners . Sorry for not specifying this APP in the above comment. It is to avoid unnecessary access from public. The installation link will be provided, as well as document, after release.
14/10/2021 06:20, Serena He:
Quoted 10 lines
From: Thomas Monjalon <[email protected]>
Quoted 9 lines
13/10/2021 10:03, Serena He:
Quoted 1 line
CI jobs are triggered only for repos installed with given GHApp and runners
[...]
Quoted 1 line
+ # Here, runners for arm64 are accessed by installed GitHub APP, thus
will not be available by fork.
Quoted 1 line
+ # you can change the following 'if' and 'runs-on' if you have your own
runners installed.
Quoted 1 line
+ # or request to get your repo on the whitelist to use GitHub APP and
delete this 'if'.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
+ if: ${{ github.repository == 'DPDK/dpdk' || github.repository ==
'ovsrobot/dpdk' }}
What is this "GitHub APP"?
Apps on GitHub are integrations with the GitHub APIs. This "GitHub APP" should be installed on repository
So GitHub has no native Arm support?
Quoted 1 line
and it will enable requests for arm-based runners.
Where it will run? Which servers?
Quoted 2 lines
Sorry for not specifying this APP in the above comment. It is to avoid unnecessary access from public.
You want to control who can run on these servers? There is no access control other than app installation?
Quoted 1 line
The installation link will be provided, as well as document, after release.
After release of the app? You mean it is not ready yet?
In current state of assumptions, it is a nack.
Quoted 17 lines
14/10/2021 06:20, Serena He:
Quoted 3 lines
From: Thomas Monjalon <[email protected]>
Quoted 2 lines
13/10/2021 10:03, Serena He:
Quoted 1 line
CI jobs are triggered only for repos installed with given GHApp and
runners
Quoted 2 lines
Quoted 2 lines
[...]
Quoted 1 line
+ # Here, runners for arm64 are accessed by installed GitHub APP,
thus
Quoted 2 lines
Quoted 2 lines
will not be available by fork.
Quoted 1 line
+ # you can change the following 'if' and 'runs-on' if you have your
own
Quoted 6 lines
Quoted 6 lines
runners installed.
Quoted 1 line
+ # or request to get your repo on the whitelist to use GitHub APP and
delete this 'if'.
Quoted 1 line
+ if: ${{ github.repository == 'DPDK/dpdk' || github.repository ==
'ovsrobot/dpdk' }}
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
What is this "GitHub APP"?
Apps on GitHub are integrations with the GitHub APIs. This "GitHub APP" should be installed on repository
So GitHub has no native Arm support?
No, GitHub has no native Arm support.
Quoted 3 lines
Quoted 1 line
and it will enable requests for arm-based runners.
Where it will run? Which servers?
Runners will run in AWS EC2 on Graviton2.
Quoted 5 lines
Quoted 2 lines
Sorry for not specifying this APP in the above comment. It is to avoid unnecessary access from public.
You want to control who can run on these servers? There is no access control other than app installation?
Whitelist mentioned in the comment is for access control, but we hope the link is not shared with anyone who has no repo get whitelisted.
Quoted 3 lines
Quoted 1 line
The installation link will be provided, as well as document, after release.
After release of the app? You mean it is not ready yet?
The APP has been ready. It's waiting for a release date.
Quoted 3 lines
In current state of assumptions, it is a nack.
14/10/2021 10:18, Serena He:
Quoted 33 lines
Quoted 17 lines
14/10/2021 06:20, Serena He:
Quoted 3 lines
From: Thomas Monjalon <[email protected]>
Quoted 2 lines
13/10/2021 10:03, Serena He:
Quoted 1 line
CI jobs are triggered only for repos installed with given GHApp and
runners
Quoted 2 lines
Quoted 2 lines
[...]
Quoted 1 line
+ # Here, runners for arm64 are accessed by installed GitHub APP,
thus
Quoted 2 lines
Quoted 2 lines
will not be available by fork.
Quoted 1 line
+ # you can change the following 'if' and 'runs-on' if you have your
own
Quoted 6 lines
Quoted 6 lines
runners installed.
Quoted 1 line
+ # or request to get your repo on the whitelist to use GitHub APP and
delete this 'if'.
Quoted 1 line
+ if: ${{ github.repository == 'DPDK/dpdk' || github.repository ==
'ovsrobot/dpdk' }}
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
What is this "GitHub APP"?
Apps on GitHub are integrations with the GitHub APIs. This "GitHub APP" should be installed on repository
So GitHub has no native Arm support?
No, GitHub has no native Arm support.
Quoted 3 lines
Quoted 1 line
and it will enable requests for arm-based runners.
Where it will run? Which servers?
Runners will run in AWS EC2 on Graviton2.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Sorry for not specifying this APP in the above comment. It is to avoid unnecessary access from public.
You want to control who can run on these servers? There is no access control other than app installation?
Whitelist mentioned in the comment is for access control, but we hope the link is not shared with anyone who has no repo get whitelisted.
You mean the link is enough to run on your AWS instance? There is no key control when running?
It looks really weak, and I don't want to merge anything in DPDK related to some secret app.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
The installation link will be provided, as well as document, after release.
After release of the app? You mean it is not ready yet?
The APP has been ready. It's waiting for a release date.
Quoted 1 line
In current state of assumptions, it is a nack.
So I confirm the nack for now.
.github/workflows/build-arm64.yml
Quoted 16 lines · Serena He
CI jobs are triggered only for repos installed with given GHApp and runners
Signed-off-by Serena He <[email protected]>--- .github/workflows/build-arm64.yml | 118 ++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+)create mode 100644
.github/workflows/build-arm64.yml.github/workflows/build-arm64.yml new file +0
-0
Adding a new workflow should work on our 0-day-bot. We now support having multiple workflows so this looks good
.github/workflows/build-arm64.yml line 6
Quoted 7 lines
.github/workflows/build-arm64.yml new file +6
-0@@ -0,0 +1,118 @@ +name: build-arm64 + +on: + push: + schedule: + - cron: '0 0 * * 1'
nit: Please add a comment for when this is scheduled so we dont have to do cron math :)
.github/workflows/build-arm64.yml line 16
Quoted 10 lines
.github/workflows/build-arm64.yml new file +10
-0+ +defaults: + run: + shell: bash --noprofile --norc -exo pipefail {0} + +jobs: + build: + # Here, runners for arm64 are accessed by installed GitHub APP, thus will not be available by fork. + # you can change the following 'if' and 'runs-on' if you have your own runners installed. + # or request to get your repo on the whitelist to use GitHub APP and delete this 'if'.
I think I understand. I think you mean s/GitHub APP/GitHub/ . otherwise I dont know what that is. From my understanding you had to request special arm-based runners from github
Are DPDK/dpdk and ovsrobot/dpdk whitelisted to use the arm-based runners?
Maybe there was a thread about this in the past that I missed, but where and how do you get these arm-based runners from github?
Quoted 64 lines
.github/workflows/build-arm64.yml new file +64
-0+ if: ${{ github.repository == 'DPDK/dpdk' || github.repository == 'ovsrobot/dpdk' }} + name: ${{ join(matrix.config.*, '-') }} + runs-on: ${{ matrix.config.os }} + env: + ABI_CHECKS: ${{ contains(matrix.config.checks, 'abi') }} + BUILD_DOCS: ${{ contains(matrix.config.checks, 'doc') }} + CL: ${{ matrix.config.compiler == 'clang' }} + CC: ccache ${{ matrix.config.compiler }} + DEF_LIB: ${{ matrix.config.library }} + LIBABIGAIL_VERSION: libabigail-1.8 + REF_GIT_TAG: none + + strategy: + fail-fast: false + matrix: + config: + - os: [self-hosted,arm-ubuntu-20.04] + compiler: gcc + library: static + - os: [self-hosted,arm-ubuntu-20.04] + compiler: gcc + library: shared + checks: doc+tests + - os: [self-hosted,arm-ubuntu-20.04] + compiler: clang + library: static + - os: [self-hosted,arm-ubuntu-20.04] + compiler: clang + library: shared + checks: doc+tests + + steps: + - name: Checkout sources + uses: actions/checkout@v2 + - name: Generate cache keys + id: get_ref_keys + run: | + echo -n '::set-output name=ccache::' + echo 'ccache-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-'$(date -u +%Y-w%W) + echo -n '::set-output name=libabigail::' + echo 'libabigail-${{ matrix.config.os }}' + echo -n '::set-output name=abi::' + echo 'abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.LIBABIGAIL_VERSION }}-${{ env.REF_GIT_TAG }}' + - name: Retrieve ccache cache + uses: actions/cache@v2 + with: + path: ~/.ccache + key: ${{ steps.get_ref_keys.outputs.ccache }}-${{ github.ref }} + restore-keys: | + ${{ steps.get_ref_keys.outputs.ccache }}-refs/heads/main + - name: Retrieve libabigail cache + id: libabigail-cache + uses: actions/cache@v2 + if: env.ABI_CHECKS == 'true' + with: + path: libabigail + key: ${{ steps.get_ref_keys.outputs.libabigail }} + - name: Retrieve ABI reference cache + uses: actions/cache@v2 + if: env.ABI_CHECKS == 'true' + with: + path: reference + key: ${{ steps.get_ref_keys.outputs.abi }} + - name: Update APT cache
.github/workflows/build-arm64.yml line 90
Quoted 10 lines
.github/workflows/build-arm64.yml new file +10
-0+ run: sudo apt update || true + - name: Install packages + run: sudo apt install -y ccache libnuma-dev python3-setuptools + python3-wheel python3-pip python3-pyelftools ninja-build libbsd-dev + libpcap-dev libibverbs-dev libcrypto++-dev libfdt-dev libjansson-dev + libarchive-dev zlib1g-dev pkgconf + - name: Install libabigail build dependencies if no cache is available + if: env.ABI_CHECKS == 'true' && steps.libabigail-cache.outputs.cache-hit != 'true' + run: sudo apt install -y autoconf automake libtool pkg-config libxml2-dev + libdw-dev
Lots of caching stuff. All of it needed?
Quoted 17 lines
.github/workflows/build-arm64.yml new file +17
-0+ + - name: Install test tools packages + run: sudo apt install -y gdb + - name: Install doc generation packages + if: env.BUILD_DOCS == 'true' + run: sudo apt install -y doxygen graphviz python3-sphinx + python3-sphinx-rtd-theme + - name: Run setup + run: | + .ci/linux-setup.sh + # Workaround on $HOME permissions as EAL checks them for plugin loading + chmod o-w $HOME + - name: Install clang + if: env.CL == 'true' + run: sudo apt install -y clang + - name: Build and test + run: .ci/linux-build.sh
.github/workflows/build-arm64.yml line 117
Quoted 10 lines
.github/workflows/build-arm64.yml new file +10
-0+ - name: Upload logs on failure + if: failure() + uses: actions/upload-artifact@v2 + with: + name: meson-logs-${{ join(matrix.config.*, '-') }} + path: | + build/meson-logs/testlog.txt + build/.ninja_log + build/meson-logs/meson-log.txt + build/gdb.log
LGTM!
Quoted 2 lines
.github/workflows/build-arm64.yml new file +1
-0+
Hi Michael, thanks for the feedback, and here are some comments below.
Quoted 14 lines · Serena He
Quoted 9 lines
CI jobs are triggered only for repos installed with given GHApp and runners
Signed-off-by Serena He <[email protected]>--- .github/workflows/build-arm64.yml | 118++++++++++++++++++++++++++++++
Quoted 3 lines
1 file changed, 118 insertions(+)create mode 100644
.github/workflows/build-arm64.yml
Quoted 8 lines
.github/workflows/build-arm64.yml
Quoted 6 lines
.github/workflows/build-arm64.yml new file +0
-0Adding a new workflow should work on our 0-day-bot. We now support having multiple workflows so this looks good
Great!
Quoted 9 lines
.github/workflows/build-arm64.yml line 6
Quoted 7 lines
.github/workflows/build-arm64.yml new file +6
-0@@ -0,0 +1,118 @@ +name: build-arm64 + +on: + push: + schedule: + - cron: '0 0 * * 1'nit: Please add a comment for when this is scheduled so we dont have to do cron math :)
Sure, I will add that.
Quoted 17 lines
.github/workflows/build-arm64.yml
Quoted 8 lines
.github/workflows/build-arm64.yml new file +8
-0+ +defaults: + run: + shell: bash --noprofile --norc -exo pipefail {0} + +jobs: + build: + # Here, runners for arm64 are accessed by installed GitHub APP, thuswill not be available by fork.
.github/workflows/build-arm64.yml line 15
Quoted 1 line
.github/workflows/build-arm64.yml new file +1
-0+ # you can change the following 'if' and 'runs-on' if you have your ownrunners installed.
.github/workflows/build-arm64.yml line 16
Quoted 1 line
.github/workflows/build-arm64.yml new file +1
-0+ # or request to get your repo on the whitelist to use GitHub APP anddelete this 'if'.
I think I understand. I think you mean s/GitHub APP/GitHub/ . otherwise I dont know what that is. From my understanding you had to request special arm-based runners from github
Quoted 5 lines
Are DPDK/dpdk and ovsrobot/dpdk whitelisted to use the arm-based runners?
Maybe there was a thread about this in the past that I missed, but where and how do you get these arm-based runners from github?
GitHub APPs are integrations with the GitHub APIs and this one provided here will send requests for arm-based runners from AWS cloud. Document will be provided along with the APP to make better understanding after release. DPDK/dpdk and ovsrobot/dpdk are both whitelisted to use.
Quoted 2 lines
.github/workflows/build-arm64.yml line 17
Quoted 1 line
.github/workflows/build-arm64.yml new file +1
-0+ if: ${{ github.repository == 'DPDK/dpdk' || github.repository =='ovsrobot/dpdk' }}
[...]
Quoted 41 lines
.github/workflows/build-arm64.yml
Quoted 5 lines
.github/workflows/build-arm64.yml new file +5
-0+ - name: Generate cache keys + id: get_ref_keys + run: | + echo -n '::set-output name=ccache::' + echo 'ccache-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-'$(date -u +%Y-w%W)
.github/workflows/build-arm64.yml
Quoted 4 lines
.github/workflows/build-arm64.yml new file +4
-0+ echo -n '::set-output name=libabigail::' + echo 'libabigail-${{ matrix.config.os }}' + echo -n '::set-output name=abi::' + echo 'abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.LIBABIGAIL_VERSION }}- ${{ env.REF_GIT_TAG }}'
Quoted 19 lines
.github/workflows/build-arm64.yml new file +19
-0+ - name: Retrieve ccache cache + uses: actions/cache@v2 + with: + path: ~/.ccache + key: ${{ steps.get_ref_keys.outputs.ccache }}-${{ github.ref }} + restore-keys: | + ${{ steps.get_ref_keys.outputs.ccache }}-refs/heads/main + - name: Retrieve libabigail cache + id: libabigail-cache + uses: actions/cache@v2 + if: env.ABI_CHECKS == 'true' + with: + path: libabigail + key: ${{ steps.get_ref_keys.outputs.libabigail }} + - name: Retrieve ABI reference cache + uses: actions/cache@v2 + if: env.ABI_CHECKS == 'true' + with: + path: reference.github/workflows/build-arm64.yml
Quoted 10 lines
.github/workflows/build-arm64.yml new file +10
-0+ key: ${{ steps.get_ref_keys.outputs.abi }} + - name: Update APT cache + run: sudo apt update || true + - name: Install packages + run: sudo apt install -y ccache libnuma-dev python3-setuptools + python3-wheel python3-pip python3-pyelftools ninja-build libbsd-dev + libpcap-dev libibverbs-dev libcrypto++-dev libfdt-dev libjansson-dev + libarchive-dev zlib1g-dev pkgconf + - name: Install libabigail build dependencies if no cache is available + if: env.ABI_CHECKS == 'true' && steps.libabigail-cache.outputs.cache-
Quoted 5 lines
hit != 'true'
Quoted 1 line
+ run: sudo apt install -y autoconf automake libtool pkg-config libxml2-
dev
Quoted 1 line
+ libdw-dev
Lots of caching stuff. All of it needed?
All these caching stuff is in consistence with the build workflow on GitHub provided runners, so should be needed.