forked from RainerKuemmerle/g2o
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Windows CI (RainerKuemmerle#572)
* Add Windows CI by github actions
- Loading branch information
1 parent
d68c441
commit b6f7dc6
Showing
3 changed files
with
73 additions
and
15 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
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,69 @@ | ||
name: win64 | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
release: | ||
|
||
jobs: | ||
build: | ||
name: ${{ matrix.config.name }} | ||
runs-on: ${{ matrix.config.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- { | ||
name: "Windows 2019 MSVC", | ||
os: windows-2019, | ||
build_type: "Debug", | ||
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat", | ||
generators: "Visual Studio 16 2019" | ||
} | ||
|
||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 25 | ||
|
||
- name: Print env | ||
run: | | ||
echo github.ref: ${{github.ref}} | ||
echo github.event.action: ${{github.event.action}} | ||
echo github.event_name: ${{github.event_name}} | ||
echo runner.os: ${{runner.os}} | ||
- name: Install libraries with vcpkg | ||
run: | | ||
vcpkg --triplet x64-windows install eigen3 | ||
- name: Eigen Introspection | ||
run: | | ||
type C:/vcpkg/packages/eigen3_x64-windows/debug/lib/pkgconfig/eigen3.pc | ||
- name: Configure CMake | ||
run: | | ||
cmake --version | ||
cmake -B ${{github.workspace}}/build -G "${{matrix.config.generators}}" -A x64 -DBUILD_UNITTESTS=ON -DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake | ||
- name: Build Introspection | ||
run: | | ||
echo "g2o config.h" | ||
type ${{github.workspace}}/build/g2o/config.h | ||
- name: Build | ||
run: cmake --build ${{github.workspace}}/build --config ${{matrix.config.build_type}} -j 2 | ||
|
||
- name: Test | ||
run: | | ||
cd ${{github.workspace}}/build | ||
$Env:PATH += ";${{github.workspace}}\bin\${{matrix.config.build_type}}" | ||
$Env:PATH += ";${{github.workspace}}\lib\${{matrix.config.build_type}}" | ||
$Env:PATH += ";${{github.workspace}}\build\bin\${{matrix.config.build_type}}" | ||
$Env:PATH += ";${{github.workspace}}\build\lib\${{matrix.config.build_type}}" | ||
ctest -C ${{matrix.config.build_type}} --extra-verbose --output-on-failure | ||
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