Skip to content

Add sscache to Windows CI #201

Add sscache to Windows CI

Add sscache to Windows CI #201

Workflow file for this run

name: win64
on:
push:
branches:
- master
pull_request:
release:
env:
SCCACHE_GHA_ENABLED: "true"
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Windows 2022 MSVC",
os: windows-2022,
build_type: "Debug",
environment_script: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat",
generators: "Visual Studio 17 2022"
}
steps:
- uses: actions/checkout@v3
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}}
Get-ChildItem Env:
- 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: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Print sccache env
run: |
echo sccache version
sccache -V
- name: Configure CMake
run: |
cmake --version
cmake -B ${{github.workspace}}/build -G "${{matrix.config.generators}}" -A x64 -DBUILD_UNITTESTS=ON -DG2O_BUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
- 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