Skip to content

fixed [[nodiscard]] typo (#240) #69

fixed [[nodiscard]] typo (#240)

fixed [[nodiscard]] typo (#240) #69

Workflow file for this run

#
# Copyright 2023 Antony Peacock
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
# persons to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
name: CMake
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
name: ${{ matrix.settings.name }} ${{ matrix.configuration }}
runs-on: ${{ matrix.settings.os }}
strategy:
matrix:
configuration: [ "Release", "Debug" ]
settings:
- {
name: "Ubuntu GCC-12",
os: ubuntu-latest,
compiler: { type: GCC, version: 12, conan: "gcc", cc: "gcc-12", cxx: "g++-12", std: 20 },
lib: "libstdc++11"
}
- {
name: "Ubuntu Clang-14 + libc++",
os: ubuntu-latest,
compiler:
{
type: CLANG,
version: 14,
conan: "clang",
cc: "clang-14",
cxx: "clang++-14",
std: 20,
toolchain: "clang-libc++.cmake"
},
lib: "libc++",
}
- {
name: "Ubuntu Clang-15 + libc++",
os: ubuntu-latest,
compiler:
{
type: CLANG,
version: 15,
conan: "clang",
cc: "clang-15",
cxx: "clang++-15",
std: 20,
toolchain: "clang-libc++.cmake"
},
lib: "libc++",
}
- {
name: "Visual Studio 2019",
os: windows-latest,
compiler: { type: VISUAL, version: 16, conan: "mscv", cc: "cl", cxx: "cl", std: 20 },
}
- {
name: "MacOS Apple Clang 14",
os: macos-12,
compiler:
{
type: APPLE_CLANG,
version: "14.0",
conan: "apple-clang",
cc: "clang",
cxx: "clang++",
std: 20
},
lib: "libc++",
}
steps:
- uses: actions/[email protected]
- name: Cache Conan data
uses: actions/[email protected]
env:
cache-name: cache-conan-data
with:
path: ${{github.workspace}}/.conan2/p
key: ${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-${{ matrix.settings.lib }}
restore-keys: |
${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-${{ matrix.settings.compiler.version }}-
${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}-${{ matrix.configuration }}-${{ matrix.settings.compiler.conan }}-
${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}-${{ matrix.configuration }}-
${{ hashFiles('**/conanfile.py') }}-build-${{ matrix.settings.os }}-
# - uses: lhotari/action-upterm@v1
# with:
# ## limits ssh access and adds the ssh public key for the user which triggered the workflow
# limit-access-to-actor: true
## limits ssh access and adds the ssh public keys of the listed GitHub users
# limit-access-to-users: twon
- name: Add msbuild to PATH
if: matrix.settings.os == 'windows-latest'
uses: microsoft/[email protected]
with:
vs-version: "16.5"
- name: Install Latest GCC
if: matrix.settings.compiler.type == 'GCC'
uses: egor-tensin/[email protected]
with:
version: ${{ matrix.settings.compiler.version }}
platform: x64
- name: Install Latest libstdC++11
if: matrix.settings.compiler.type == 'CLANG' && matrix.settings.lib == 'libstdc++11'
uses: egor-tensin/[email protected]
with:
version: 12
platform: x64
- name: Install Clang
if: matrix.settings.compiler.type == 'CLANG'
uses: egor-tensin/[email protected]
with:
version: ${{ matrix.settings.compiler.version }}
platform: x64
- name: Install Libc++
if: matrix.settings.compiler.type == 'CLANG' && matrix.settings.lib == 'libc++'
shell: bash
run: |
sudo apt install -y libc++-${{ matrix.settings.compiler.version }}-dev libc++abi-${{ matrix.settings.compiler.version }}-dev libunwind-${{ matrix.settings.compiler.version }}-dev
- name: Select Xcode ${{matrix.settings.compiler.version}}
if: matrix.settings.os == 'macos-latest'
uses: maxim-lobanov/[email protected]
with:
xcode-version: '${{matrix.settings.compiler.version}}'
- name: Install Linux System Packages
if: contains( matrix.settings.os, 'ubuntu')
run: |
sudo apt-get -y install libgl-dev
sudo apt-get -y install libopengl-dev
sudo apt-get -y install libglu1-mesa-dev
- name: Set up Python
uses: actions/[email protected]
with:
python-version: '3.11'
- name: Install Python requirements
run: |
pip install -r ./requirements.txt
- name: Configure Conan
shell: bash
run: |
conan profile detect --force
sed -i.backup '/^\[settings\]$/,/^\[/ s/^build_type=.*/build_type=${{ matrix.configuration }}/' .conan2/profiles/default
sed -i.backup '/^\[settings\]$/,/^\[/ s/^compiler.cppstd=.*/compiler.cppstd=${{ matrix.settings.compiler.std }}/' .conan2/profiles/default
if [[ "${{ matrix.settings.compiler.type }}" == "GCC" || "${{ matrix.settings.compiler.type }}" == "CLANG" ]]; then
sed -i.backup '/^\[settings\]$/,/^\[/ s/^compiler=.*/compiler=${{ matrix.settings.compiler.conan }}/' .conan2/profiles/default
sed -i.backup '/^\[settings\]$/,/^\[/ s/^compiler.version=.*/compiler.version=${{ matrix.settings.compiler.version }}/' .conan2/profiles/default
sed -i.backup '/^\[settings\]$/,/^\[/ s/^compiler.libcxx=.*/compiler.libcxx=${{ matrix.settings.lib }}/' .conan2/profiles/default
sed -i.backup '1a mold*:build_type=Release' .conan2/profiles/default
sed -i.backup '1a onetbb*:build_type=Release' .conan2/profiles/default
sed -i.backup '1a mold*:compiler.libcxx=libstdc++11' .conan2/profiles/default
fi
conan profile show -pr default
- name: Configure Install
working-directory: ${{github.workspace}}
shell: bash
run: |
conan install "${{github.workspace}}" --build missing -pr:b default -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" --build catch2/3.4.0
- name: Configure Conan Build
if: matrix.settings.os == 'windows-latest'
shell: cmd
working-directory: ${{github.workspace}}
run: |
call build\generators\conanvcvars.bat
call build\generators\conanbuild.bat
- name: Configure Conan Build
if: matrix.settings.os != 'windows-latest'
shell: bash
working-directory: ${{github.workspace}}
run: |
source build/generators/conanbuild.sh
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# timeout-minutes: 15
# with:
# detached: true
- name: Configure CMake
if: matrix.settings.os == 'windows-latest'
shell: cmd
run: |
cmake --version
call build\generators\conanbuild.bat
cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON
- name: Configure CMake
if: matrix.settings.os != 'windows-latest'
shell: bash
run: |
source build/generators/conanbuild.sh
cmake --preset conan-default -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_BEHAVIOUR_SANITIZER=ON
- name: Conan Preset
shell: bash
run: echo "CONAN_PRESET=conan-$(echo ${{matrix.configuration}} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Build
if: matrix.settings.os == 'windows-latest'
shell: cmd
run: |
call build\generators\conanbuild.bat
cmake --build --preset ${{ env.CONAN_PRESET }}
- name: Build
if: matrix.settings.os != 'windows-latest'
shell: bash
run: |
source build/generators/conanbuild.sh
cmake --build --preset ${{ env.CONAN_PRESET }}
- name: Test
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --preset ${{ env.CONAN_PRESET }} -LE GPU # Exclude GPU tests as Github actions do not have the supported hardware/drivers