👷 Build with VS 2022

This commit is contained in:
Edgar 2021-11-17 16:50:32 +01:00
parent 87febdff3c
commit 8c2d339585
No known key found for this signature in database
GPG Key ID: 17D930BB616061A5
9 changed files with 82 additions and 10 deletions

View File

@ -0,0 +1,9 @@
[settings]
arch=x86_64
arch_build=x86_64
build_type=Debug
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=9
os=Linux
os_build=Linux

View File

@ -0,0 +1,9 @@
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=9
os=Linux
os_build=Linux

View File

@ -0,0 +1,8 @@
[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=Visual Studio
compiler.version=16
build_type=Debug

View File

@ -0,0 +1,8 @@
[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=Visual Studio
compiler.version=16
build_type=Release

View File

@ -0,0 +1,8 @@
[settings]
arch=x86_64
arch_build=x86_64
build_type=Debug
compiler=Visual Studio
compiler.version=17
os=Windows
os_build=Windows

View File

@ -0,0 +1,8 @@
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=Visual Studio
compiler.version=17
os=Windows
os_build=Windows

View File

@ -12,10 +12,26 @@ jobs:
fail-fast: true fail-fast: true
matrix: matrix:
config: config:
- name: Ubuntu # - name: Ubuntu Debug
os: ubuntu-latest # os: ubuntu-latest
- name: Windows # conan-profile: ubuntu-debug
os: windows-2016 # - name: Ubuntu Release
# os: ubuntu-latest
# conan-profile: ubuntu-release
# - name: Windows 2016 Debug
# os: windows-2016
# conan-profile: vs-2016-debug
# - name: Windows 2016 Release
# os: windows-2016
# conan-profile: vs-2016-release
- name: Windows 2022 Debug
os: windows-2022
conan-profile: vs-2022-debug
- name: Windows 2022 Release
os: windows-2022
conan-profile: vs-2022-release
name: ${{ matrix.config.name }} name: ${{ matrix.config.name }}
env: env:
@ -26,13 +42,13 @@ jobs:
- uses: actions/setup-python@v2 - uses: actions/setup-python@v2
- name: Install Conan - name: Install Conan
run: pip install -U conan pyyaml run: |
pip install -U conan pyyaml
conan profile new default --detect
- name: Fix libstdc++11 - name: Fix libstdc++11
if: startsWith(matrix.config.os, 'ubuntu') if: startsWith(matrix.config.os, 'ubuntu')
run: | run: conan profile update settings.compiler.libcxx=libstdc++11 default
conan profile new default --detect
conan profile update settings.compiler.libcxx=libstdc++11 default
- name: Install DX9 SDK - name: Install DX9 SDK
if: startsWith(matrix.config.os, 'windows') if: startsWith(matrix.config.os, 'windows')
@ -46,6 +62,7 @@ jobs:
env: env:
CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_LOGIN_USERNAME }} CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_LOGIN_USERNAME }}
CONAN_PASSWORD: ${{ secrets.CONAN_PASSWORD }} CONAN_PASSWORD: ${{ secrets.CONAN_PASSWORD }}
CONAN_PROFILE: ${{ matrix.config.conan-profile }}
run: | run: |
conan remote add ror-v2 https://artifactory.anotherfoxguy.com/artifactory/api/conan/rigs-of-rods conan remote add ror-v2 https://artifactory.anotherfoxguy.com/artifactory/api/conan/rigs-of-rods
python build.py python build.py

View File

@ -15,6 +15,8 @@ dirs = glob("./*/")
packages = [] packages = []
conan_profile = os.getenv('CONAN_PROFILE')
for p in dirs: for p in dirs:
path = f'{p}/config.yml' path = f'{p}/config.yml'
if not os.path.isfile(path): if not os.path.isfile(path):
@ -30,8 +32,7 @@ for pkg in packages:
system(f"conan export {pkg}") system(f"conan export {pkg}")
for pkg in packages: for pkg in packages:
system(f"conan create {pkg} -s=build_type=Release -k -b=outdated") system(f"conan create {pkg} -pr=\"./.conan-profiles/{conan_profile}\" -k -b=outdated")
system(f"conan create {pkg} -s=build_type=Debug -k -b=outdated")
data = list(filter(lambda k: 'anotherfoxguy' in k, subprocess.run( data = list(filter(lambda k: 'anotherfoxguy' in k, subprocess.run(

View File

@ -1,5 +1,6 @@
from conans import ConanFile, MSBuild, tools, AutoToolsBuildEnvironment from conans import ConanFile, MSBuild, tools, AutoToolsBuildEnvironment
from conans.tools import os_info from conans.tools import os_info
import glob
class freeimageConan(ConanFile): class freeimageConan(ConanFile):
@ -18,6 +19,9 @@ class freeimageConan(ConanFile):
def build(self): def build(self):
if os_info.is_windows: if os_info.is_windows:
for file in glob.glob("./**/*2017.vcxproj", recursive=True):
print(f"Patching winsdk in file {file}")
tools.replace_in_file(file, "10.0.16299.0", "10.0", strict=False)
msbuild = MSBuild(self) msbuild = MSBuild(self)
msbuild.build("FreeImage.2017.sln") msbuild.build("FreeImage.2017.sln")
else: else: