Skip to content

Commit 911c1d2

Browse files
authored
[CI] [GHA] Port WASM & Fedora Dockerfile and workflows to 2024/2 (#25338)
Port of #25303
1 parent d95fdd8 commit 911c1d2

File tree

5 files changed

+120
-27
lines changed

5 files changed

+120
-27
lines changed

.github/dockerfiles/docker_tag

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pr-24694
1+
pr-25338
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM openvinogithubactions.azurecr.io/dockerio/library/fedora:33
2+
3+
USER root
4+
5+
RUN yum update -y && yum install -y git
6+
7+
# Install build dependencies
8+
ADD install_build_dependencies.sh /install_build_dependencies.sh
9+
RUN chmod +x /install_build_dependencies.sh && \
10+
/install_build_dependencies.sh && \
11+
rm -rf /var/lib/apt/lists/*
12+
13+
# Install sscache
14+
ARG SCCACHE_VERSION="v0.7.5"
15+
ENV SCCACHE_HOME="/opt/sccache" \
16+
SCCACHE_PATH="/opt/sccache/sccache"
17+
18+
RUN mkdir ${SCCACHE_HOME} && cd ${SCCACHE_HOME} && \
19+
SCCACHE_ARCHIVE="sccache-${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz" && \
20+
curl -SLO https://github.com/mozilla/sccache/releases/download/${SCCACHE_VERSION}/${SCCACHE_ARCHIVE} && \
21+
tar -xzf ${SCCACHE_ARCHIVE} --strip-components=1 && rm ${SCCACHE_ARCHIVE}
22+
23+
ENV PATH="$SCCACHE_HOME:$PATH"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
FROM openvinogithubactions.azurecr.io/dockerio/emscripten/emsdk:3.1.61
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 software-properties-common && \
16+
add-apt-repository --yes --no-update ppa:git-core/ppa && \
17+
apt-get update && \
18+
apt-get install \
19+
git \
20+
ca-certificates && \
21+
rm -rf /var/lib/apt/lists/*
22+
23+
# Install sscache
24+
ARG SCCACHE_VERSION="v0.7.5"
25+
ENV SCCACHE_HOME="/opt/sccache" \
26+
SCCACHE_PATH="/opt/sccache/sccache"
27+
28+
RUN mkdir ${SCCACHE_HOME} && cd ${SCCACHE_HOME} && \
29+
SCCACHE_ARCHIVE="sccache-${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz" && \
30+
curl -SLO https://github.com/mozilla/sccache/releases/download/${SCCACHE_VERSION}/${SCCACHE_ARCHIVE} && \
31+
tar -xzf ${SCCACHE_ARCHIVE} --strip-components=1 && rm ${SCCACHE_ARCHIVE}
32+
33+
ENV PATH="$SCCACHE_HOME:$PATH"

.github/workflows/fedora.yml

+33-16
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
outputs:
2020
affected_components: "${{ steps.smart_ci.outputs.affected_components }}"
21+
changed_components: "${{ steps.smart_ci.outputs.changed_components }}"
2122
skip_workflow: "${{ steps.smart_ci.outputs.skip_workflow }}"
2223
steps:
2324
- name: checkout action
@@ -38,15 +39,42 @@ jobs:
3839
skip_when_only_listed_labels_set: 'docs'
3940
skip_when_only_listed_files_changed: '*.md,*.rst,*.png,*.jpg,*.svg,*/layer_tests_summary/*,*/conformance/*'
4041

41-
Build:
42+
- name: Show affected components
43+
run: |
44+
echo "${{ toJSON(steps.smart_ci.outputs.affected_components) }}"
45+
shell: bash
46+
47+
Docker:
4248
needs: Smart_CI
49+
runs-on: aks-linux-4-cores-16gb-docker-build
50+
container:
51+
image: openvinogithubactions.azurecr.io/docker_build:0.2
52+
volumes:
53+
- /mount:/mount
54+
outputs:
55+
images: "${{ steps.handle_docker.outputs.images }}"
56+
steps:
57+
- name: Checkout
58+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
59+
60+
- uses: ./.github/actions/handle_docker
61+
id: handle_docker
62+
with:
63+
images: |
64+
ov_build/fedora_33
65+
registry: 'openvinogithubactions.azurecr.io'
66+
dockerfiles_root_dir: '.github/dockerfiles'
67+
changed_components: ${{ needs.smart_ci.outputs.changed_components }}
68+
69+
Build:
70+
needs: [Docker, Smart_CI]
4371
timeout-minutes: 150
4472
defaults:
4573
run:
4674
shell: bash
4775
runs-on: aks-linux-16-cores-32gb
4876
container:
49-
image: fedora:33
77+
image: ${{ fromJSON(needs.docker.outputs.images).ov_build.fedora_33 }}
5078
volumes:
5179
- /mount:/mount
5280
options: -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING
@@ -67,9 +95,6 @@ jobs:
6795
SCCACHE_AZURE_KEY_PREFIX: fedora33_x86_64_Release
6896
if: "!needs.smart_ci.outputs.skip_workflow"
6997
steps:
70-
- name: Install git
71-
run: yum update -y && yum install -y git
72-
7398
- name: Clone OpenVINO
7499
uses: actions/checkout@v4
75100
with:
@@ -87,14 +112,6 @@ jobs:
87112
# Dependencies
88113
#
89114

90-
- name: Install build dependencies
91-
run: bash ${OPENVINO_REPO}/install_build_dependencies.sh
92-
93-
- name: Install sccache
94-
uses: mozilla-actions/sccache-action@v0.0.4
95-
with:
96-
version: "v0.7.5"
97-
98115
- name: Install python dependencies
99116
run: |
100117
python3 -m pip install -U pip
@@ -202,14 +219,14 @@ jobs:
202219
if-no-files-found: 'error'
203220

204221
RPM_Packages:
205-
needs: Build
222+
needs: [Docker, Build]
206223
timeout-minutes: 10
207224
defaults:
208225
run:
209226
shell: bash
210-
runs-on: ubuntu-20.04
227+
runs-on: aks-linux-4-cores-16gb
211228
container:
212-
image: fedora:33
229+
image: ${{ fromJSON(needs.docker.outputs.images).ov_build.fedora_33 }}
213230
env:
214231
RPM_PACKAGES_DIR: /__w/openvino/packages/
215232

.github/workflows/webassembly.yml

+30-10
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
outputs:
2020
affected_components: "${{ steps.smart_ci.outputs.affected_components }}"
21+
changed_components: "${{ steps.smart_ci.outputs.changed_components }}"
2122
skip_workflow: "${{ steps.smart_ci.outputs.skip_workflow }}"
2223
steps:
2324
- name: checkout action
@@ -38,14 +39,41 @@ jobs:
3839
skip_when_only_listed_labels_set: 'docs'
3940
skip_when_only_listed_files_changed: '*.md,*.rst,*.png,*.jpg,*.svg,*/layer_tests_summary/*,*/conformance/*'
4041

41-
Build:
42+
- name: Show affected components
43+
run: |
44+
echo "${{ toJSON(steps.smart_ci.outputs.affected_components) }}"
45+
shell: bash
46+
47+
Docker:
4248
needs: Smart_CI
49+
runs-on: aks-linux-4-cores-16gb-docker-build
50+
container:
51+
image: openvinogithubactions.azurecr.io/docker_build:0.2
52+
volumes:
53+
- /mount:/mount
54+
outputs:
55+
images: "${{ steps.handle_docker.outputs.images }}"
56+
steps:
57+
- name: Checkout
58+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
59+
60+
- uses: ./.github/actions/handle_docker
61+
id: handle_docker
62+
with:
63+
images: |
64+
ov_build/webassembly
65+
registry: 'openvinogithubactions.azurecr.io'
66+
dockerfiles_root_dir: '.github/dockerfiles'
67+
changed_components: ${{ needs.smart_ci.outputs.changed_components }}
68+
69+
Build:
70+
needs: [Docker, Smart_CI]
4371
defaults:
4472
run:
4573
shell: bash
4674
runs-on: aks-linux-16-cores-32gb
4775
container:
48-
image: emscripten/emsdk
76+
image: ${{ fromJSON(needs.docker.outputs.images).ov_build.webassembly }}
4977
volumes:
5078
- /mount:/mount
5179
options: -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING
@@ -60,20 +88,12 @@ jobs:
6088
SCCACHE_AZURE_KEY_PREFIX: webassembly_Release
6189
if: "!needs.smart_ci.outputs.skip_workflow"
6290
steps:
63-
- name: Install git
64-
run: apt-get update && apt-get install --assume-yes --no-install-recommends git ca-certificates
65-
6691
- name: Clone OpenVINO
6792
uses: actions/checkout@v4
6893
with:
6994
path: 'openvino'
7095
submodules: 'true'
7196

72-
- name: Install sccache
73-
uses: mozilla-actions/sccache-action@v0.0.4
74-
with:
75-
version: "v0.7.5"
76-
7797
- name: emcmake cmake - configure
7898
run: |
7999
emcmake cmake \

0 commit comments

Comments
 (0)