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

0.8.x Build Troubleshooting Late November Early December 2023 SGT #820

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
ef5c67e
Adding CMakePresets.json and vcpkg-configuration.json; bumping Vega S…
stephengtuggy Dec 1, 2023
37b1d9a
Replace build.ps1 with version from 'master' branch
stephengtuggy Dec 2, 2023
c4a236c
Update GitHub Actions workflow files
stephengtuggy Dec 2, 2023
f22d4a9
Troubleshooting Boost_Python on Windows
stephengtuggy Dec 2, 2023
6076c56
pinning Python version to 3.11 on macOS and Windows
stephengtuggy Dec 2, 2023
3685bcd
macos-ci.yml: ...
stephengtuggy Dec 2, 2023
f2fb9e3
python-version 3.12
stephengtuggy Dec 2, 2023
fae55b4
macos-ci.yml: Don't continue-on-error any longer
stephengtuggy Dec 2, 2023
5368ae1
Set check-latest param of setup-python to true
stephengtuggy Dec 2, 2023
8fa3e63
macos-ci.yml: `brew install boost` explicitly
stephengtuggy Dec 2, 2023
306246e
macos-ci.yml: ...
stephengtuggy Dec 2, 2023
296dbbc
...
stephengtuggy Dec 2, 2023
b752a68
Add brew-install-for-cmake.sh; start using it in macos-ci.yml
stephengtuggy Dec 3, 2023
7f264f5
...
stephengtuggy Dec 3, 2023
fe5906a
brew-install-for-cmake.sh: The --keg-only brew option does not exist.…
stephengtuggy Dec 3, 2023
591d917
Continuing work on macos-ci.yml. Also refactoring CMakeLists.txt a bit
stephengtuggy Dec 3, 2023
ef7d13b
...
stephengtuggy Dec 3, 2023
e6f6504
...
stephengtuggy Dec 3, 2023
c9667d5
...
stephengtuggy Dec 3, 2023
93ef551
...
stephengtuggy Dec 3, 2023
5afe5d2
...
stephengtuggy Dec 3, 2023
c62c8ac
...
stephengtuggy Dec 3, 2023
ca1c422
...
stephengtuggy Dec 3, 2023
115ecf0
...
stephengtuggy Dec 3, 2023
cf3f6c0
forgot about USE_PYTHON_3
stephengtuggy Dec 3, 2023
e80f1cf
more on USE_PYTHON_3
stephengtuggy Dec 3, 2023
e6e138a
...
stephengtuggy Dec 3, 2023
81e8c22
CMakeLists.txt: So THAT's why PYTHON_VERSION_MAJOR and PYTHON_VERSION…
stephengtuggy Dec 3, 2023
949efb3
CMakeLists.txt: More on PYTHON_VERSION_MAJOR and PYTHON_VERSION_MINOR
stephengtuggy Dec 3, 2023
56b6227
CMakeLists.txt: More on PYTHON_VERSION_MAJOR and PYTHON_VERSION_MINOR
stephengtuggy Dec 3, 2023
0f052ac
CMakeLists.txt: More on PYTHON_VERSION_MAJOR and PYTHON_VERSION_MINOR
stephengtuggy Dec 3, 2023
def5b9e
CMakeLists.txt: More on PYTHON_VERSION_MAJOR and PYTHON_VERSION_MINOR
stephengtuggy Dec 3, 2023
f3e88df
Various changes to 6 different copies of CMakeLists.txt in 6 differen…
stephengtuggy Dec 3, 2023
2567e33
engine/CMakeLists.txt: Handle Position Independent Code better on CMa…
stephengtuggy Dec 3, 2023
7f25a80
gnuhash.h, SharedPool.h: Fix build errors under VS2022 (hopefully). F…
stephengtuggy Dec 3, 2023
7565ead
More fixes
stephengtuggy Dec 3, 2023
1d5d022
macos-ci.yml: Don't symlink openssl@3 in place of the Apple-provided …
stephengtuggy Dec 4, 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
112 changes: 70 additions & 42 deletions .github/workflows/Windows-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,59 +16,87 @@ jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: windows-2019
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
include:
- os: windows-2019
cmake-generator: VS2019Win64
enable-pie: 1
build-type: Release
- os: windows-2022
cmake-generator: VS2022Win64
enable-pie: 1
build-type: Debug

env:
buildDir: '${{ github.workspace }}/build/'
PYTHONHOME: '${{ github.workspace }}/v/packages/python3_x64-windows/tools/python3'
# 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:
# 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 || '');

- name: Set up Python
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 #v4.7.1
with:
python-version: '3.11.5'
check-latest: true

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

- 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@4865386b66955d11be0abf8c112d0230023e742a #v3.27.9
with:
vcpkgDirectory: '${{ github.workspace }}/v'
setupOnly: true
vcpkgGitCommitId: '49a30e9db17a8edf7c2809940ee2036746b1b982'
vcpkgTriplet: 'x64-windows'
appendedCacheKey: ${{ hashFiles( '**/vcpkg.json' ) }}
additionalCachedPaths: ${{ env.buildDir }}/vcpkg_installed
cmakeVersion: 3.27.9
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: VS16Win64
# 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: -DUSE_PYTHON_3=ON
# 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: |
mkdir bin
xcopy /y .\build\Release\*.* .\bin\
xcopy /y .\build\objconv\Release\*.* .\bin\
git clone https://github.com/vegastrike/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 }}
46 changes: 28 additions & 18 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,31 @@ jobs:
language: ['cpp', 'python']

steps:
- name: Checkout 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 }}

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

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@0225834cc549ee0ca93cb085b92954821a145866 #v2.3.5
- name: Check out repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
with:
fetch-depth: 2

- name: Download benchmark bundle
env:
GH_TOKEN: ${{ github.token }}
# download the latest version
run: |
gh release download -R github/codeql-action --pattern 'codeql-bundle.tar.gz'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@4b6aa0b07da05d6e43d0e5f9c8596a6532ce1c85 #v2.15.3
with:
languages: ${{ matrix.language }}
tools: codeql-bundle.tar.gz

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

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@4b6aa0b07da05d6e43d0e5f9c8596a6532ce1c85 #v2.15.3
with:
tools: codeql-bundle.tar.gz
5 changes: 2 additions & 3 deletions .github/workflows/fortify-on-demand-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ 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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1

- name: Fortify on Demand Scan
# You may pin to the exact commit or the version.
# uses: fortify/gha-setup-fod-uploader@636f3c3a14aec1747eec5242a02c6349e4f3cce6
uses: fortify/[email protected]
uses: fortify/gha-setup-fod-uploader@16e5036c084b26cee63cb0c38cfc2101cc9fd13d #v1.1.3
with:
# FoDUploader version to use
version: latest
Loading
Loading