-
Notifications
You must be signed in to change notification settings - Fork 286
77 lines (66 loc) · 2.37 KB
/
windows-msvc.yaml
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
name: Windows - Visual 2019
on:
pull_request:
types: [opened, reopened, synchronize]
# https://stackoverflow.com/questions/66335225/how-to-cancel-previous-runs-in-the-pr-when-you-push-new-commitsupdate-the-curre#comment133398800_72408109
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
jobs:
build-windows-msvc:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: cmd
strategy:
fail-fast: false
matrix:
name: [windows-latest]
include:
- name: windows-latest
os: windows-2022
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Display the workspace path
working-directory: ${{ github.workspace }}
run: pwd
- name: Clone visp-images
shell: bash
# https://remarkablemark.org/blog/2022/09/25/check-git-branch-exists-in-remote-repository/
run: |
git clone --depth 1 https://github.com/lagadic/visp-images ${HOME}/visp-images
echo "VISP_INPUT_IMAGE_PATH=$HOME/visp-images" >> $GITHUB_ENV
- name: Configure ViSP
working-directory: ${{ github.workspace }}
run: |
set VISP_INPUT_IMAGE_PATH=${{ env.VISP_INPUT_IMAGE_PATH }}
echo "VISP_INPUT_IMAGE_PATH: "
echo %VISP_INPUT_IMAGE_PATH%
mkdir build
cd build
cmake .. -G "Visual Studio 17 2022" -A "x64"
type ViSP-third-party.txt
- name: Build ViSP
working-directory: ${{ github.workspace }}\build
run: |
cmake --build . --config Release
- name: Install ViSP
working-directory: ${{ github.workspace }}\build
run: |
cmake --build . --config Release --target install
- name: Check installation folder
working-directory: ${{ github.workspace }}\build
run: |
dir ${{ github.workspace }}\build\install\x64\vc17\bin
- name: Test ViSP
working-directory: ${{ github.workspace }}\build
run: |
set VISP_INPUT_IMAGE_PATH=${{ env.VISP_INPUT_IMAGE_PATH }}
echo "VISP_INPUT_IMAGE_PATH: "
echo %VISP_INPUT_IMAGE_PATH%
set PATH=%PATH%;${{ github.workspace }}\build\install\x64\vc17\bin
echo "PATH: "
echo %PATH%
ctest --output-on-failure -C Release -V