Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] [GHA] Transfer Mac workflow from Azure to GHA #912

Merged
merged 40 commits into from
May 23, 2024
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
276ddc8
transfer linux workflow
akashchi Apr 15, 2024
9fb3bd6
provide ref
akashchi Apr 15, 2024
1b56f83
install git-lfs
akashchi Apr 15, 2024
f62d347
install unzip
akashchi Apr 15, 2024
b4de031
correct path for log
akashchi Apr 15, 2024
eceb039
upload test results
akashchi Apr 15, 2024
715be12
use gha runner
akashchi Apr 17, 2024
f46dfb8
rm sudo
akashchi Apr 17, 2024
f64b8ae
skip test
akashchi Apr 19, 2024
5799a96
rm unused env vars from linux; add win workflow
akashchi Apr 22, 2024
0ee1669
configure msvc
akashchi Apr 22, 2024
1ac87a3
add build of ov_contrib
akashchi Apr 22, 2024
838d87a
use setupvars
akashchi Apr 22, 2024
371de19
use quotes
akashchi Apr 22, 2024
ee7a6fa
use ov repo
akashchi Apr 22, 2024
52883c3
use cmd
akashchi Apr 22, 2024
f04b96e
call cmd setupvars
akashchi Apr 23, 2024
c2e081d
add nvidia job
akashchi Apr 24, 2024
e293f8d
add generator
akashchi Apr 24, 2024
61cb075
do not use dev package
akashchi Apr 24, 2024
8f635dc
add missing ref
akashchi Apr 24, 2024
2aac984
allow downgrades
akashchi Apr 24, 2024
208fba1
allow change
akashchi Apr 24, 2024
bb7a738
add dev package
akashchi Apr 25, 2024
dc55ff9
enable system
akashchi Apr 25, 2024
4d28ac1
use from fork
akashchi Apr 25, 2024
c79b8ca
rm system
akashchi Apr 25, 2024
7316b6d
use hash
akashchi Apr 25, 2024
ebe6d32
update hash
akashchi Apr 25, 2024
e6ab978
enable tests
akashchi Apr 25, 2024
689d68a
build dev targets, do not build tests
akashchi Apr 26, 2024
1a41376
enable tests
akashchi Apr 26, 2024
5eb5437
use master
akashchi Apr 29, 2024
d8a244b
add mac
akashchi Apr 29, 2024
84ac221
install gradle via brew
akashchi Apr 29, 2024
3a6e613
upload test results
akashchi Apr 29, 2024
6ad2f19
merge
akashchi May 23, 2024
760a12b
use actions/cache
akashchi May 23, 2024
ee4858c
unskip
akashchi May 23, 2024
fbb68ed
new line
akashchi May 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 149 additions & 0 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
name: macOS (Python 3.11)
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
- 'releases/**'

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

env:
PYTHON_VERSION: '3.11'

jobs:
Build_and_test:
name: Build and Test
timeout-minutes: 150
defaults:
run:
shell: bash
runs-on: 'macos-13-large'
env:
CMAKE_BUILD_TYPE: 'Release'
MACOSX_DEPLOYMENT_TARGET: '11.0'
OSX_ARCHITECTURES: 'x86_64'
CMAKE_CXX_COMPILER_LAUNCHER: ccache
CMAKE_C_COMPILER_LAUNCHER: ccache
OPENVINO_REPO: ${{ github.workspace }}/openvino
OPENVINO_CONTRIB_REPO: ${{ github.workspace }}/openvino_contrib
TEST_DATA: ${{ github.workspace }}/testdata
INSTALL_DIR: ${{ github.workspace }}/openvino_install
INSTALL_DIR_JS: ${{ github.workspace }}/openvino_install/js
INSTALL_TEST_DIR: ${{ github.workspace }}/tests_install
BUILD_DIR: ${{ github.workspace }}/build
CCACHE_DIR: ${{ github.workspace }}/ccache
CCACHE_MAXSIZE: '2G'
GRADLE_VER: '7.1.1'
steps:
- name: Clone OpenVINO
uses: actions/checkout@v4
with:
repository: 'openvinotoolkit/openvino'
path: 'openvino'
submodules: 'true'
ref: 'master'

- name: Clone OpenVINO Contrib
uses: actions/checkout@v4
with:
path: 'openvino_contrib'

- name: Clone Testdata
uses: actions/checkout@v4
with:
repository: 'openvinotoolkit/testdata'
path: 'testdata'
lfs: 'true'
submodules: 'true'

#
# Dependencies
#

- name: Install build dependencies
run: brew install coreutils ninja scons automake gradle ccache

- name: Setup Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install python dependencies
run: python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt

#
# Build
#

- name: Setup ccache
uses: actions/cache@v4
with:
# Should save cache only if run in the master branch of the base repo
# github.ref_name is 'ref/PR_#' in case of the PR, and 'branch_name' when executed on push
save-always: ${{ github.ref_name == 'master' && 'true' || 'false' }}
path: ${{ env.CCACHE_DIR }}
key: ${{ runner.os }}-${{ runner.arch }}-ccache-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-ccache

- name: CMake configure
run: |
cmake \
-GNinja \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} \
-DBUILD_nvidia_plugin=OFF \
-DOPENVINO_EXTRA_MODULES=${{ env.OPENVINO_CONTRIB_REPO }}/modules \
-DCMAKE_OSX_DEPLOYMENT_TARGET=${{ env.MACOSX_DEPLOYMENT_TARGET }} \
-DCMAKE_OSX_ARCHITECTURES=${{ env.OSX_ARCHITECTURES }} \
-DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CMAKE_CXX_COMPILER_LAUNCHER }} \
-DCMAKE_C_COMPILER_LAUNCHER=${{ env.CMAKE_C_COMPILER_LAUNCHER }} \
-DENABLE_OV_PADDLE_FRONTEND=OFF \
-DENABLE_OV_TF_FRONTEND=OFF \
-DENABLE_OV_TF_LITE_FRONTEND=OFF \
-DENABLE_OV_PYTORCH_FRONTEND=OFF \
-DENABLE_CPPLINT=OFF \
-DENABLE_INTEL_NPU=OFF \
-S ${{ env.OPENVINO_REPO }} \
-B ${{ env.BUILD_DIR }}

- name: Cmake build
run: cmake --build ${{ env.BUILD_DIR }} --parallel

- name: Show ccache stats
run: ccache --show-stats

- name: Cmake install
run: cmake -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -P ${{ env.BUILD_DIR }}/cmake_install.cmake

- name: Java tests
working-directory: ${{ env.OPENVINO_CONTRIB_REPO }}/modules/java_api
run: |
. ${{ env.INSTALL_DIR }}/setupvars.sh gradle clean build --info

for d in CPU HETERO:CPU; do
gradle test -Prun_tests -DMODELS_PATH=${{ env.TEST_DATA }} -Ddevice=$d --info;
done

- name: Check wheel installation
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
python3 -m pip install -r ${{ env.OPENVINO_CONTRIB_REPO }}/modules/custom_operations/tests/requirements.txt

pushd ${{ env.INSTALL_DIR }}/tools
wheel_name=$(find . -name 'openvino-*.whl')
python3 -m pip install $wheel_name
popd

- name: Upload Test Results
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: test-results-java
path: ${{ env.OPENVINO_CONTRIB_REPO }}/modules/java_api/build/test-results
if-no-files-found: 'warn'
Loading