-
Notifications
You must be signed in to change notification settings - Fork 144
76 lines (61 loc) · 2.3 KB
/
linux-cpu-x64-nightly-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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: "Linux CPU x64 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.17.1"
ort_zip: "onnxruntime-linux-x64-1.17.1.tgz"
ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v1.17.1/onnxruntime-linux-x64-1.17.1.tgz"
jobs:
job:
runs-on: [ "self-hosted", "1ES.Pool=onnxruntime-genai-Ubuntu2204-AMD-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 clang
run: |
set -e -x
rm -rf build
cmake --preset linux_clang_cpu_release
cmake --build --preset linux_clang_cpu_release
- name: Install the python wheel and test dependencies
run: |
python3 -m pip install build/clang_cpu/release/wheel/onnxruntime_genai*.whl
python3 -m pip install -r test/python/requirements-nightly-cpu.txt --user
- name: Get HuggingFace Token
run: |
az login --identity --username 63b63039-6328-442f-954b-5a64d124e5b4
HF_TOKEN=$(az keyvault secret show --vault-name anubissvcsecret --name ANUBIS-HUGGINGFACE-TOKEN --query value)
echo "::add-mask::$HF_TOKEN"
echo "HF_TOKEN=$HF_TOKEN" >> $GITHUB_ENV
- name: Run the python tests
run: |
python3 test/python/test_onnxruntime_genai.py --cwd test/python --test_models test/test_models --e2e
- name: Verify Build Artifacts
if: always()
run: |
ls -l ${{ github.workspace }}/build
- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
with:
name: onnxruntime-genai-linux-cpu-x64
path: ${{ github.workspace }}/build/**/*.a