GitHub Actions: Use static Qt5 on Windows

This commit is contained in:
Luke Street 2021-03-13 11:58:20 -05:00
parent dd8a631111
commit 28bd2e0569
3 changed files with 33 additions and 67 deletions

View File

@ -127,39 +127,21 @@ jobs:
with: with:
submodules: recursive submodules: recursive
# - name: Cache LLVM
# id: cache-llvm
# uses: actions/cache@v1
# with:
# path: ../LLVM
# key: ${{runner.os}}-LLVMCache-${{env.LLVM_VERSION}}
- name: Download LLVM
# if: steps.cache-llvm.outputs.cache-hit != 'true'
uses: suisei-cn/actions-download-file@v1
id: download-llvm
with:
url: https://axiodl.com/files/LLVM-${{env.LLVM_VERSION}}-win64.exe
target: ../temp
- name: Install LLVM - name: Install LLVM
# if: steps.cache-llvm.outputs.cache-hit != 'true' run: |
shell: cmd $TempDir = "$env:RUNNER_WORKSPACE\temp"
working-directory: ../temp $Filename = "LLVM-$env:LLVM_VERSION-win64.exe"
run: ${{steps.download-llvm.outputs.filename}} /S /D=%RUNNER_WORKSPACE%\LLVM New-Item -Path "$TempDir" -ItemType Directory -ea 0
(New-Object Net.WebClient).DownloadFile("https://axiodl.com/files/$Filename", "$TempDir\$Filename")
Start-Process "$TempDir\$Filename" -ArgumentList "/S /D=$env:RUNNER_WORKSPACE\LLVM" -Wait
#- name: Cache Qt - name: Install vcpkg Qt
# id: cache-qt run: |
# uses: actions/cache@v1 $TempDir = "$env:RUNNER_WORKSPACE\temp"
# with: $Filename = "vcpkg-qt-$env:Qt_VERSION.7z"
# path: ../Qt New-Item -Path "$TempDir" -ItemType Directory -ea 0
# key: ${{runner.os}}-QtCache-${{env.Qt_VERSION}} (New-Object Net.WebClient).DownloadFile("https://axiodl.com/files/$Filename", "$TempDir\$Filename")
7z x "-o$env:RUNNER_WORKSPACE" -aos "$TempDir\$Filename"
#- name: Install Qt
# uses: jurplel/install-qt-action@v2
# with:
# version: ${{env.Qt_VERSION}}
# cached: ${{steps.cache-qt.outputs.cache-hit}}
# - name: Install dependencies # - name: Install dependencies
# run: choco install ninja vulkan-sdk # run: choco install ninja vulkan-sdk
@ -175,6 +157,7 @@ jobs:
run: | run: |
$workspace = $env:RUNNER_WORKSPACE -replace '\\', '/' $workspace = $env:RUNNER_WORKSPACE -replace '\\', '/'
cmake $env:GITHUB_WORKSPACE -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DURDE_VECTOR_ISA=sse41 ` cmake $env:GITHUB_WORKSPACE -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DURDE_VECTOR_ISA=sse41 `
-DCMAKE_TOOLCHAIN_FILE="$workspace/vcpkg-qt-$env:Qt_VERSION/scripts/buildsystems/vcpkg.cmake" `
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_CXX_FLAGS= -DCMAKE_C_FLAGS= ` -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_CXX_FLAGS= -DCMAKE_C_FLAGS= `
-DLLVM_ROOT_DIR="$workspace/LLVM" ` -DLLVM_ROOT_DIR="$workspace/LLVM" `
-DURDE_DLPACKAGE=urde-$env:GITHUB_RUN_NUMBER-win32-msvc-x86_64 -DURDE_DLPACKAGE=urde-$env:GITHUB_RUN_NUMBER-win32-msvc-x86_64
@ -204,39 +187,21 @@ jobs:
with: with:
submodules: recursive submodules: recursive
# - name: Cache LLVM
# id: cache-llvm
# uses: actions/cache@v1
# with:
# path: ../LLVM
# key: ${{runner.os}}-LLVMCache-${{env.LLVM_VERSION}}
- name: Download LLVM
# if: steps.cache-llvm.outputs.cache-hit != 'true'
uses: suisei-cn/actions-download-file@v1
id: download-llvm
with:
url: https://axiodl.com/files/LLVM-${{env.LLVM_VERSION}}-win64.exe
target: ../temp
- name: Install LLVM - name: Install LLVM
# if: steps.cache-llvm.outputs.cache-hit != 'true' run: |
shell: cmd $TempDir = "$env:RUNNER_WORKSPACE\temp"
working-directory: ../temp $Filename = "LLVM-$env:LLVM_VERSION-win64.exe"
run: ${{steps.download-llvm.outputs.filename}} /S /D=%RUNNER_WORKSPACE%\LLVM New-Item -Path "$TempDir" -ItemType Directory -ea 0
(New-Object Net.WebClient).DownloadFile("https://axiodl.com/files/$Filename", "$TempDir\$Filename")
Start-Process "$TempDir\$Filename" -ArgumentList "/S /D=$env:RUNNER_WORKSPACE\LLVM" -Wait
- name: Cache Qt - name: Install vcpkg Qt
id: cache-qt run: |
uses: actions/cache@v1 $TempDir = "$env:RUNNER_WORKSPACE\temp"
with: $Filename = "vcpkg-qt-$env:Qt_VERSION.7z"
path: ../Qt New-Item -Path "$TempDir" -ItemType Directory -ea 0
key: ${{runner.os}}-QtCache-${{env.Qt_VERSION}} (New-Object Net.WebClient).DownloadFile("https://axiodl.com/files/$Filename", "$TempDir\$Filename")
7z x "-o$env:RUNNER_WORKSPACE" -aos "$TempDir\$Filename"
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: ${{env.Qt_VERSION}}
cached: ${{steps.cache-qt.outputs.cache-hit}}
- name: Install dependencies - name: Install dependencies
run: choco install ninja vulkan-sdk run: choco install ninja vulkan-sdk
@ -252,6 +217,7 @@ jobs:
run: | run: |
$workspace = $env:RUNNER_WORKSPACE -replace '\\', '/' $workspace = $env:RUNNER_WORKSPACE -replace '\\', '/'
cmake $env:GITHUB_WORKSPACE -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DURDE_VECTOR_ISA=sse41 ` cmake $env:GITHUB_WORKSPACE -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DURDE_VECTOR_ISA=sse41 `
-DCMAKE_TOOLCHAIN_FILE="$workspace/vcpkg-qt-$env:Qt_VERSION/scripts/buildsystems/vcpkg.cmake" `
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ` -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded `
-DCMAKE_C_COMPILER="$workspace/LLVM/bin/clang-cl.exe" ` -DCMAKE_C_COMPILER="$workspace/LLVM/bin/clang-cl.exe" `
-DCMAKE_CXX_COMPILER="$workspace/LLVM/bin/clang-cl.exe" ` -DCMAKE_CXX_COMPILER="$workspace/LLVM/bin/clang-cl.exe" `

View File

@ -13,7 +13,7 @@
"variables": [ "variables": [
{ {
"name": "CMAKE_MSVC_RUNTIME_LIBRARY", "name": "CMAKE_MSVC_RUNTIME_LIBRARY",
"value": "MultiThreadedDebug", "value": "MultiThreadedDebugDLL",
"type": "STRING" "type": "STRING"
}, },
{ {
@ -46,7 +46,7 @@
"variables": [ "variables": [
{ {
"name": "CMAKE_MSVC_RUNTIME_LIBRARY", "name": "CMAKE_MSVC_RUNTIME_LIBRARY",
"value": "MultiThreaded", "value": "MultiThreadedDLL",
"type": "STRING" "type": "STRING"
}, },
{ {
@ -122,7 +122,7 @@
"variables": [ "variables": [
{ {
"name": "CMAKE_MSVC_RUNTIME_LIBRARY", "name": "CMAKE_MSVC_RUNTIME_LIBRARY",
"value": "MultiThreadedDebug", "value": "MultiThreadedDebugDLL",
"type": "STRING" "type": "STRING"
}, },
{ {
@ -150,7 +150,7 @@
"variables": [ "variables": [
{ {
"name": "CMAKE_MSVC_RUNTIME_LIBRARY", "name": "CMAKE_MSVC_RUNTIME_LIBRARY",
"value": "MultiThreaded", "value": "MultiThreadedDLL",
"type": "STRING" "type": "STRING"
}, },
{ {

@ -1 +1 @@
Subproject commit 8a3c11ab697016831b16b5d1ebfa3ad66e2b954c Subproject commit 808101488324f1ba7b000fb54320cd33ad9928bf