-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (81 loc) · 3.31 KB
/
ci.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: CI
on:
workflow_dispatch:
pull_request:
release:
types: [published]
jobs:
build:
# We want to compile with v142
runs-on: windows-2019
strategy:
matrix:
vcpkg_triplet: [x64-windows-mt-v142, x64-windows-mixed-v142]
steps:
- uses: actions/checkout@v1
- name: Check free space
shell: bash
run: |
df -h
# Workaround for https://github.community/t5/GitHub-Actions/Windows-tests-worked-yesterday-broken-today/td-p/43574
- name: Override bash shell PATH (windows-latest)
run: echo "C:\Program Files\Git\bin" >> $GITHUB_PATH
- uses: Jimver/[email protected]
id: cuda-toolkit
with:
cuda: '11.8.0'
# We need to download cudnn from a private repo as it is not redistributable outside an organization
- uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'iit-danieli-joint-lab/idjl-private-storage'
version: 'tags/storage'
file: 'cudnn-windows-x86_64-8.9.3.28_cuda11-archive.zip'
token: ${{ secrets.IDJL_PRIVATE_STORAGE_TOKEN }}
- name: Install cudnn
shell: cmd
run: |
set
tar.exe -xvf cudnn-windows-x86_64-8.9.3.28_cuda11-archive.zip --strip 1 --directory "%CUDA_PATH%"
- name: Download custom vcpkg and additional ports
shell: bash
run: |
choco install -y wget
mkdir C:/ivdv
cd C:/ivdv
git clone https://github.com/Microsoft/vcpkg
cd vcpkg
git checkout 2023.06.20
C:/ivdv/vcpkg/bootstrap-vcpkg.sh
- name: Install vcpkg ports
shell: bash
run: |
C:/ivdv/vcpkg/vcpkg.exe install --overlay-triplets=./triplets --overlay-ports=./ports --triplet=${{ matrix.vcpkg_triplet }} onnxruntime[cuda] opencv[contrib,dnn] yaml-cpp wxwidgets bfgroup-lyra eigen3 spdlog boost-container-hash boost-graph boost-serialization cppitertools
- uses: actions/upload-artifact@v3
if: failure()
with:
name: vcpkg-onnxruntime-compilation-logs-${{ matrix.vcpkg_triplet }}
path: C:\ivdv\vcpkg\buildtrees\onnxruntime\install-*.log
# Remove temporary files https://github.com/Microsoft/vcpkg/blob/master/docs/about/faq.md#how-can-i-remove-temporary-files
# For some reason doing using git bash to do rm -rf fails for icu's port buildtrees, probably for the use of msys2
# See https://github.com/microsoft/vcpkg/issues/10365
- name: Cleanup vcpkg temporary directories
shell: cmd
run: |
RMDIR /Q/S C:\ivdv\vcpkg\buildtrees
RMDIR /Q/S C:\ivdv\vcpkg\packages
RMDIR /Q/S C:\ivdv\vcpkg\downloads
- name: Prepare release file
if: github.event_name == 'release'
shell: cmd
run: |
7z a vcpkg-idjl-vision-${{ matrix.vcpkg_triplet }}.zip C:\ivdv
- name: Upload Release Asset
if: github.event_name == 'release'
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./vcpkg-idjl-vision-${{ matrix.vcpkg_triplet }}.zip
asset_name: vcpkg-idjl-vision-${{ matrix.vcpkg_triplet }}.zip
asset_content_type: application/zip