Skip to content

Fix WebAssembly release artifact check #37

Fix WebAssembly release artifact check

Fix WebAssembly release artifact check #37

Workflow file for this run

name: CMake Presets
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
concurrency:
group: cmake-presets-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
msvc-debug:
runs-on: windows-2022
defaults:
run:
shell: powershell
strategy:
fail-fast: false
matrix:
preset:
- webgpu_app_msvc_debug
- unittests_msvc_debug
steps:
- uses: actions/checkout@v7
with:
submodules: 'true'
- name: Load CI versions
run: |
Get-Content .github/ci-versions.env | Add-Content $env:GITHUB_ENV
- name: Set sccache config
run: |
"SCCACHE_VERSION=v0.16.0" | Add-Content $env:GITHUB_ENV
"ALP_CACHE_CONFIG=${{ matrix.preset }}" | Add-Content $env:GITHUB_ENV
"ALP_CACHE_TOOLCHAIN=msvc2022-qt-$env:QT_VERSION-sccache-v0.16.0" | Add-Content $env:GITHUB_ENV
"SCCACHE_DIR=${{ github.workspace }}\.sccache" | Add-Content $env:GITHUB_ENV
"SCCACHE_CACHE_SIZE=500M" | Add-Content $env:GITHUB_ENV
- name: Cache sccache
uses: actions/cache@v6
with:
path: ${{ github.workspace }}\.sccache
key: sccache-${{ runner.os }}-${{ env.ALP_CACHE_CONFIG }}-${{ env.ALP_CACHE_TOOLCHAIN }}-v1-${{ github.run_id }}-${{ github.run_attempt }}
restore-keys: |
sccache-${{ runner.os }}-${{ env.ALP_CACHE_CONFIG }}-${{ env.ALP_CACHE_TOOLCHAIN }}-v1-
- name: Make sure MSVC is found when Ninja generator is in use
uses: TheMrMilchmann/setup-msvc-dev@v4
with:
arch: x64
sdk: 10.0.26100.0
- name: Install tools
run: choco install 7zip.install ninja
- name: Install sccache
run: |
$Archive = "sccache-$env:SCCACHE_VERSION-x86_64-pc-windows-msvc.zip"
$Url = "https://github.com/mozilla/sccache/releases/download/$env:SCCACHE_VERSION/$Archive"
Invoke-WebRequest -Uri $Url -OutFile $Archive
Expand-Archive -Path $Archive -DestinationPath sccache-download
New-Item -ItemType Directory -Force -Path sccache-bin | Out-Null
$SccacheExe = Get-ChildItem -Path sccache-download -Filter sccache.exe -Recurse | Select-Object -First 1
Copy-Item $SccacheExe.FullName sccache-bin\sccache.exe
"${{ github.workspace }}\sccache-bin" | Add-Content $env:GITHUB_PATH
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: ${{ env.QT_VERSION }}
host: windows
target: 'desktop'
arch: 'win64_msvc2022_64'
dir: '${{ github.workspace }}/qt'
install-deps: 'true'
modules: ${{ env.QT_MODULES }}
cache: true
aqtsource: 'git+https://github.com/miurahr/aqtinstall.git@bbfb1f7c0590b9eb3fa91356e75bb64fb15d3643'
- name: Configure
env:
CMAKE_PREFIX_PATH: ${{ env.QT_ROOT_DIR }}/lib/cmake
GITHUB_TOKEN: ${{ github.token }}
run: >
cmake --preset ${{ matrix.preset }}
-DCMAKE_POLICY_DEFAULT_CMP0141=NEW
-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded
-DCMAKE_C_COMPILER_LAUNCHER=sccache
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
- name: Reset sccache stats
run: |
sccache --start-server
sccache --zero-stats
- name: Build
run: cmake --build --preset ${{ matrix.preset }}
- name: Show sccache stats
if: always()
run: sccache --show-stats