Skip to content

Build with C++17 also when building SmartBody. #70

Build with C++17 also when building SmartBody.

Build with C++17 also when building SmartBody. #70

Workflow file for this run

name: Build all
on:
workflow_dispatch:
push:
branches:
- master
env:
CONAN_REVISIONS_ENABLED: 1
CONAN_SCM_TO_CONANDATA: 1
CONAN_SYSREQUIRES_MODE: enabled
CONAN_PASSWORD: ${{ secrets.CONAN_PASSWORD }}
CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_LOGIN_USERNAME }}
PROFILE_CONAN: conan-release
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022 ]
steps:
- name: Config DirectX
if: runner.os == 'Windows'
run: echo "DXSDK_DIR=$HOME/cache/" >> $GITHUB_ENV
shell: bash
- name: Cache
if: runner.os == 'Windows'
id: cache
uses: actions/cache@v3
with:
path: ~/cache
key: cache
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
- name: Install Conan
shell: bash
run: |
pip install -r .github/workflows/requirements.txt
conan profile detect
conan remote add worldforge https://artifactory.ogenvik.org/artifactory/api/conan/conan
- name: Install needed Linux system packages
if: runner.os == 'Linux'
shell: bash
# We need GLU installed on Ubuntu 22.04 (as it requires opengl.pc which is provided by libopengl-dev,
# but isn't a dependency to libglu-dev)
run: |
sudo apt install libopengl-dev
- name: Install needed Windows system packages
if: steps.cache.outputs.cache-hit != 'true' && runner.os == 'Windows'
run: |
curl -L https://download.microsoft.com/download/a/e/7/ae743f1f-632b-4809-87a9-aa1bb3458e31/DXSDK_Jun10.exe -o _DX2010_.exe
7z x _DX2010_.exe DXSDK/Include -o_DX2010_
7z x _DX2010_.exe DXSDK/Lib/x86 -o_DX2010_
mv _DX2010_/DXSDK $HOME/cache
rm -fR _DX*_ _DX*_.exe
shell: bash
- name: Have Conan install packages
shell: bash
run: |
./tools/conan/build_all.sh
if [[ x"$CONAN_PASSWORD" != "x" && x"$CONAN_LOGIN_USERNAME" != "x" ]]; then
conan remote login worldforge $CONAN_LOGIN_USERNAME -p $CONAN_PASSWORD
conan upload "*" -r worldforge -c
fi
conan install . -pr default --build=missing --update -c tools.system.package_manager:mode=install -c tools.system.package_manager:sudo=True -s compiler.cppstd=17
if [[ x"$CONAN_PASSWORD" != "x" && x"$CONAN_LOGIN_USERNAME" != "x" ]]; then
conan remote login worldforge $CONAN_LOGIN_USERNAME -p $CONAN_PASSWORD
conan upload "*" -r worldforge -c
fi
- name: Configure CMake
shell: bash
run: cmake --preset conan-release -DCMAKE_INSTALL_PREFIX=./cmake-install -DBUILD_TESTING=ON
- name: Build
shell: bash
run: cmake --build --preset $PROFILE_CONAN