|
| 1 | +name: genai_package |
| 2 | +on: pull_request |
| 3 | +concurrency: |
| 4 | + group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} |
| 5 | + cancel-in-progress: true |
| 6 | +jobs: |
| 7 | + ubuntu_genai_package: |
| 8 | + strategy: |
| 9 | + matrix: |
| 10 | + build-type: [Release, Debug] |
| 11 | + runs-on: ubuntu-20.04 |
| 12 | + env: |
| 13 | + CMAKE_BUILD_PARALLEL_LEVEL: null |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v4 |
| 16 | + with: |
| 17 | + submodules: recursive |
| 18 | + - uses: actions/setup-python@v4 |
| 19 | + with: |
| 20 | + python-version: 3.8 |
| 21 | + - run: mkdir ./ov/ |
| 22 | + - run: curl https://storage.openvinotoolkit.org/repositories/openvino/packages/pre-release/2024.2.0rc1/linux/l_openvino_toolkit_ubuntu20_2024.2.0.dev20240524_x86_64.tgz | tar --directory ./ov/ --strip-components 1 -xz |
| 23 | + - run: sudo ./ov/install_dependencies/install_openvino_dependencies.sh |
| 24 | + - run: source ./ov/setupvars.sh && cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -S ./ -B ./build/ |
| 25 | + - run: source ./ov/setupvars.sh && cmake --build ./build/ --config ${{ matrix.build-type }} --target package -j |
| 26 | + - run: source ./ov/setupvars.sh && cmake --install ./build/ --config ${{ matrix.build-type }} --prefix ov |
| 27 | + - run: ov/samples/cpp/build_samples.sh -i ${{ github.workspace }}/s\ pace |
| 28 | + if: ${{ 'Release' == matrix.build-type }} # build_samples enforces Release build |
| 29 | + - 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 |
| 30 | + if: ${{ 'Release' != matrix.build-type }} |
| 31 | + - run: source ./ov/setupvars.sh && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release |
| 32 | + - run: source ./ov/setupvars.sh && python -m pip install --upgrade-strategy eager -r ./samples/cpp/requirements.txt |
| 33 | + - run: source ./ov/setupvars.sh && optimum-cli export openvino --trust-remote-code --weight-format fp16 --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 TinyLlama-1.1B-Chat-v1.0 |
| 34 | + - run: source ./ov/setupvars.sh && timeout 50s ${{ github.workspace }}/s\ pace/samples_bin/greedy_causal_lm ./TinyLlama-1.1B-Chat-v1.0/ "" |
| 35 | + |
| 36 | + macos_genai_package: |
| 37 | + strategy: |
| 38 | + matrix: |
| 39 | + build-type: [Release, Debug] |
| 40 | + runs-on: macos-12 |
| 41 | + steps: |
| 42 | + - uses: actions/checkout@v4 |
| 43 | + with: |
| 44 | + submodules: recursive |
| 45 | + - uses: actions/setup-python@v4 |
| 46 | + with: |
| 47 | + python-version: 3.8 |
| 48 | + - run: mkdir ./ov/ |
| 49 | + - 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 |
| 50 | + - run: brew install coreutils scons |
| 51 | + - run: source ./ov/setupvars.sh && cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -S ./ -B ./build/ |
| 52 | + - run: source ./ov/setupvars.sh && cmake --build ./build/ --config ${{ matrix.build-type }} --target package -j |
| 53 | + - run: source ./ov/setupvars.sh && cmake --install ./build/ --config ${{ matrix.build-type }} --prefix ov |
| 54 | + - run: ov/samples/cpp/build_samples.sh -i ${{ github.workspace }}/s\ pace |
| 55 | + if: ${{ 'Release' == matrix.build-type }} # build_samples enforces Release build |
| 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 | + if: ${{ 'Release' == matrix.build-type }} |
| 58 | + - run: source ./ov/setupvars.sh && python -m pip install --upgrade-strategy eager -r ./samples/cpp/requirements.txt |
| 59 | + if: ${{ 'Release' == matrix.build-type }} |
| 60 | + - run: source ./ov/setupvars.sh && optimum-cli export openvino --trust-remote-code --weight-format fp16 --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 TinyLlama-1.1B-Chat-v1.0 |
| 61 | + if: ${{ 'Release' == matrix.build-type }} |
| 62 | + - run: source ./ov/setupvars.sh && timeout 50s ${{ github.workspace }}/s\ pace/samples_bin/greedy_causal_lm ./TinyLlama-1.1B-Chat-v1.0/ "" |
| 63 | + if: ${{ 'Release' == matrix.build-type }} |
| 64 | + |
| 65 | + windows_genai_package: |
| 66 | + strategy: |
| 67 | + matrix: |
| 68 | + build-type: [Release, Debug] |
| 69 | + runs-on: windows-latest |
| 70 | + env: |
| 71 | + CMAKE_BUILD_PARALLEL_LEVEL: null |
| 72 | + defaults: |
| 73 | + run: |
| 74 | + shell: cmd |
| 75 | + steps: |
| 76 | + - uses: actions/checkout@v4 |
| 77 | + with: |
| 78 | + submodules: recursive |
| 79 | + - uses: actions/setup-python@v4 |
| 80 | + with: |
| 81 | + python-version: 3.8 |
| 82 | + - run: curl --output ov.zip https://storage.openvinotoolkit.org/repositories/openvino/packages/pre-release/2024.2.0rc1/windows/w_openvino_toolkit_windows_2024.2.0.dev20240524_x86_64.zip |
| 83 | + - run: unzip ov.zip |
| 84 | + # Shorten the next setupvars calls. |
| 85 | + - run: mklink /D ov w_openvino_toolkit_windows_2024.2.0.dev20240524_x86_64 |
| 86 | + - run: call ov\setupvars.bat && cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -S ./ -B ./build/ |
| 87 | + - run: call ov\setupvars.bat && cmake --build ./build/ --config ${{ matrix.build-type }} --target package -j |
| 88 | + - run: call ov\setupvars.bat && cmake --install ./build/ --config ${{ matrix.build-type }} --prefix ov |
| 89 | + - run: call ov\samples\cpp\build_samples_msvc.bat -i "${{ github.workspace }}/samples_install" |
| 90 | + if: ${{ false && 'Release' == matrix.build-type }} # build_samples enforces Release build |
| 91 | + - run: call ov\setupvars.bat && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release |
| 92 | + if: ${{ false && 'Release' == matrix.build-type }} |
| 93 | + - run: call ov\setupvars.bat && python -m pip install --upgrade-strategy eager -r ./samples/cpp/requirements.txt |
| 94 | + if: ${{ false && 'Release' == matrix.build-type }} |
| 95 | + - 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 |
| 96 | + if: ${{ false && 'Release' == matrix.build-type }} |
| 97 | + - run: call ov\setupvars.bat && "${{ github.workspace }}/samples_install/samples_bin/greedy_causal_lm" .\TinyLlama-1.1B-Chat-v1.0\ "" |
| 98 | + if: ${{ false && 'Release' == matrix.build-type }} |
0 commit comments