-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce github action workflow to test windows with clang
- Loading branch information
Showing
1 changed file
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Windows - clang | ||
on: | ||
pull_request: | ||
push: | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
defaults: | ||
run: | ||
shell: cmd | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
name: [windows-latest-clang] | ||
|
||
include: | ||
- name: windows-latest-clang | ||
os: windows-2019 | ||
compiler: clang-cl | ||
|
||
steps: | ||
# https://github.com/marketplace/actions/cancel-workflow-action | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- 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" >> $GITHUB_ENV | ||
- name: Configure ViSP | ||
working-directory: ${{ github.workspace }} | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake .. -G "Visual Studio 16 2019" -T "ClangCl" -A "x64" | ||
type ViSP-third-party.txt | ||
- name: Build ViSP | ||
working-directory: build | ||
run: | | ||
cmake --build . --config Release | ||
- name: Install ViSP | ||
working-directory: build | ||
run: | | ||
cmake --build . --config Release --target install | ||
- name: Check installation folder | ||
working-directory: build | ||
run: | | ||
dir ${{ github.workspace }}\build\install\ | ||
dir ${{ github.workspace }}\build\install\x64\ | ||
dir ${{ github.workspace }}\build\install\x64\vc16\ | ||
dir ${{ github.workspace }}\build\install\x64\vc16\bin | ||
- name: Test ViSP | ||
working-directory: build | ||
run: | | ||
echo "VISP_INPUT_IMAGE_PATH: ${{ env.VISP_INPUT_IMAGE_PATH }}" | ||
set PATH=%PATH%;${{ github.workspace }}\build\install\x64\vc16\bin | ||
echo "PATH: " | ||
echo %PATH% | ||
ctest --output-on-failure -C Release -V |