Skip to content

windows cache build on dev branch #369

windows cache build on dev branch

windows cache build on dev branch #369

name: windows cache build on dev branch
on:
schedule:
- cron: "0 0,7,12,20 * * *"
workflow_dispatch:
env:
VAI_RT_PREFIX: ${{ github.workspace }}/gi/
VAI_RT_WORKSPACE: ${{ github.workspace }}/src_dir
VAI_RT_BUILD_DIR: ${{ github.workspace }}/gb/
WITH_XCOMPILER: "ON"
WITH_CPURUNNER: "ON"
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
USE_CPYTHON: "OFF"
BUILD_PYTHON_EXT: "OFF"
EN_LLM_DOD_OPS: "ON"
JENKINS_CI_BUILD: "1"
GITHUB_WORKFLOW: "1"
DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER: "0"
GITHUB_ACTIONS_RUNNER_TLS_NO_VERIFY: "1"
concurrency:
group: ${{ github.head_ref }}.windows_build-dev-cache
cancel-in-progress: true
jobs:
windows-build:
runs-on: [ windows-build-machine-new ]
steps:
- name: Download vai-rt Repository
uses: actions/checkout@v3
with:
repository: VitisAI/vai-rt
ref: dev
path: vai-rt
- name: install setuptools
run: python -m pip install setuptools requests numpy==1.26.4 build ninja
- name: clear gb/src dir
shell: python
run: |
import glob
import os
import stat
import shutil
def delete(func, path, execinfo):
os.chmod(path, stat.S_IWUSR)
func(path)
joined_path = os.path.join(r"${{ github.workspace }}", 'src_dir')
if os.path.exists(joined_path) and os.path.isdir(joined_path):
shutil.rmtree(joined_path, onerror=delete)
joined_path = os.path.join(r"${{ github.workspace }}", 'gb')
if os.path.exists(joined_path) and os.path.isdir(joined_path):
shutil.rmtree(joined_path, onerror=delete)
joined_path = os.path.join(r"${{ github.workspace }}", 'gi')
if os.path.exists(joined_path) and os.path.isdir(joined_path):
shutil.rmtree(joined_path, onerror=delete)
- name: Install XRT
run: |
wget https://xcoartifactory.xilinx.com/artifactory/xrt-mcdm-prod-local/com/amd/mcdm/win24_0805/mcdm_stack_rel-run1402/xrt_package.zip -O xrt.zip
Expand-Archive -Path "xrt.zip" -DestinationPath "xrt" -Force
Remove-Item -Path ${{ github.workspace }}/gi/xrt -Force -Recurse -ErrorAction SilentlyContinue
if (-not (Test-Path -Path ${{ github.workspace }}/gi)) {
New-Item -Path ${{ github.workspace }}/gi -ItemType Directory
}
Move-Item -Path xrt/xrt_package/xrt -Destination ${{ github.workspace }}/gi/xrt -Force -ErrorAction SilentlyContinue
Remove-Item -Path xrt -Force -Recurse -ErrorAction SilentlyContinue
Write-Host "install XRT."
shell: powershell
- name: Cache dependencies
uses: actions/cache@v3
id: cache
with:
path: |
gi
gb
key: dev-${{ hashFiles('vai-rt/**/latest_dev.txt') }}
restore-keys: |
dev-
- name: build dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: python vai-rt/main.py --type release --release_file vai-rt/release_file/latest_dev.txt --exclude-project vaip test_onnx_runner testcases --clean
- name: clear vaip install path
run: Remove-Item -Path ${{ github.workspace }}/../gi/include/vaip -Recurse -ErrorAction SilentlyContinue