1
1
name : genai_package
2
2
on : pull_request
3
- permissions : read-all # Required by https://github.com/ossf/scorecard/blob/e23b8ad91fd6a64a0a971ca4fc0a4d1650725615/docs/checks.md#token-permissions
3
+ permissions : read-all # Required by https://github.com/ossf/scorecard/blob/e23b8ad91fd6a64a0a971ca4fc0a4d1650725615/docs/checks.md#token-permissions
4
4
concurrency :
5
5
group : ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
6
6
cancel-in-progress : true
7
+ env :
8
+ l_ov_link : https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/2024.4.0-16161-d253f4fd89c/l_openvino_toolkit_ubuntu20_2024.4.0.dev20240730_x86_64.tgz
9
+ m_ov_link : https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/2024.4.0-16161-d253f4fd89c/m_openvino_toolkit_macos_12_6_2024.4.0.dev20240730_x86_64.tgz
10
+ w_ov_link : https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/2024.4.0-16161-d253f4fd89c/w_openvino_toolkit_windows_2024.4.0.dev20240730_x86_64.zip
7
11
jobs :
8
12
ubuntu_genai_package :
9
13
strategy :
@@ -20,21 +24,21 @@ jobs:
20
24
with :
21
25
python-version : 3.8
22
26
- run : mkdir ./ov/
23
- - run : curl https://storage.openvinotoolkit.org/repositories/openvino/packages/pre-release/2024.2.0rc2/linux/l_openvino_toolkit_ubuntu20_2024.2.0.dev20240529_x86_64.tgz | tar --directory ./ov/ --strip-components 1 -xz
27
+ - run : curl ${{ env.l_ov_link }} | tar --directory ./ov/ --strip-components 1 -xz
24
28
- run : sudo ./ov/install_dependencies/install_openvino_dependencies.sh
25
29
- run : source ./ov/setupvars.sh && cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -S ./ -B ./build/
26
30
- run : source ./ov/setupvars.sh && cmake --build ./build/ --config ${{ matrix.build-type }} --target package -j
27
- - run : source ./ov/setupvars.sh && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release
28
- - run : source ./ov/setupvars.sh && python -m pip install --upgrade-strategy eager -r ./samples/requirements.txt --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release
31
+ - run : source ./ov/setupvars.sh && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --pre -- extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
32
+ - run : source ./ov/setupvars.sh && python -m pip install --upgrade-strategy eager -r ./samples/requirements.txt --pre -- extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
29
33
- run : source ./ov/setupvars.sh && optimum-cli export openvino --trust-remote-code --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 TinyLlama-1.1B-Chat-v1.0
30
34
- run : source ./ov/setupvars.sh && cmake --install ./build/ --config ${{ matrix.build-type }} --prefix ov
31
35
- run : ov/samples/cpp/build_samples.sh -i ${{ github.workspace }}/s\ pace
32
- if : ${{ 'Release' == matrix.build-type }} # build_samples enforces Release build
36
+ if : ${{ 'Release' == matrix.build-type }} # build_samples enforces Release build
33
37
- run : source ./ov/setupvars.sh && cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -S ./ov/samples/cpp/ -B ./samples\ build/ && cmake --build ./samples\ build/ --config ${{ matrix.build-type }} -j && cmake --install ./samples\ build/ --config ${{ matrix.build-type }} --component samples_bin --prefix s\ pace
34
38
if : ${{ 'Release' != matrix.build-type }}
35
39
- run : source ./ov/setupvars.sh && timeout 25s ${{ github.workspace }}/s\ pace/samples_bin/greedy_causal_lm ./TinyLlama-1.1B-Chat-v1.0/ ""
36
40
- run : source ./ov/setupvars.sh && timeout 25s ./ov/samples/python/multinomial_causal_lm/multinomial_causal_lm.py ./TinyLlama-1.1B-Chat-v1.0/ 0
37
- if : ${{ 'Release' == matrix.build-type }} # Python bindings can be built in Release only
41
+ if : ${{ 'Release' == matrix.build-type }} # Python bindings can be built in Release only
38
42
39
43
macos_genai_package :
40
44
strategy :
@@ -49,34 +53,34 @@ jobs:
49
53
with :
50
54
python-version : 3.8
51
55
- run : mkdir ./ov/
52
- - run : curl https://storage.openvinotoolkit.org/repositories/openvino/packages/pre-release/2024.2.0rc2/macos/m_openvino_toolkit_macos_12_6_2024.2.0.dev20240529_x86_64.tgz | tar --directory ./ov/ --strip-components 1 -xz
56
+ - run : curl ${{ env.m_ov_link }} | tar --directory ./ov/ --strip-components 1 -xz
53
57
- run : brew install coreutils scons
54
58
- run : source ./ov/setupvars.sh && cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -S ./ -B ./build/
55
59
- run : source ./ov/setupvars.sh && cmake --build ./build/ --config ${{ matrix.build-type }} --target package -j
56
- - run : source ./ov/setupvars.sh && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release
57
- - run : source ./ov/setupvars.sh && python -m pip install --upgrade-strategy eager -r ./samples/requirements.txt --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release
60
+ - run : source ./ov/setupvars.sh && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --pre -- extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
61
+ - run : source ./ov/setupvars.sh && python -m pip install --upgrade-strategy eager -r ./samples/requirements.txt --pre -- extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
58
62
- run : source ./ov/setupvars.sh && optimum-cli export openvino --trust-remote-code --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 TinyLlama-1.1B-Chat-v1.0
59
63
- run : source ./ov/setupvars.sh && cmake --install ./build/ --config ${{ matrix.build-type }} --prefix ov
60
64
- run : ov/samples/cpp/build_samples.sh -i ${{ github.workspace }}/s\ pace
61
- if : ${{ 'Release' == matrix.build-type }} # build_samples enforces Release build
65
+ if : ${{ 'Release' == matrix.build-type }} # build_samples enforces Release build
62
66
- run : >
63
67
source ./ov/setupvars.sh
64
68
&& cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -S ./ov/samples/cpp/ -B ./samples\ build/
65
69
&& cmake --build ./samples\ build/ --config ${{ matrix.build-type }} -j
66
70
&& cmake --install ./samples\ build/ --config ${{ matrix.build-type }} --component samples_bin --prefix s\ pace
67
71
if: ${{ 'Release' != matrix.build-type }}
68
- - run : source ./ov/setupvars.sh && timeout 25s ${{ github.workspace }}/s\ pace/samples_bin/greedy_causal_lm ./TinyLlama-1.1B-Chat-v1.0/ ""
72
+ - run : source ./ov/setupvars.sh && timeout 30s ${{ github.workspace }}/s\ pace/samples_bin/greedy_causal_lm ./TinyLlama-1.1B-Chat-v1.0/ ""
69
73
- run : source ./ov/setupvars.sh && timeout 25s ./ov/samples/python/multinomial_causal_lm/multinomial_causal_lm.py ./TinyLlama-1.1B-Chat-v1.0/ 0
70
- if : ${{ 'Release' == matrix.build-type }} # Python bindings can be built in Release only
74
+ if : ${{ 'Release' == matrix.build-type }} # Python bindings can be built in Release only
71
75
72
76
windows_genai_package :
73
- if : false
74
77
strategy :
75
78
matrix :
76
79
build-type : [Release, Debug]
77
80
runs-on : windows-latest
78
81
env :
79
82
CMAKE_BUILD_PARALLEL_LEVEL : null
83
+ PYTHONIOENCODING : " utf8"
80
84
defaults :
81
85
run :
82
86
shell : cmd
@@ -87,24 +91,28 @@ jobs:
87
91
- uses : actions/setup-python@v4
88
92
with :
89
93
python-version : 3.8
90
- - run : curl --output ov.zip https://storage.openvinotoolkit.org/repositories/openvino/packages/pre-release/2024.2.0rc2/windows/w_openvino_toolkit_windows_2024.2.0.dev20240529_x86_64.zip
91
- - run : unzip ov.zip
92
- # Shorten the next setupvars calls.
93
- - run : mklink /D ov w_openvino_toolkit_windows_2024.2.0.dev20240529_x86_64
94
+ - run : >
95
+ curl --output ov.zip ${{ env.w_ov_link }}
96
+ && unzip -d ov ov.zip
97
+ && dirs=(ov/*)
98
+ && mv ov/*/* ov
99
+ && rmdir "${dirs[@]}"
100
+ shell: bash
94
101
- run : call ov\setupvars.bat && cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -S ./ -B ./build/
95
102
- run : call ov\setupvars.bat && cmake --build ./build/ --config ${{ matrix.build-type }} --target package -j
96
- - run : call ov\setupvars.bat && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release
97
- - run : call ov\setupvars.bat && python -m pip install --upgrade-strategy eager -r ./samples/requirements.txt --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release
103
+ - run : call ov\setupvars.bat && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --pre -- extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
104
+ - run : call ov\setupvars.bat && python -m pip install --upgrade-strategy eager -r ./samples/requirements.txt --pre -- extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
98
105
- run : call ov\setupvars.bat && optimum-cli export openvino --trust-remote-code --weight-format fp16 --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 TinyLlama-1.1B-Chat-v1.0
99
106
- run : call ov\setupvars.bat && cmake --install ./build/ --config ${{ matrix.build-type }} --prefix ov
100
107
- run : call ov\samples\cpp\build_samples_msvc.bat -i "${{ github.workspace }}/samples_install"
101
- if : ${{ 'Release' == matrix.build-type }} # build_samples enforces Release build
108
+ if : ${{ 'Release' == matrix.build-type }} # build_samples enforces Release build
102
109
- run : >
103
110
call ov\setupvars.bat
104
111
&& cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -S ./ov/samples/cpp/ -B "samples build"
105
112
&& cmake --build "samples build" --config ${{ matrix.build-type }} -j
106
113
&& cmake --install "samples build" --config ${{ matrix.build-type }} --component samples_bin --prefix samples_install
107
114
if: ${{ 'Release' != matrix.build-type }}
108
115
- run : call ov\setupvars.bat && "${{ github.workspace }}/samples_install/samples_bin/greedy_causal_lm" .\TinyLlama-1.1B-Chat-v1.0\ ""
109
- - run : call ov\setupvars.bat && ./ov/samples/python/multinomial_causal_lm/multinomial_causal_lm.py ./TinyLlama-1.1B-Chat-v1.0/ 0
110
- if : ${{ 'Release' == matrix.build-type }} # Python bindings can be built in Release only
116
+ if : ${{ 'Release' == matrix.build-type }} # Tokenizers don't work in debug
117
+ - run : call ov\setupvars.bat && python .\ov\samples\python\multinomial_causal_lm\multinomial_causal_lm.py .\TinyLlama-1.1B-Chat-v1.0\ 0
118
+ if : ${{ 'Release' == matrix.build-type }} # Python bindings can be built in Release only
0 commit comments