-
Notifications
You must be signed in to change notification settings - Fork 12
Add Windows-CI. #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Hoikas
wants to merge
5
commits into
H-uru:master
Choose a base branch
from
Hoikas:ci
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add Windows-CI. #11
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
96a8a4b
Add INSTALL target to CMake.
Hoikas 6816945
Add Windows CI.
Hoikas fe86b9f
Fix compile errors revealed by CI.
Hoikas f83b32e
Remove QtGUI from `QIntValidator` include.
Hoikas 1db8baa
Remove deprecated `::set-env` command usage.
Hoikas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,126 @@ | ||
| name: Windows-CI | ||
| on: [push, pull_request] | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: windows-latest | ||
|
|
||
| strategy: | ||
| matrix: | ||
| arch: ["x86", "x64"] | ||
| qt: ["5.15.0"] | ||
|
|
||
| env: | ||
| CMAKE_GENERATOR: Visual Studio 16 2019 | ||
| vcpkg-triplet: ${{ matrix.arch }}-windows-static-md | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v2 | ||
|
|
||
| - name: Bootstrap vcpkg | ||
| id: bootstrap-vcpkg | ||
| run: | | ||
| cd C:\vcpkg | ||
| git pull | ||
| Write-Host "::set-output name=vcpkg-rev::$(git rev-parse HEAD)" | ||
| ./bootstrap-vcpkg.bat | ||
|
|
||
| - name: Restore Dependency Cache | ||
| id: cache-vcpkg | ||
| uses: actions/cache@v1 | ||
| with: | ||
| path: C:\vcpkg\installed | ||
| key: | | ||
| vcpkg-triplet=${{ env.vcpkg-triplet }} vcpkg-response=${{ hashFiles('vcpkg.txt') }} vcpkg-rev=${{ steps.bootstrap-vcpkg.outputs.vcpkg-rev }} | ||
| restore-keys: | | ||
| vcpkg-triplet=${{ env.vcpkg-triplet }} vcpkg-response=${{ hashFiles('vcpkg.txt') }} | ||
| vcpkg-triplet=${{ env.vcpkg-triplet }} | ||
|
|
||
| - name: Upgrade Dependencies | ||
| if: steps.cache-vcpkg.outputs.cache-hit == 'true' | ||
| run: | | ||
| vcpkg upgrade --no-dry-run --triplet ${{ env.vcpkg-triplet }} | ||
|
|
||
| - name: Build Dependencies | ||
| run: | | ||
| vcpkg install `@vcpkg.txt --triplet ${{ env.vcpkg-triplet }} | ||
| vcpkg list --x-full-desc | ||
|
|
||
| - name: Configure Platform Arch | ||
| run: | | ||
| # Qt started providing both x86 and x64 builds for only MSVC 2019 as of 5.15. This was | ||
| # true only for MSVC 2017 before then. | ||
| [int[]]$qt_ver = "${{ matrix.qt }}".split('.') | ||
| if (($qt_ver[0] -eq 5) -and ($qt_ver[1] -lt 15)) { | ||
| $qt_compiler = "msvc2017" | ||
| } else { | ||
| $qt_compiler = "msvc2019" | ||
| } | ||
|
|
||
| if ("${{ matrix.arch }}" -eq "x86") { | ||
| $cmake_arch = "Win32" | ||
| $qt_arch = "win32_$($qt_compiler)" | ||
| } else { | ||
| $cmake_arch = "${{ matrix.arch }}" | ||
| $qt_arch = "win64_$($qt_compiler)_64" | ||
| } | ||
| Write-Host "::set-env name=CMAKE_GENERATOR_PLATFORM::$cmake_arch" | ||
| Write-Host "::set-env name=QT_ARCH::$qt_arch" | ||
|
|
||
| # Qt5 takes roughly a thousand years to build, so we download it from elsehwere... | ||
| - name: Restore Qt Cache | ||
| id: cache-qt | ||
| uses: actions/cache@v1 | ||
| with: | ||
| path: ${{ github.workspace }}\qt | ||
| key: os=${{ runner.os }} qt=${{ matrix.qt }} arch=${{ env.qt_arch }} | ||
|
|
||
| - name: Install Qt | ||
| uses: jurplel/install-qt-action@v2 | ||
| with: | ||
| arch: ${{ env.QT_ARCH }} | ||
| version: ${{ matrix.qt }} | ||
| dir: ${{ github.workspace }}\qt | ||
| cached: ${{ steps.cache-qt.outputs.cache-hit }} | ||
| aqtversion: ==0.9.* | ||
|
|
||
| - name: Checkout HSPlasma | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| repository: H-uru/libhsplasma | ||
| path: libhsplasma | ||
|
|
||
| - name: Build libHSPlasma | ||
| run: | | ||
| cd libhsplasma | ||
| mkdir build && cd build | ||
| cmake ` | ||
| -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake ` | ||
| -DVCPKG_TARGET_TRIPLET=${{ env.vcpkg-triplet }} ` | ||
| -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}\install ` | ||
| -DENABLE_PYTHON=OFF -DENABLE_TOOLS=OFF -DENABLE_NET=ON -DENABLE_PHYSX=OFF .. | ||
| cmake --build . --config Release -j 2 | ||
| cmake --build . --config Release --target INSTALL | ||
|
|
||
| - name: Build MoulKI | ||
| run: | | ||
| mkdir build && cd build | ||
| cmake ` | ||
| -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake ` | ||
| -DVCPKG_TARGET_TRIPLET=${{ env.vcpkg-triplet }} ` | ||
| -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}\install ` | ||
| .. | ||
| cmake --build . --config Release -j 2 | ||
| cmake --build . --config Release --target INSTALL | ||
|
|
||
| - name: Deploy Qt | ||
| run: | | ||
| cd ${{ env.Qt5_Dir }}\bin | ||
| $ExeFile = Get-ChildItem "${{ github.workspace }}\install\bin" -Filter *.exe | ||
| ./windeployqt.exe --release $ExeFile.FullName | ||
|
|
||
| - name: Upload Artifacts | ||
| uses: actions/upload-artifact@v2 | ||
| with: | ||
| name: ${{ runner.os }}-${{ matrix.arch }}-qt${{ matrix.qt }} | ||
| path: install\bin | ||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| libjpeg-turbo | ||
| libpng | ||
| openssl | ||
| string-theory | ||
| zlib |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.