Skip to content

Commit fcd1138

Browse files
authoredAug 29, 2024··
[CI] [GHA] Introduce Debian 10 ARM (#26156)
### Tickets: - *148717*
1 parent c78fef6 commit fcd1138

File tree

8 files changed

+276
-18
lines changed

8 files changed

+276
-18
lines changed
 

‎.github/dockerfiles/docker_tag

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pr-26067
1+
pr-26156
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
FROM openvinogithubactions.azurecr.io/dockerio/library/debian:10.13
2+
3+
USER root
4+
5+
# APT configuration
6+
RUN echo 'Acquire::Retries "10";' > /etc/apt/apt.conf && \
7+
echo 'APT::Get::Assume-Yes "true";' >> /etc/apt/apt.conf && \
8+
echo 'APT::Get::Fix-Broken "true";' >> /etc/apt/apt.conf && \
9+
echo 'APT::Get::no-install-recommends "true";' >> /etc/apt/apt.conf
10+
11+
ENV DEBIAN_FRONTEND="noninteractive" \
12+
TZ="Europe/London"
13+
14+
RUN apt-get update && \
15+
apt-get install \
16+
software-properties-common \
17+
curl \
18+
git \
19+
gpg-agent \
20+
tzdata \
21+
# Pythons \
22+
python3 \
23+
python3-pip \
24+
python3-dev \
25+
python3-venv \
26+
python3-distutils \
27+
libhdf5-dev \
28+
# For building Python from source
29+
build-essential \
30+
libffi-dev \
31+
libgdbm-dev \
32+
libc6-dev \
33+
libssl-dev \
34+
zlib1g-dev \
35+
libbz2-dev \
36+
libreadline-dev \
37+
libsqlite3-dev \
38+
libncurses5-dev \
39+
libncursesw5-dev \
40+
xz-utils \
41+
tk-dev \
42+
libxml2-dev \
43+
libxmlsec1-dev \
44+
liblzma-dev \
45+
wget \
46+
# Compilers
47+
gcc-arm-linux-gnueabihf \
48+
g++-arm-linux-gnueabihf \
49+
&& \
50+
rm -rf /var/lib/apt/lists/*
51+
52+
# Install build dependencies
53+
ADD install_build_dependencies.sh /install_build_dependencies.sh
54+
RUN chmod +x /install_build_dependencies.sh && \
55+
/install_build_dependencies.sh && \
56+
rm -rf /var/lib/apt/lists/*
57+
58+
# Install sscache
59+
ARG SCCACHE_VERSION="v0.7.5"
60+
ENV SCCACHE_HOME="/opt/sccache" \
61+
SCCACHE_PATH="/opt/sccache/sccache"
62+
63+
RUN mkdir ${SCCACHE_HOME} && cd ${SCCACHE_HOME} && \
64+
SCCACHE_ARCHIVE="sccache-${SCCACHE_VERSION}-aarch64-unknown-linux-musl.tar.gz" && \
65+
curl -SLO https://github.com/mozilla/sccache/releases/download/${SCCACHE_VERSION}/${SCCACHE_ARCHIVE} && \
66+
tar -xzf ${SCCACHE_ARCHIVE} --strip-components=1 && rm ${SCCACHE_ARCHIVE}
67+
68+
ENV PATH="$SCCACHE_HOME:$PATH"
69+
70+
# Setup Python
71+
RUN wget https://www.python.org/ftp/python/3.11.9/Python-3.11.9.tar.xz
72+
73+
RUN tar -xf Python-3.11.9.tar.xz && \
74+
cd Python-3.11.9 && \
75+
./configure --enable-optimizations && \
76+
make -j 8 && \
77+
make altinstall
78+
79+
# Setup pip
80+
ENV PIP_VERSION="24.0"
81+
RUN python3 -m pip install --upgrade pip==24.0
82+
RUN python3.11 -m pip install --upgrade pip==24.0
83+
84+
# Use Python 3.11 as default
85+
# Using venv here because other methods to switch the default Python break both system and wheels build
86+
RUN python3.11 -m venv venv
87+
ENV PATH="/venv/bin:$SCCACHE_HOME:$PATH"
88+
89+
ENV PIP_CACHE_DIR=/mount/caches/pip/linux/${PIP_VERSION}

‎.github/workflows/debian_10_arm.yml

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: Debian 10 ARM
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
merge_group:
6+
push:
7+
branches:
8+
- master
9+
- 'releases/**'
10+
11+
concurrency:
12+
# github.ref is not unique in post-commit
13+
group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-debian-10-arm
14+
cancel-in-progress: true
15+
16+
permissions: read-all
17+
18+
jobs:
19+
Smart_CI:
20+
runs-on: ubuntu-latest
21+
outputs:
22+
affected_components: "${{ steps.smart_ci.outputs.affected_components }}"
23+
changed_components: "${{ steps.smart_ci.outputs.changed_components }}"
24+
skip_workflow: "${{ steps.smart_ci.outputs.skip_workflow }}"
25+
steps:
26+
- name: checkout action
27+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
28+
with:
29+
sparse-checkout: .github/actions/smart-ci
30+
31+
- name: Get affected components
32+
id: smart_ci
33+
uses: ./.github/actions/smart-ci
34+
with:
35+
repository: ${{ github.repository }}
36+
pr: ${{ github.event.number }}
37+
commit_sha: ${{ github.sha }}
38+
ref_name: ${{ github.ref_name }}
39+
component_pattern: "category: (.*)"
40+
repo_token: ${{ secrets.GITHUB_TOKEN }}
41+
skip_when_only_listed_labels_set: 'docs'
42+
skip_when_only_listed_files_changed: '*.md,*.rst,*.png,*.jpg,*.svg,*/layer_tests_summary/*,*/conformance/*'
43+
44+
- name: Show affected components
45+
run: |
46+
echo "${{ toJSON(steps.smart_ci.outputs.affected_components) }}"
47+
shell: bash
48+
49+
Docker:
50+
needs: Smart_CI
51+
runs-on: aks-linux-16-cores-arm-docker-build
52+
container:
53+
image: openvinogithubactions.azurecr.io/docker_build:0.2
54+
volumes:
55+
- /mount:/mount
56+
outputs:
57+
images: "${{ steps.handle_docker.outputs.images }}"
58+
steps:
59+
- name: Checkout
60+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
61+
62+
- uses: ./.github/actions/handle_docker
63+
id: handle_docker
64+
with:
65+
images: |
66+
ov_build/debian_10_arm
67+
registry: 'openvinogithubactions.azurecr.io'
68+
dockerfiles_root_dir: '.github/dockerfiles'
69+
changed_components: ${{ needs.smart_ci.outputs.changed_components }}
70+
71+
Build:
72+
needs: [Docker, Smart_CI]
73+
if: "!needs.smart_ci.outputs.skip_workflow"
74+
uses: ./.github/workflows/job_build_linux.yml
75+
with:
76+
runner: 'aks-linux-16-cores-arm'
77+
container: '{"image": "${{ fromJSON(needs.docker.outputs.images).ov_build.debian_10_arm }}", "volumes": ["/mount:/mount"], "options": "-e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING"}'
78+
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
79+
event-name: ${{ github.event_name }}
80+
os: 'debian_10'
81+
arch: 'arm'
82+
build-js: false
83+
build-debian-packages: false
84+
build-contrib: false
85+
cmake-options: |-
86+
-DCMAKE_TOOLCHAIN_FILE=${OPENVINO_REPO}/cmake/arm.toolchain.cmake \
87+
-DTHREADS_PTHREAD_ARG="-pthread" \
88+
-DCMAKE_COMPILE_WARNING_AS_ERROR=OFF \
89+
-DCMAKE_BUILD_TYPE=Release \
90+
-DENABLE_STRICT_DEPENDENCIES=OFF \
91+
-DENABLE_CPPLINT=OFF \
92+
-DENABLE_NCC_STYLE=OFF \
93+
-DCMAKE_VERBOSE_MAKEFILE=ON \
94+
-DENABLE_CONFORMANCE_PGQL=ON \
95+
-DENABLE_LTO=ON \
96+
-DENABLE_TESTS=ON \
97+
-DENABLE_PYTHON=OFF
98+
99+
Overall_Status:
100+
name: ci/gha_overall_status_debian_10_arm
101+
needs: [Smart_CI, Build]
102+
if: ${{ always() }}
103+
runs-on: ubuntu-latest
104+
steps:
105+
- name: Check status of all jobs
106+
if: >-
107+
${{
108+
contains(needs.*.result, 'failure') ||
109+
contains(needs.*.result, 'cancelled')
110+
}}
111+
run: exit 1

‎.github/workflows/job_build_linux.yml

+32-17
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,30 @@ on:
2222
description: 'OS that is used for building in the form of "ubuntu_20_04"'
2323
type: string
2424
required: true
25+
arch:
26+
description: 'Target architecture'
27+
type: string
28+
default: 'x86_64'
29+
required: false
30+
cmake-options:
31+
description: 'A string of options passed to CMake'
32+
type: string
33+
required: true
34+
build-js:
35+
description: 'Whether to build OpenVINO JS Bindings'
36+
type: boolean
37+
required: false
38+
default: true
39+
build-debian-packages:
40+
description: 'Whether to build Debian packages'
41+
type: boolean
42+
required: false
43+
default: true
44+
build-contrib:
45+
description: 'Whether to build OpenVINO Contrib'
46+
type: boolean
47+
required: false
48+
default: true
2549

2650
permissions: read-all
2751

@@ -40,7 +64,6 @@ jobs:
4064
env:
4165
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input
4266
CMAKE_BUILD_TYPE: 'Release'
43-
CMAKE_GENERATOR: 'Ninja Multi-Config'
4467
CMAKE_CXX_COMPILER_LAUNCHER: sccache
4568
CMAKE_C_COMPILER_LAUNCHER: sccache
4669
SCCACHE_IGNORE_SERVER_IO_ERROR: 1
@@ -55,11 +78,11 @@ jobs:
5578
INSTALL_TEST_DIR: /__w/openvino/openvino/tests_install
5679
DEVELOPER_PACKAGE_DIR: /__w/openvino/openvino/developer_package_install
5780
BUILD_DIR: /__w/openvino/openvino/openvino_build
58-
SCCACHE_AZURE_KEY_PREFIX: ${{ inputs.os }}_x86_64_Release
81+
SCCACHE_AZURE_KEY_PREFIX: ${{ inputs.os }}_${{ inputs.arch }}_Release
5982
ONNX_RUNTIME_UTILS: /__w/openvino/openvino/openvino/src/frontends/onnx/tests/ci_utils/onnxruntime
6083
ARTIFACTS_SHARE: "/mount/build-artifacts"
6184
MANIFEST_PATH: '/__w/openvino/openvino/manifest.yml'
62-
PRODUCT_TYPE: public_linux_${{ inputs.os }}_release
85+
PRODUCT_TYPE: public_linux_${{ inputs.os }}_${{ inputs.arch }}_release
6386
steps:
6487
- name: Clone OpenVINO
6588
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
@@ -131,17 +154,7 @@ jobs:
131154
- name: CMake configure - OpenVINO
132155
run: |
133156
cmake \
134-
-G "${{ env.CMAKE_GENERATOR }}" \
135-
-DENABLE_CPPLINT=OFF \
136-
-DENABLE_NCC_STYLE=OFF \
137-
-DENABLE_TESTS=ON \
138-
-DENABLE_STRICT_DEPENDENCIES=OFF \
139-
-DENABLE_SYSTEM_OPENCL=ON \
140-
-DCMAKE_VERBOSE_MAKEFILE=ON \
141-
-DCPACK_GENERATOR=TGZ \
142-
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON \
143-
-DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CMAKE_CXX_COMPILER_LAUNCHER }} \
144-
-DCMAKE_C_COMPILER_LAUNCHER=${{ env.CMAKE_C_COMPILER_LAUNCHER }} \
157+
${{ inputs.cmake-options }} \
145158
-S ${OPENVINO_REPO} \
146159
-B ${BUILD_DIR}
147160
@@ -182,6 +195,7 @@ jobs:
182195
popd
183196
184197
- name: Build Debian packages
198+
if: ${{ inputs.build-debian-packages }}
185199
run: |
186200
# Ubuntu 24 does not allow using the system Python directly so
187201
# we have to use Python from the virtual environment created in Docker
@@ -199,6 +213,7 @@ jobs:
199213
cmake --build ${BUILD_DIR} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} --target package
200214
201215
- name: Cmake & Build - OpenVINO Contrib
216+
if: ${{ inputs.build-contrib }}
202217
run: |
203218
cmake \
204219
-DCUSTOM_OPERATIONS="calculate_grid;complex_mul;fft;grid_sample;sparse_conv;sparse_conv_transpose" \
@@ -208,7 +223,7 @@ jobs:
208223
cmake --build ${BUILD_DIR} --parallel --config ${{ env.CMAKE_BUILD_TYPE }}
209224
210225
- name: CMake configure, build and install - OpenVINO JS API
211-
if: ${{ fromJSON(inputs.affected-components).JS_API }}
226+
if: ${{ fromJSON(inputs.affected-components).JS_API && inputs.build-js }}
212227
run: |
213228
cmake -UTBB* -DCPACK_GENERATOR=NPM -DENABLE_SYSTEM_TBB=OFF -S ${OPENVINO_REPO} -B ${BUILD_DIR}
214229
cmake --build ${BUILD_DIR} --parallel
@@ -234,7 +249,7 @@ jobs:
234249
if-no-files-found: 'error'
235250

236251
- name: Upload openvino js package
237-
if: ${{ fromJSON(inputs.affected-components).JS_API }}
252+
if: ${{ fromJSON(inputs.affected-components).JS_API && inputs.build-js }}
238253
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
239254
with:
240255
name: openvino_js_package
@@ -250,7 +265,7 @@ jobs:
250265
if-no-files-found: 'error'
251266

252267
- name: Upload openvino debian packages
253-
if: ${{ always() }}
268+
if: ${{ inputs.build-debian-packages }}
254269
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
255270
with:
256271
name: openvino_debian_packages

‎.github/workflows/ubuntu_20.yml

+10
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,16 @@ jobs:
8585
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
8686
event-name: ${{ github.event_name }}
8787
os: 'ubuntu_20_04'
88+
cmake-options: |-
89+
-G "Ninja Multi-Config" \
90+
-DENABLE_CPPLINT=OFF \
91+
-DENABLE_NCC_STYLE=OFF \
92+
-DENABLE_TESTS=ON \
93+
-DENABLE_STRICT_DEPENDENCIES=OFF \
94+
-DENABLE_SYSTEM_OPENCL=ON \
95+
-DCMAKE_VERBOSE_MAKEFILE=ON \
96+
-DCPACK_GENERATOR=TGZ \
97+
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON
8898
8999
Debian_Packages:
90100
name: Debian Packages

‎.github/workflows/ubuntu_22.yml

+10
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,16 @@ jobs:
8787
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
8888
event-name: ${{ github.event_name }}
8989
os: 'ubuntu_22_04'
90+
cmake-options: |-
91+
-G "Ninja Multi-Config" \
92+
-DENABLE_CPPLINT=OFF \
93+
-DENABLE_NCC_STYLE=OFF \
94+
-DENABLE_TESTS=ON \
95+
-DENABLE_STRICT_DEPENDENCIES=OFF \
96+
-DENABLE_SYSTEM_OPENCL=ON \
97+
-DCMAKE_VERBOSE_MAKEFILE=ON \
98+
-DCPACK_GENERATOR=TGZ \
99+
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON
90100
91101
Debian_Packages:
92102
name: Debian Packages

‎.github/workflows/ubuntu_22_dpcpp.yml

+13
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,19 @@ jobs:
7474
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
7575
event-name: ${{ github.event_name }}
7676
os: 'ubuntu_22_04_dpcpp'
77+
build-js: false
78+
build-debian-packages: false
79+
build-contrib: false
80+
cmake-options: |-
81+
-G "Ninja Multi-Config" \
82+
-DENABLE_CPPLINT=OFF \
83+
-DENABLE_NCC_STYLE=OFF \
84+
-DENABLE_TESTS=ON \
85+
-DENABLE_STRICT_DEPENDENCIES=OFF \
86+
-DENABLE_SYSTEM_OPENCL=ON \
87+
-DCMAKE_VERBOSE_MAKEFILE=ON \
88+
-DCPACK_GENERATOR=TGZ \
89+
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON
7790
7891
Overall_Status:
7992
name: ci/gha_overall_status_ubuntu_22.04_dpcpp

‎.github/workflows/ubuntu_24.yml

+10
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,16 @@ jobs:
8383
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
8484
event-name: ${{ github.event_name }}
8585
os: 'ubuntu_24_04'
86+
cmake-options: |-
87+
-G "Ninja Multi-Config" \
88+
-DENABLE_CPPLINT=OFF \
89+
-DENABLE_NCC_STYLE=OFF \
90+
-DENABLE_TESTS=ON \
91+
-DENABLE_STRICT_DEPENDENCIES=OFF \
92+
-DENABLE_SYSTEM_OPENCL=ON \
93+
-DCMAKE_VERBOSE_MAKEFILE=ON \
94+
-DCPACK_GENERATOR=TGZ \
95+
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON
8696
8797
Debian_Packages:
8898
name: Debian Packages

0 commit comments

Comments
 (0)
Please sign in to comment.