Skip to content
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

Fix Build/Update Boost on Windows (non-PR-754 version) #789

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
5657972
More GH Action updates
stephengtuggy Jun 17, 2023
3e82023
codeql.yml: Uncomment `with: languages` clause for CodeQL Init
stephengtuggy Jun 18, 2023
673fdc8
Update Windows-CI.yml
stephengtuggy Jun 18, 2023
8ab1214
Update codeql.yml
stephengtuggy Jun 18, 2023
6ae4f71
Update fortify-on-demand-scan.yml
stephengtuggy Jun 18, 2023
accfb12
gh-actions-pr.yml: whitespace updates
stephengtuggy Jun 18, 2023
773e0c5
Update gh-actions-release.yml
stephengtuggy Jun 18, 2023
a403c7a
More on GH Actions
stephengtuggy Jun 18, 2023
f8a57d5
Updates to engine/CMakeLists.txt
stephengtuggy Jun 18, 2023
45053ae
Add engine/CMakePresets.json
stephengtuggy Jun 18, 2023
d0a4c70
Updates to 9 .cpp and .h files
stephengtuggy Jun 18, 2023
7efdac1
vcpkg.json: updates
stephengtuggy Jun 18, 2023
b2c873d
Update bootstrap.ps1 and build.ps1; add test.ps1
stephengtuggy Jun 18, 2023
7a9a423
32 .cpp and .h files: various updates
stephengtuggy Jun 19, 2023
e2af41a
updates to 13 more .cpp and .h files
stephengtuggy Jun 19, 2023
6c5853d
CMakeLists.txt: Only set BOOST_USE_WINAPI_VERSION, etc. on Windows
stephengtuggy Jun 25, 2023
690ddd6
6 copies of CMakeLists.txt: Troubleshooting Position-Independent Code…
stephengtuggy Jul 10, 2023
4b115c0
LICENSE, cmake-config.h.in: Copyleft updates
stephengtuggy Jul 10, 2023
3ea8071
cmake-config.h.in: Reformat copyleft header block
stephengtuggy Jul 10, 2023
988a257
CMakeLists.txt: Omit `APPEND` clause from `INCLUDE_DIRECTORIES` state…
stephengtuggy Jul 10, 2023
dc9e179
engine/CMakeLists.txt, CMakePresets.json: Replicate latest changes fr…
stephengtuggy Jul 16, 2023
3f9ec5c
engine/CMakeLists.txt: Missed a spot
stephengtuggy Jul 16, 2023
b945b39
41 .cpp and .h files: `#include <boost/python.hpp>` ahead of Python.h…
stephengtuggy Jul 16, 2023
dd72ed0
gh-actions-pr.yml: Add ENABLE_PIE flag, as well as several add'l dist…
stephengtuggy Jul 16, 2023
51cadbd
gh-actions-pr.yml: Uncomment Rocky Linux 8.7 builds
stephengtuggy Jul 16, 2023
cd60176
CMakeLists.txt: Turn CMAKE_C(XX)_EXTENSIONS back on
stephengtuggy Jul 18, 2023
e205873
Add vcpkg-configuration.json
stephengtuggy Sep 4, 2023
3cbbbf9
vcpkg.json: Update schema file URL
stephengtuggy Sep 4, 2023
a574ed3
vcpkg-configuration.json: Update baseline
stephengtuggy Sep 4, 2023
eef1f8d
collide_map.cpp: Don't cache list_end, as discussed
stephengtuggy Oct 11, 2023
723441d
Merge branch 'master' into update-boost-windows-non-754
stephengtuggy Oct 11, 2023
31bcad7
collide_map.cpp: Don't cache list_end, as discussed
stephengtuggy Oct 11, 2023
11e5b23
Merge branch 'master' into update-boost-windows-non-754_checkpoint-merge
BenjamenMeyer Nov 9, 2023
848e8c3
Merge pull request #10 from BenjamenMeyer/update-boost-windows-non-75…
stephengtuggy Nov 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
175 changes: 118 additions & 57 deletions .github/workflows/Windows-CI.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# This is a basic workflow to help you get started with Actions

name: Windows-CI

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
pull_request:

Expand All @@ -22,80 +19,144 @@ jobs:
fail-fast: false
matrix:
include:
- os: windows-2019
cmakeGenerator: VS16Win64
- os: windows-2022
cmakeGenerator: Ninja
- os: windows-2019
cmake-generator: VS2019Win64
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we really testing all these variants? It may be a bit excessive IMO.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. We can probably cut back a bit.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's just stick to 1 Windows build for the time being; that should at least get the ball rolling.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about 2 Windows builds? One on Windows (Server) 2019, and one on Windows (Server) 2022. I think that will be enough even to satisfy me, haha.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stephengtuggy if we need to

Copy link
Member

@BenjamenMeyer BenjamenMeyer Nov 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, VS2022 on Windows 2022 passed; while VS2019 on Windows 2019 failed. Just noting since we're going to merge this PR without fully fixing that.

enable-pie: 1
build-type: Debug
- os: windows-2019
cmake-generator: VS2019Win64
enable-pie: 1
build-type: Release
- os: windows-2019
cmake-generator: VS2019Win64
enable-pie: 0
build-type: Debug
- os: windows-2019
cmake-generator: VS2019Win64
enable-pie: 0
build-type: Release
# - os: windows-2019
# cmake-generator: ninja
# enable-pie: 1
# build-type: Debug
# - os: windows-2019
# cmake-generator: ninja
# enable-pie: 1
# build-type: Release
# - os: windows-2019
# cmake-generator: ninja
# enable-pie: 0
# build-type: Debug
# - os: windows-2019
# cmake-generator: ninja
# enable-pie: 0
# build-type: Release
- os: windows-2022
cmake-generator: VS2022Win64
enable-pie: 1
build-type: Debug
- os: windows-2022
cmake-generator: VS2022Win64
enable-pie: 1
build-type: Release
- os: windows-2022
cmake-generator: VS2022Win64
enable-pie: 0
build-type: Debug
- os: windows-2022
cmake-generator: VS2022Win64
enable-pie: 0
build-type: Release
# - os: windows-2022
# cmake-generator: ninja
# enable-pie: 1
# build-type: Debug
# - os: windows-2022
# cmake-generator: ninja
# enable-pie: 1
# build-type: Release
# - os: windows-2022
# cmake-generator: ninja
# enable-pie: 0
# build-type: Debug
# - os: windows-2022
# cmake-generator: ninja
# enable-pie: 0
# build-type: Release

env:
buildDir: '${{ github.workspace }}/build/'
# Indicates the location of vcpkg
VCPKG_ROOT: '${{ github.workspace }}/v'
# Tells vcpkg where binary packages are stored.
VCPKG_DEFAULT_BINARY_CACHE: '${{ github.workspace }}/vbincache'
## Let's use GitHub Action cache as storage for the vcpkg Binary Caching feature.
#VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite'
VCPKG_DEFAULT_TRIPLET: x64-windows
VCPKG_DEFAULT_HOST_TRIPLET: x64-windows
PYTHONHOME: '${{ github.workspace }}/v/packages/python3_x64-windows/tools/python3'

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# Set env vars needed for vcpkg to leverage the GitHub Action cache as a storage
# for Binary Caching.
- uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 #v6.4.1
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab #v3.5.2
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3

- name: install-cmake
uses: lukka/[email protected]
- name: "Create directory '${{ env.VCPKG_DEFAULT_BINARY_CACHE }}'"
run: mkdir -p $VCPKG_DEFAULT_BINARY_CACHE
shell: bash

- name: install-vcpkg
# You may pin to the exact commit or the version.
# uses: lukka/run-vcpkg@9c0ae56bad291f4b185cc433a9b56084b2962259
uses: lukka/run-vcpkg@v7
- name: install-cmake
uses: lukka/get-cmake@359fbae4b163fa01633e6de228fa7f2a31ab1fc7 #v3.26.1
with:
vcpkgDirectory: '${{ github.workspace }}/v'
setupOnly: true
vcpkgGitCommitId: '49a30e9db17a8edf7c2809940ee2036746b1b982'
vcpkgTriplet: 'x64-windows'
appendedCacheKey: ${{ hashFiles( '**/vcpkg.json' ) }}
additionalCachedPaths: ${{ env.buildDir }}/vcpkg_installed
cmakeVersion: 3.26.1
ninjaVersion: 1.11.1

- name: run-cmake
# You may pin to the exact commit or the version.
# uses: lukka/run-cmake@7ba4481660f0f04c86cfa5f1f24b90effc97bde1
uses: lukka/run-cmake@v3
with:
# Path to CMakeLists.txt. Used for both CMakeListsTxtBasic and CMakeListsTxtAdvanced modes.
cmakeListsTxtPath: ${{ github.workspace }}/engine/CMakeLists.txt
# Indicates whether to use vcpkg's CMake toolchain file if RUNVCPKG_VCPKG_ROOT environment variable is defined, for example by a previous run-vcpkg action execution. If the variable is defined, its content would be passed with '-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=<RUNVCPKG_VCPKG_ROOT>/scripts/buildsystems/vcpkg.cmake'. Used by any mode.
useVcpkgToolchainFile: true
# Specify the triplet used with vcpkg. Default value is RUNVCPKG_VCPKG_TRIPLET environment variable, which is set e.g. by the run-vcpkg. Possible values include any file name with no extension present in the vcpkgroot/trplet directory, e.g. x64-linux, x64-windows, x64-osx and so forth. Used by any mode.
vcpkgTriplet: x64-windows
# Select the build configuration, typically Debug or Release. Used by CMakeListsTxtBasic mode.
cmakeBuildType: Release
# Specify the CMake generator to use. Possible values: Ninja: Ninja, NinjaMulti: Ninja Multi-Config UnixMakefiles: Unix Makefiles, VS16Win64: Visual Studio 2019 x64, VS16Arm64: Visual Studio 2019 ARM64, VS16Arm: Visual Studio 2019 ARM, VS16Win32: Visual Studio 2019 Win32, VS15Win64: Visual Studio 2017 x64, VS15Arm64: Visual Studio 2017 ARM64, VS15Arm: Visual Studio 2017 ARM, VS15Win32: Visual Studio 2017 Win32. Used by CMakeListsTxtBasic mode.
cmakeGenerator: ${{ matrix.cmakeGenerator }}
# Set the build directory, i.e. where CMake generates the build system files. Defaults to `$(Build.ArtifactStagingDirectory)` for CMakeLists.txt, and to `$(Build.ArtifactStagingDirectory)/<configuration-name>` for CMakeSettings.json. Used by any mode.
buildDirectory: ${{ env.buildDir }}
# Provides a mean to provide all the CMake arguments. This is required when using CMakeLists.txt in Advanced mode. For CMakeSettings.json, the arguments are already inferred, but you can append your arguments providing them here. Used by CMakeListsTxtAdvanced and CMakeSettingsJson modes.
cmakeAppendedArgs: ""
# Indicates whether to run 'cmake --build' after CMake project files have been generated successfully. Used by any mode.
buildWithCMake: true
# Additional parameters for both CMake and the make program (e.g. ninja or make). Separate CMake arguments to the native make program arguments with '--', such as: '--clean-first --config Debug -- -j0'. Used by both CMakeListsTxtBasic and CMakeListsTxtAdvanced modes
buildWithCMakeArgs: "--config Release"
# # Restore vcpkg from the GitHub Action cache service. Note that packages are restored by vcpkg's binary caching
# # when it is being run afterward by CMake.
# - name: restore-vcpkg
# uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 #v3.3.1
# with:
# # The first path is the location of vcpkg: it contains the vcpkg executable and data files, as long as the
# # built package archives (aka binary cache) which are located by VCPKG_DEFAULT_BINARY_CACHE env var.
# # The other paths starting with '!' are exclusions: they contain temporary files generated during the build of the installed packages.
# path: |
# ${{ env.VCPKG_ROOT }}
# !${{ env.VCPKG_ROOT }}/buildtrees
# !${{ env.VCPKG_ROOT }}/packages
# !${{ env.VCPKG_ROOT }}/downloads
# !${{ env.VCPKG_ROOT }}/installed
# # The key is composed in a way that it gets properly invalidated whenever a different version of vcpkg is being used.
# key: |
# ${{ hashFiles( '.git/modules/vcpkg/HEAD' )}}

- name: copy-build-artifacts
- name: install-vcpkg
#if: steps.cache.outputs.cache-hit != 'true'
run: |
New-Item bin -Force -Type Directory
$aPossibleBinaryDirs = @("build", "build\objconv", "build\Release", "build\objconv\Release")
$aPossibleBinaryDirs | ForEach-Object {
if (Test-Path $_) {
Copy-Item -Force -Verbose $_\*.* .\bin
}
}
git clone https://github.com/stephengtuggy/vcpkg-local.git ${{ env.VCPKG_ROOT }}
${{ env.VCPKG_ROOT }}\bootstrap-vcpkg.bat -disableMetrics

- name: run-build-script
working-directory: ${{ github.workspace }}
run: .\script\build.ps1 -Generator ${{ matrix.cmake-generator }} -EnablePIE ${{ matrix.enable-pie }} -BuildType ${{ matrix.build-type }}

- name: Test
working-directory: ${{github.workspace}}/build
working-directory: ${{ github.workspace }}
env:
GTEST_OUTPUT: xml
GTEST_COLOR: 1
run: ctest -V -C Release
run: .\script\test.ps1 -Generator ${{ matrix.cmake-generator }} -EnablePIE ${{ matrix.enable-pie }} -BuildType ${{ matrix.build-type }}

- name: Upload test results
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce #v3.1.2
if: failure()
with:
name: test_results_xml
path: ${{github.workspace}}/build/test-results/**/*.xml
name: test_results_xml
path: ${{ github.workspace }}/**/test-results/**/*.xml
34 changes: 15 additions & 19 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,21 @@ jobs:
language: ['cpp', 'python']

steps:
- name: Checkout repository
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab #v3.5.2
with:
fetch-depth: 2
- name: Check out repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3
with:
fetch-depth: 2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@0225834cc549ee0ca93cb085b92954821a145866 #v2.3.5
# with:
# languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@0225834cc549ee0ca93cb085b92954821a145866 #v2.3.5
with:
languages: ${{ matrix.language }}

- name: Bootstrap and Build the Code
run: |
sudo script/bootstrap
script/build
- name: Bootstrap and Build the Code
run: |
sudo script/bootstrap
script/build

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@0225834cc549ee0ca93cb085b92954821a145866 #v2.3.5
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@0225834cc549ee0ca93cb085b92954821a145866 #v2.3.5
6 changes: 3 additions & 3 deletions .github/workflows/fortify-on-demand-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Fortify on Demand Scan

# Controls when the action will run.
on:
# push:
# pull_request:
# push:
# pull_request:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -16,7 +16,7 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab #v3.5.2
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3

- name: Fortify on Demand Scan
# You may pin to the exact commit or the version.
Expand Down
Loading
Loading