Skip to content

Commit

Permalink
🐛 Fixed build with latest conan version
Browse files Browse the repository at this point in the history
  • Loading branch information
AnotherFoxGuy committed Sep 12, 2023
1 parent 022250f commit 9f62ec3
Show file tree
Hide file tree
Showing 15 changed files with 158 additions and 209 deletions.
101 changes: 101 additions & 0 deletions .github/workflows/game.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Build

on: [push, pull_request]

jobs:
build-msvc:
name: Windows
env:
BUILD_TOOLS_PATH: C:\Program Files\Conan\conan
CONAN_USER_HOME_SHORT: None
runs-on: windows-latest
steps:
- run: echo $env:BUILD_TOOLS_PATH | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- uses: actions/checkout@v3

- name: Cache conan
uses: actions/cache@v3
with:
key: conan-win-${{ hashFiles('conanfile.py') }}
path: ~/.conan2/

- name: Install dependencies
run: choco install conan ninja -y

- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1.12.1

- name: Configure
run: |
conan install . -b missing -pr:b=tools/conan-profiles/vs-22-release-ninja -pr=tools/conan-profiles/vs-22-release-ninja
cmake --preset conan-release
- name: Build
run: ninja

- name: Clean Conan pkgs
run: conan cache clean "*" -sbd

build-gcc:
name: Linux
env:
CONAN_SYSREQUIRES_MODE: "enabled"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Cache conan
uses: actions/cache@v3
with:
key: conan-linux-${{ hashFiles('conanfile.py') }}
path: ~/.conan2/

- name: Install dependencies
run: |
sudo apt-get update
curl "https://raw.githubusercontent.com/AnotherFoxGuy/ci-scripts/main/install-cmake.sh" | sudo bash
curl "https://raw.githubusercontent.com/AnotherFoxGuy/ci-scripts/main/install-conan.sh" | sudo bash
sudo apt-get -y install ninja-build
- name: Configure
run: |
conan profile detect --force
echo "tools.system.package_manager:mode = install" > ~/.conan2/global.conf
echo "tools.system.package_manager:sudo = True" >> ~/.conan2/global.conf
conan install . -s build_type=Release -b missing -pr:b=default -c tools.cmake.cmaketoolchain:generator="Ninja"
cmake --preset conan-release
- name: Build
run: ninja

- name: Clean Conan pkgs
run: conan cache clean "*" -sbd

build-appleclang:
name: MacOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v3

- name: Cache conan
uses: actions/cache@v3
with:
key: conan-mac-${{ hashFiles('conanfile.py') }}
path: ~/.conan2/

- name: Install dependencies
run: brew install conan ninja

- name: Configure
run: |
conan profile detect --force
conan install . -s build_type=Release -b missing -pr:b=default -c tools.cmake.cmaketoolchain:generator="Ninja"
cmake --preset conan-release
shell: bash

- name: Build
run: ninja

- name: Clean Conan pkgs
run: conan cache clean "*" -sbd
137 changes: 0 additions & 137 deletions .github/workflows/main.yml

This file was deleted.

5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,13 @@ CMakeCache.txt
CMakeFiles/
Makefile
cmake_install.cmake
CMakeUserPresets.json
cmake-build-*/

# Files Intellij CLion
.idea/

# VS Code Workspace Settings folder
.vscode/
/cmake-build-*/

_build/
14 changes: 14 additions & 0 deletions conanfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import os
from conan import ConanFile
from conan.tools.files import copy


class OpenTESArena(ConanFile):
name = "OpenTESArena"
settings = "os", "compiler", "build_type", "arch"
generators = "CMakeToolchain", "CMakeDeps"

def requirements(self):
self.requires("openal-soft/1.22.2")
self.requires("sdl/2.26.1")
self.requires("wildmidi/0.4.5")
14 changes: 0 additions & 14 deletions conanfile.txt

This file was deleted.

11 changes: 4 additions & 7 deletions tools/conan-profiles/vs-19-debug
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=Visual Studio
compiler.version=16
compiler=msvc
compiler.version=192
compiler.runtime=dynamic
compiler.runtime_type=Debug
build_type=Debug
[options]
[build_requires]
[env]
8 changes: 4 additions & 4 deletions tools/conan-profiles/vs-19-debug-ninja
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=Visual Studio
compiler.version=16
compiler=msvc
compiler.version=192
compiler.runtime=dynamic
compiler.runtime_type=Debug
build_type=Debug
[conf]
tools.cmake.cmaketoolchain:generator=Ninja
11 changes: 4 additions & 7 deletions tools/conan-profiles/vs-19-release
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=Visual Studio
compiler.version=16
compiler=msvc
compiler.version=192
compiler.runtime=dynamic
compiler.runtime_type=Release
build_type=Release
[options]
[build_requires]
[env]
8 changes: 4 additions & 4 deletions tools/conan-profiles/vs-19-release-ninja
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=Visual Studio
compiler.version=16
compiler=msvc
compiler.version=192
compiler.runtime=dynamic
compiler.runtime_type=Release
build_type=Release
[conf]
tools.cmake.cmaketoolchain:generator=Ninja
5 changes: 1 addition & 4 deletions tools/conan-profiles/vs-19-relwithdebinfo
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,4 @@ arch=x86_64
arch_build=x86_64
compiler=Visual Studio
compiler.version=16
build_type=RelWithDebInfo
[options]
[build_requires]
[env]
build_type=RelWithDebInfo
13 changes: 5 additions & 8 deletions tools/conan-profiles/vs-22-debug
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=Visual Studio
compiler.version=17
build_type=Debug
[options]
[build_requires]
[env]
compiler=msvc
compiler.version=193
compiler.runtime=dynamic
compiler.runtime_type=Debug
build_type=Debug
8 changes: 4 additions & 4 deletions tools/conan-profiles/vs-22-debug-ninja
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=Visual Studio
compiler.version=17
compiler=msvc
compiler.version=193
compiler.runtime=dynamic
compiler.runtime_type=Debug
build_type=Debug
[conf]
tools.cmake.cmaketoolchain:generator=Ninja
Loading

0 comments on commit 9f62ec3

Please sign in to comment.