Skip to content

Commit

Permalink
[CI] [GHA] Introduce Fedora 29 (openvinotoolkit#26336)
Browse files Browse the repository at this point in the history
### Tickets:
 - *148720*
  • Loading branch information
akashchi authored Sep 11, 2024
1 parent 20ef40d commit 79a75a6
Show file tree
Hide file tree
Showing 14 changed files with 163 additions and 177 deletions.
2 changes: 1 addition & 1 deletion .github/dockerfiles/docker_tag
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pr-26448
pr-26336
69 changes: 69 additions & 0 deletions .github/dockerfiles/ov_build/fedora_29/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
ARG REGISTRY="docker.io"
FROM ${REGISTRY}/library/fedora:29

USER root

RUN yum update -y && yum install -y \
git \
curl \
python3 \
# To build Python from source
openssl-devel \
sqlite-devel \
bzip2-devel \
libffi-devel \
zlib-devel \
wget \
make \
tar \
gcc \
gcc-c++ \
xz

# Install build dependencies
ADD install_build_dependencies.sh /install_build_dependencies.sh
RUN chmod +x /install_build_dependencies.sh && \
/install_build_dependencies.sh && \
rm -rf /var/lib/apt/lists/*

# Setup Python
RUN cd /usr/src && \
wget https://www.python.org/ftp/python/3.8.9/Python-3.8.9.tar.xz && \
tar xvf Python-3.8.9.tar.xz
RUN cd /usr/src/Python-3.8.9 && \
./configure --enable-optimizations --enable-loadable-sqlite-extensions --prefix=/usr && \
make altinstall

# Install sscache
ARG SCCACHE_VERSION="v0.7.5"
ENV SCCACHE_HOME="/opt/sccache" \
SCCACHE_PATH="/opt/sccache/sccache"

RUN mkdir ${SCCACHE_HOME} && cd ${SCCACHE_HOME} && \
SCCACHE_ARCHIVE="sccache-${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz" && \
curl -SLO https://github.com/mozilla/sccache/releases/download/${SCCACHE_VERSION}/${SCCACHE_ARCHIVE} && \
tar -xzf ${SCCACHE_ARCHIVE} --strip-components=1 && rm ${SCCACHE_ARCHIVE}

ENV PATH="$SCCACHE_HOME:$PATH"

# Use Python 3.8 as default
RUN python3.8 -m venv venv
ENV PATH="/venv/bin:$PATH"
RUN alternatives --install /usr/bin/python python /usr/bin/python3.8 10

# Setup pip
ENV PIP_VERSION="24.0"
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python3.8 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
rm -f get-pip.py

ENV PIP_CACHE_DIR=/mount/caches/pip/linux/${PIP_VERSION}

# Install Node
ENV NODE_VERSION=21.7.3
ENV NVM_DIR=/.nvm
RUN mkdir -p $NVM_DIR
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
ENV PATH="$NVM_DIR/versions/node/v${NODE_VERSION}/bin/:${PATH}"

24 changes: 0 additions & 24 deletions .github/dockerfiles/ov_build/fedora_33/Dockerfile

This file was deleted.

18 changes: 18 additions & 0 deletions .github/dockerfiles/ov_test/fedora_32/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
ARG REGISTRY="docker.io"
FROM ${REGISTRY}/library/fedora:32

USER root

RUN yum update -y && yum install -y \
git \
curl \
python3

# Install Node
ENV NODE_VERSION=21.7.3
ENV NVM_DIR=/.nvm
RUN mkdir -p $NVM_DIR
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
ENV PATH="$NVM_DIR/versions/node/v${NODE_VERSION}/bin/:${PATH}"

1 change: 1 addition & 0 deletions .github/workflows/debian_10_arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ jobs:
build-js: false
build-debian-packages: false
build-contrib: false
build-rpm-packages: false
cmake-options: |-
-DCMAKE_TOOLCHAIN_FILE=${OPENVINO_REPO}/cmake/arm.toolchain.cmake \
-DTHREADS_PTHREAD_ARG="-pthread" \
Expand Down
176 changes: 30 additions & 146 deletions .github/workflows/fedora.yml → .github/workflows/fedora_29.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Fedora (RHEL), Python 3.9
name: Fedora 29 (RHEL 8.4), Python 3.8
on:
workflow_dispatch:
pull_request:
Expand All @@ -10,7 +10,7 @@ on:

concurrency:
# github.ref is not unique in post-commit
group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-fedora33
group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-fedora-29
cancel-in-progress: true

permissions: read-all
Expand Down Expand Up @@ -63,162 +63,37 @@ jobs:
id: handle_docker
with:
images: |
ov_build/fedora_33
ov_build/fedora_29
ov_test/fedora_32
registry: 'openvinogithubactions.azurecr.io'
dockerfiles_root_dir: '.github/dockerfiles'
changed_components: ${{ needs.smart_ci.outputs.changed_components }}

Build:
needs: [Docker, Smart_CI]
timeout-minutes: 150
defaults:
run:
shell: bash
runs-on: aks-linux-16-cores-32gb
container:
image: ${{ fromJSON(needs.docker.outputs.images).ov_build.fedora_33 }}
volumes:
- /mount:/mount
options: -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING
env:
CMAKE_BUILD_TYPE: 'Release'
CMAKE_GENERATOR: 'Ninja'
CMAKE_CXX_COMPILER_LAUNCHER: sccache
CMAKE_C_COMPILER_LAUNCHER: sccache
SCCACHE_IGNORE_SERVER_IO_ERROR: 1
SCCACHE_SERVER_PORT: 35555
SCCACHE_ERROR_LOG: /__w/openvino/sccache_log.txt
SCCACHE_LOG: warn
GITHUB_WORKSPACE: '/__w/openvino/openvino'
OPENVINO_REPO: /__w/openvino/openvino/openvino
INSTALL_DIR: /__w/openvino/openvino/openvino_install
INSTALL_TEST_DIR: /__w/openvino/openvino/tests_install
BUILD_DIR: /__w/openvino/openvino/openvino_build
SCCACHE_AZURE_KEY_PREFIX: fedora33_x86_64_Release
if: "!needs.smart_ci.outputs.skip_workflow"
steps:
- name: Clone OpenVINO
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
path: ${{ env.OPENVINO_REPO }}
submodules: 'true'

#
# Print system info
#

- name: System info
uses: ./openvino/.github/actions/system_info

#
# Dependencies
#

- name: Install python dependencies
run: |
python3 -m pip install -U pip
# For Python API: build and wheel packaging
python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/wheel/requirements-dev.txt
# For running ONNX frontend unit tests
python3 -m pip install --force-reinstall -r ${OPENVINO_REPO}/src/frontends/onnx/tests/requirements.txt
# For running TensorFlow frontend unit tests
python3 -m pip install -r ${OPENVINO_REPO}/src/frontends/tensorflow/tests/requirements.txt
# For running TensorFlow Lite frontend unit tests
python3 -m pip install -r ${OPENVINO_REPO}/src/frontends/tensorflow_lite/tests/requirements.txt
# For running Paddle frontend unit tests
python3 -m pip install -r ${OPENVINO_REPO}/src/frontends/paddle/tests/requirements.txt
#
# Build
#

- name: CMake configure - OpenVINO
run: |
cmake \
-G "${{ env.CMAKE_GENERATOR }}" \
uses: ./.github/workflows/job_build_linux.yml
with:
runner: 'aks-linux-16-cores-32gb'
container: '{"image": "${{ fromJSON(needs.docker.outputs.images).ov_build.fedora_29 }}", "volumes": ["/mount:/mount"], "options": "-e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING"}'
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
event-name: ${{ github.event_name }}
os: 'fedora_29'
build-contrib: false
build-debian-packages: false
build-js: false
build-rpm-packages: true
cmake-options: |-
-G "Ninja" \
-DENABLE_CPPLINT=OFF \
-DENABLE_NCC_STYLE=OFF \
-DENABLE_INTEL_NPU=OFF \
-DENABLE_TESTS=ON \
-DENABLE_STRICT_DEPENDENCIES=OFF \
-DENABLE_SYSTEM_OPENCL=ON \
-DENABLE_PYTHON_PACKAGING=ON \
-DCPACK_GENERATOR=TGZ \
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON \
-DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} \
-DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CMAKE_CXX_COMPILER_LAUNCHER }} \
-DCMAKE_C_COMPILER_LAUNCHER=${{ env.CMAKE_C_COMPILER_LAUNCHER }} \
-S ${OPENVINO_REPO} \
-B ${BUILD_DIR}
- name: Cmake build - OpenVINO
run: cmake --build ${BUILD_DIR} --parallel --verbose

- name: Show sccache stats
run: ${SCCACHE_PATH} --show-stats

- name: Cmake install - OpenVINO
run: |
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -P ${BUILD_DIR}/cmake_install.cmake
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_TEST_DIR} -DCOMPONENT=tests -P ${BUILD_DIR}/cmake_install.cmake
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DCOMPONENT=python_wheels -P ${BUILD_DIR}/cmake_install.cmake
- name: Pack Artifacts
run: |
pushd ${INSTALL_DIR}
tar -czvf ${BUILD_DIR}/openvino_package.tar.gz *
popd
pushd ${INSTALL_TEST_DIR}
tar -czvf ${BUILD_DIR}/openvino_tests.tar.gz *
popd
- name: Build RPM packages
run: |
cmake -UTBB* \
-DCPACK_GENERATOR=RPM \
-DENABLE_SYSTEM_TBB=ON \
-DENABLE_TESTS=OFF \
${BUILD_DIR}
cmake --build ${BUILD_DIR} --parallel --target package --verbose
#
# Upload build artifacts and logs
#
- name: Upload build logs
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
if: always()
with:
name: build_logs
path: ${{ env.SCCACHE_ERROR_LOG }}
if-no-files-found: 'ignore'

- name: Upload openvino package
if: ${{ always() }}
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: openvino_package
path: ${{ env.BUILD_DIR }}/openvino_package.tar.gz
if-no-files-found: 'error'

- name: Upload openvino RPM packages
if: ${{ always() }}
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: openvino_rpm_packages
path: ${{ env.BUILD_DIR }}/*.rpm
if-no-files-found: 'error'

- name: Upload openvino tests package
if: ${{ always() }}
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: openvino_tests
path: ${{ env.BUILD_DIR }}/openvino_tests.tar.gz
if-no-files-found: 'error'
-DCMAKE_BUILD_TYPE=Release
RPM_Packages:
name: RPM packages
Expand All @@ -229,7 +104,7 @@ jobs:
shell: bash
runs-on: aks-linux-4-cores-16gb
container:
image: ${{ fromJSON(needs.docker.outputs.images).ov_build.fedora_33 }}
image: ${{ fromJSON(needs.docker.outputs.images).ov_test.fedora_32 }}
env:
RPM_PACKAGES_DIR: /__w/openvino/packages/

Expand Down Expand Up @@ -277,9 +152,18 @@ jobs:
opt_in_out --help
ovc --help
CXX_Unit_Tests:
name: C++ unit tests
needs: [ Docker, Build, Smart_CI ]
uses: ./.github/workflows/job_cxx_unit_tests.yml
with:
runner: 'aks-linux-4-cores-16gb'
image: ${{ fromJSON(needs.docker.outputs.images).ov_build.fedora_29 }}
affected-components: ${{ needs.smart_ci.outputs.affected_components }}

Overall_Status:
name: ci/gha_overall_status_fedora
needs: [Smart_CI, Build, RPM_Packages]
needs: [Smart_CI, Build, CXX_Unit_Tests, RPM_Packages]
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
Expand Down
Loading

0 comments on commit 79a75a6

Please sign in to comment.