-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a cmake target for the commons library (#272)
* Create a cmake target for the commons. * Fix a broken test. * Update workflows * More workflow updates * Add a windows cmake workflow * More workflow updates. * Double-dash * Check folder * Fix presets * No /w * Disable clang-tidy * Update name. * Try correcting directory. * Build both targets. * More path fixes. * Even more path fixes. * In both builds * Add gcov and lcov targets * Maybe don't change folders? * Don't initially build gcov and lcov * Use correct profile * Just get the commands from vic3tohoi4 * Fix syntax error * In both parts * Borrow more from converter * More tweaks * Peek at directories. * More folders * Add some echos * Moar folders * Focus more * Maybe these are the right dirs? * Woah, we're halfway there! * Maybe not the preceding folders? * Correct path to coverage report * Update exclusions. * Don't get coverage of tests. * Exclude nlohmann * Fix path * No need for gcov * Remove another few gcov references * One more workflow
- Loading branch information
Showing
8 changed files
with
350 additions
and
167 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Windows cmake build and test | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build_and_test: | ||
name: Build and test local | ||
if: github.repository_owner == 'ParadoxGameConverters' | ||
runs-on: [self-hosted, windows] | ||
|
||
steps: | ||
- name: work around permission issue | ||
run: git config --global --add safe.directory /github/workspace | ||
|
||
- name: Add Ninja build to PATH | ||
run: echo "c:\program files\ninja" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | ||
|
||
- name: "Cloning repo" | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
submodules: recursive | ||
|
||
- name: Build with cmake | ||
shell: cmd | ||
run: | | ||
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" | ||
cmake --preset x64-release-windows | ||
cmake --build --preset build-x64-release-windows --target commonLib CommonItemsTests -- -j40 | ||
- name: "Run tests" | ||
run: | | ||
cd $Env:GITHUB_WORKSPACE\build\x64-release-windows | ||
.\CommonItemsTests.exe | ||
- name: "Cleanup" | ||
if: always() | ||
run: | | ||
Get-ChildItem -Path $Env:GITHUB_WORKSPACE -Recurse -Force | Remove-Item -force -recurse | ||
build_test: | ||
name: Build and test foreign | ||
if: github.repository_owner != 'ParadoxGameConverters' | ||
runs-on: windows-2022 | ||
|
||
steps: | ||
- name: "Cloning repo" | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
submodules: recursive | ||
|
||
- name: Install ninja | ||
run: | | ||
choco install ninja | ||
- name: Build with cmake | ||
shell: cmd | ||
run: | | ||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | ||
cmake --preset x64-release-windows | ||
cmake --build --preset build-x64-release-windows --target commonLib -- -j40 | ||
- name: "Run tests" | ||
run: | | ||
cd $Env:GITHUB_WORKSPACE\build\x64-release-windows | ||
.\CommonItemsTests.exe | ||
- name: "Cleanup" | ||
if: always() | ||
run: | | ||
Get-ChildItem -Path $Env:GITHUB_WORKSPACE -Recurse -Force | Remove-Item -force -recurse |
Oops, something went wrong.