[#120] Update CI to work with conan 2.0 #447
Workflow file for this run
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
name: Windows | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
pull_request: | |
env: | |
VULKAN_DIR: C:\VulkanSDK | |
SDK_VERSION: 1.3.268.0 | |
BUILD_TYPE: Release | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache Vulkan SDK | |
id: cache-vulkan-sdk | |
uses: actions/cache@v3 | |
with: | |
path: ${{env.VULKAN_DIR}}\${{env.SDK_VERSION}} | |
key: vulkan-sdk-${{ runner.os }}-${{env.SDK_VERSION}} | |
- name: Download and install Vulkan SDK | |
if: steps.cache-vulkan-sdk.outputs.cache-hit != 'true' | |
run: | | |
Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/$env:SDK_VERSION/windows/VulkanSDK-$env:SDK_VERSION-Installer.exe" -OutFile VulkanSDK.exe; | |
$installer = Start-Process -FilePath VulkanSDK.exe -Wait -PassThru -ArgumentList @("--accept-licenses --default-answer --confirm-command install"); | |
$installer.WaitForExit(); | |
- name: Install Conan | |
id: conan | |
uses: turtlebrowser/get-conan@main | |
- name: Cache Conan packages | |
id: cache-conan | |
uses: actions/cache@v3 | |
with: | |
path: ~/.conan/data | |
key: conan-cache-${{ hashFiles('**/conanfile.txt') }} | |
- name: Create Build Environment | |
run: | | |
cmake -E make_directory ${{runner.workspace}}/build | |
- name: Install dependencies with Conan | |
working-directory: ${{runner.workspace}}/build | |
run: | | |
conan profile detect | |
conan install $env:GITHUB_WORKSPACE --output-folder=build --build=missing --settings=build_type=$env:BUILD_TYPE | |
- name: Configure CMake and build | |
working-directory: ${{runner.workspace}}/build | |
run: | | |
$env:VULKAN_SDK="$env:VULKAN_DIR\$env:SDK_VERSION" | |
cmake $env:GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$env:BUILD_TYPE | |
cmake --build . --config $env:BUILD_TYPE > output.txt | |
cat output.txt | |
- name: Post PR comment for warnings/errors | |
if: always() && github.ref != 'refs/heads/develop' && github.ref != 'refs/heads/master' | |
uses: JacobDomagala/CompileResultAction@master | |
with: | |
comment_title: WINDOWS COMPILE RESULT | |
compile_result_file: ${{runner.workspace}}/build/output.txt | |
compiler: MSVC | |
exclude_dir: ${{github.workspace}}/lib | |
debug_output: true |