-
Notifications
You must be signed in to change notification settings - Fork 144
53 lines (45 loc) · 2.34 KB
/
linux-cpu-arm64-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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.17.0"
ort_zip: "onnxruntime-linux-aarch64-1.17.0.tgz"
ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v1.17.0/onnxruntime-linux-aarch64-1.17.0.tgz"
jobs:
job:
runs-on: [ "self-hosted", "1ES.Pool=onnxruntime-genai-Ubuntu2004-ARM-CPU" ]
steps:
- name: Checkout OnnxRuntime GenAI repo
uses: actions/checkout@v2
- 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: Git Submodule Update
run: |
git submodule update --init --recursive
- name: Build with CMake and GCC
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 onnxruntimecpubuild
docker run --rm --volume $GITHUB_WORKSPACE:/onnxruntime_src -w /onnxruntime_src onnxruntimecpubuild bash -c "echo $PATH && /usr/bin/cmake --preset linux_gcc_cpu_release && /usr/bin/cmake --build --preset linux_gcc_cpu_release"
# TODO: Re-enable these tests when python version is updated
# - name: Install the onnxruntime-genai Python wheel and run Python tests
# run: |
# echo "Installing the onnxruntime-genai Python wheel and running the Python tests"
# docker run \
# --rm \
# --volume $GITHUB_WORKSPACE:/onnxruntime_src \
# -w /onnxruntime_src onnxruntimecpubuild bash -c "python3 -m pip install /onnxruntime_src/build/gcc_cpu/release/wheel/onnxruntime_genai*.whl && python3 -m pip install -r test/python/requirements.txt && python3 test/python/test_onnxruntime_genai.py --cwd test/python --test_models test/test_models"