Nightly Build #646
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Nightly Build" | |
| # Run at 5:00 AM UTC every day | |
| # 9:00 PM PST | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 5 * * *" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| env: | |
| ort_dir: "onnxruntime-linux-x64-1.18.0" | |
| ort_zip: "onnxruntime-linux-x64-1.18.0.tgz" | |
| ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v1.18.0/onnxruntime-linux-x64-1.18.0.tgz" | |
| jobs: | |
| job: | |
| runs-on: ["self-hosted", "1ES.Pool=onnxruntime-genai-Ubuntu2204-AMD-CPU"] | |
| steps: | |
| - name: Checkout OnnxRuntime GenAI repo | |
| uses: actions/checkout@v5 | |
| - uses: microsoft/onnxruntime-github-actions/[email protected] | |
| with: | |
| vcpkg-version: '2025.03.19' | |
| vcpkg-hash: '17e96169cd3f266c4716fcdc1bb728e6a64f103941ece463a2834d50694eba4fb48f30135503fd466402afa139abc847ef630733c442595d1c34979f261b0114' | |
| cmake-version: '3.31.6' | |
| cmake-hash: '42395e20b10a8e9ef3e33014f9a4eed08d46ab952e02d2c1bbc8f6133eca0d7719fb75680f9bbff6552f20fcd1b73d86860f7f39388d631f98fb6f622b37cf04' | |
| add-cmake-to-path: 'true' | |
| disable-terrapin: 'true' | |
| - name: Install Rust with rustup | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| source "$HOME/.cargo/env" | |
| rustup install 1.86.0 | |
| rustup override set 1.86.0 | |
| rustup component add rust-src | |
| rustup show active-toolchain | |
| - name: Git Submodule Update | |
| run: | | |
| git submodule update --init --recursive | |
| - name: Build with CMake and clang | |
| run: | | |
| set -e -x | |
| rm -rf build | |
| cmake --preset linux_gcc_cpu_release | |
| cmake --build --preset linux_gcc_cpu_release | |
| cmake --build --preset linux_gcc_cpu_release --target PyPackageBuild | |
| - name: Install the python wheel and test dependencies | |
| run: | | |
| python3 -m pip install -r test/python/requirements.txt --user | |
| python3 -m pip install -r test/python/cpu/torch/requirements.txt --user | |
| python3 -m pip install -r test/python/cpu/ort/requirements.txt --user | |
| python3 -m pip install build/cpu/wheel/onnxruntime_genai*.whl --no-deps | |
| - name: Run the python tests | |
| run: | | |
| python3 test/python/test_onnxruntime_genai.py --cwd test/python --test_models test/test_models --e2e | |
| - name: Run Q&A Example | |
| run: | | |
| python3 -m onnxruntime_genai.models.builder -i /data/ortgenai/pytorch/qwen2.5-0.5b-instruct -e cpu -p int4 -o ./example-models/qwen2.5-0.5b-instruct | |
| python3 examples/python/model-qa.py -m ./example-models/qwen2.5-0.5b-instruct -e cpu --input_prompt "what is 10+4?" > output.log 2>&1 | |
| if cat output.log | grep -Eq "14|fourteen"; then | |
| echo "Result seems correct" | |
| else | |
| echo "Result seems incorrect!" | |
| exit 1 | |
| fi | |
| - name: Verify Build Artifacts | |
| if: always() | |
| run: | | |
| ls -l ${{ github.workspace }}/build | |
| - name: Upload Build Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: onnxruntime-genai-linux-cpu-x64 | |
| path: ${{ github.workspace }}/build/**/*.a |