forked from tesseract-robotics/tesseract
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (71 loc) · 2.6 KB
/
windows_2019.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
name: Windows-2019
on:
push:
branches:
- master
pull_request:
schedule:
- cron: '0 5 * * *'
env:
VCPKG_PKGS: >-
fcl bullet3 octomap console-bridge eigen3 yaml-cpp benchmark tinyxml2 assimp orocos-kdl pcl lapack-reference boost-dll boost-filesystem boost-filesystem boost-serialization boost-program-options boost-graph
jobs:
windows_ci:
name: Windows-2019
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
with:
path: workspace/src/tesseract
- name: checkout-vcpkg
uses: actions/checkout@v3
with:
path: vcpkg
repository: microsoft/vcpkg
- name: bootstrap-vcpkg
working-directory: vcpkg
run: bootstrap-vcpkg.bat
- name: vcpkg-dry-run
working-directory: vcpkg
shell: cmd
run: |
vcpkg install --dry-run --triplet x64-windows-release ${{ env.VCPKG_PKGS }} > vcpkg_dry_run.txt
- name: cache-vcpkg-archives
if: startsWith(github.ref, 'refs/tags/v') != true
id: cache-vcpkg-archives
uses: pat-s/always-upload-cache@v3
with:
path: C:\Users\runneradmin\AppData\Local\vcpkg\archives
key: ${{ runner.os }}-x64-windows-release-vcpkg-${{ hashFiles('vcpkg/vcpkg_dry_run.txt') }}-main
restore-keys: |
${{ runner.os }}-x64-windows-release-vcpkg-
- name: install-depends
shell: cmd
run: |
vcpkg integrate install
python -m pip install vcstool -q
python -m pip install colcon-common-extensions -q
python -m pip install ninja -q
vcpkg install --triplet x64-windows-release ${{ env.VCPKG_PKGS }}
- name: configure-msvc
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: build-workspace
working-directory: workspace
shell: cmd
run: |
set PATH=%PATH%;C:/vcpkg/installed/x64-windows-release/bin
vcs import --input "${{ github.workspace }}/workspace/src/tesseract/dependencies.rosinstall" src/
colcon build --event-handlers console_direct+ --cmake-args -G "Ninja" -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-release -DCMAKE_BUILD_TYPE=Release -DTESSERACT_ENABLE_TESTING=ON
if %ERRORLEVEL% GEQ 1 exit 1
- name: run-test
working-directory: workspace
shell: cmd
run: |
call ./install/setup.bat
set PATH=%PATH%;C:/vcpkg/installed/x64-windows-release/bin
colcon test --event-handlers console_direct+ --return-code-on-test-failure
if %ERRORLEVEL% GEQ 1 exit 1
colcon test-result --verbose
if %ERRORLEVEL% GEQ 1 exit 1