Using vcpkg #164
This file contains 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: "Linux CPU ARM64 Build" | |
on: [ workflow_dispatch, pull_request ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
env: | |
ort_dir: "onnxruntime-linux-aarch64-1.16.3" | |
ort_zip: "onnxruntime-linux-aarch64-1.16.3.tgz" | |
ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v1.16.3/onnxruntime-linux-aarch64-1.16.3.tgz" | |
VCPKG_FORCE_SYSTEM_BINARIES: "1" | |
docker_image: "onnxruntimecpubuild" | |
jobs: | |
job: | |
runs-on: [ "self-hosted", "1ES.Pool=onnxruntime-genai-Ubuntu2004-ARM-CPU" ] | |
steps: | |
- name: Checkout OnnxRuntime GenAI repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: lukka/get-cmake@latest | |
- uses: lukka/run-vcpkg@v11 | |
with: | |
vcpkgDirectory: ${{ github.workspace }}/extern/vcpkg | |
runVcpkgInstall: true | |
- name: Download OnnxRuntime | |
run: | | |
curl -L -o ${{ env.ort_zip }} ${{ env.ort_url }} | |
- name: Unzip OnnxRuntime | |
run: | | |
tar -xzf ${{ env.ort_zip }} | |
rm ${{ env.ort_zip }} | |
- name: Rename OnnxRuntime to ort | |
run: | | |
mv ${{ env.ort_dir }} ort | |
- name: Download Docker Image | |
run: | | |
set -e -x | |
python3 tools/ci_build/get_docker_image.py --dockerfile tools/ci_build/github/linux/docker/inference/aarch64/default/cpu/Dockerfile \ | |
--context tools/ci_build/github/linux/docker/inference/aarch64/default/cpu \ | |
--docker-build-args "--build-arg BUILD_UID=$( id -u )" \ | |
--container-registry onnxruntimebuildcache \ | |
--repository ${{ env.docker_image }} | |
- name: Print Docker Image Environment Variables | |
run: | | |
echo "Printing docker image environment variables" | |
docker run --rm ${{ env.docker_image }} env | |
- name: Docker -- Build with CMake and GCC | |
run: | | |
echo "Running docker image ${{ env.docker_image }}" | |
docker run \ | |
--rm \ | |
--volume $GITHUB_WORKSPACE:/onnxruntime_src \ | |
--volume $RUNNER_TEMP:/build \ | |
-w /build ${{ env.docker_image }} bash -c "/usr/bin/cmake -G Ninja /onnxruntime_src -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release && ninja" | |
# /onnxruntime_src/extern/vcpkg/bootstrap-vcpkg.sh && | |