-
Notifications
You must be signed in to change notification settings - Fork 16
134 lines (113 loc) · 4.33 KB
/
Copy pathwindows.yml
File metadata and controls
134 lines (113 loc) · 4.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: Windows Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
concurrency:
group: windows-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
runs-on: windows-2022
defaults:
run:
shell: 'powershell'
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=windows_msvc2022_Debug" | 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-
# Do not cache Dawn here. It is fetched, not built, and measured CI timings
# showed no useful speedup from restoring/saving the cache.
- 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 Mesa
shell: cmd
run: |
curl.exe -L --output mesa.7z --url https://github.com/pal1000/mesa-dist-win/releases/download/20.3.2/mesa3d-20.3.2-release-msvc.7z
"C:\Program Files\7-Zip\7z.exe" x mesa.7z
mklink opengl32.dll "x64\opengl32.dll"
mklink libglapi.dll "x64\libglapi.dll"
- 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 -G Ninja
-DCMAKE_BUILD_TYPE=Debug
-DALP_ENABLE_POSITIONING=false
-DALP_ENABLE_ASSERTS=ON
-DALP_BUILD_WEBGPU_APP=ON
-DCMAKE_POLICY_DEFAULT_CMP0141=NEW
-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded
-DCMAKE_C_COMPILER_LAUNCHER=sccache
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
-B ./build
- name: Reset sccache stats
run: |
sccache --start-server
sccache --zero-stats
- name: Build
run: cmake --build ./build --config Debug
- name: Show sccache stats
if: always()
run: sccache --show-stats
- name: List .exe files in ./build
shell: pwsh
run: |
Write-Host "Searching for .exe files in ./build..."
Get-ChildItem -Path "./build" -Filter "*.exe" -Recurse | ForEach-Object {
Write-Host "Found: $($_.FullName)"
}
- name: Unittests on Windows
env:
MESA_GL_VERSION_OVERRIDE: 3.3
run: |
./build/unittests_radix.exe
./build/unittests_nucleus.exe