Hotfix: Windows not closing on Esc & Fixes for Windows asio #171
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
pull_request: | |
release: | |
types: [published] | |
push: | |
# tags: | |
# branches: | |
# - main | |
# - develop | |
env: | |
# Conan cache environment variables | |
CONAN_SYSREQUIRES_MODE: enabled | |
CONAN_USER_HOME: "${{ github.workspace }}/conan-cache" | |
CONAN_USER_HOME_SHORT: "${{ github.workspace }}/conan-cache/short" | |
jobs: | |
Documentation: | |
runs-on: ubuntu-24.04 | |
permissions: | |
contents: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup Cache | |
uses: ./.github/actions/setup_cache | |
with: | |
compiler: gcc-13 | |
build_type: Release | |
doxygen: "ON" | |
- name: Setup Cpp | |
uses: aminya/setup-cpp@v1 | |
with: | |
compiler: gcc-13 | |
cmake: true | |
conan: true | |
doxygen: true | |
- name: Setup Linux | |
run: | | |
sudo apt install -y libglfw3-dev libglfw3 | |
sudo apt install -y flex bison graphviz dia mscgen texlive-base | |
- name: Create default conan profile | |
run: | | |
conan profile detect --force | |
- name: Check tool versions | |
uses: ./.github/actions/check_tool_versions | |
with: | |
documentation: true | |
- name: Installing conan dependencies | |
run: | | |
conan install . --build=missing -s build_type=Release -s compiler.cppstd=17 | |
- name: Configure CMake | |
run: | | |
cmake -B ./build -S. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="build/Release/generators/conan_toolchain.cmake" -DENABLE_MAIN=OFF -DENABLE_TESTING=OFF -DENABLE_DOXYGEN=ON -DLOG_LEVEL=OFF -DENABLE_CLANG_TIDY=OFF -DENABLE_CPPCHECK=OFF -DENABLE_INCLUDE_WHAT_YOU_USE=OFF -DDOC_CHECK_CODE_DOCUMENTATION=YES | |
- name: Build documentation | |
run: | | |
cmake --build ./build --target doc --config Release | |
- name: Archive Documentation | |
if: ${{ github.ref == 'refs/heads/main' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: documentation | |
path: build/doc/html/ | |
if-no-files-found: error | |
Test: | |
runs-on: ${{ matrix.os }} | |
permissions: | |
contents: write | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-24.04 | |
- macos-latest | |
- windows-2022 | |
compiler: | |
# you can specify the version after `-` like "llvm-13.0.0". | |
- apple-clang | |
- llvm-18 | |
- gcc-13 | |
- msvc-2022 | |
build_type: | |
- Release | |
log-level: | |
- "DEBUG" | |
exclude: | |
- os: ubuntu-24.04 | |
compiler: msvc-2022 | |
- os: ubuntu-24.04 | |
compiler: apple-clang | |
- os: macos-latest | |
compiler: gcc-13 | |
- os: macos-latest | |
compiler: msvc-2022 | |
- os: macos-latest | |
compiler: llvm-18 | |
- os: windows-2022 | |
compiler: gcc-13 | |
- os: windows-2022 | |
compiler: llvm-18 | |
- os: windows-2022 | |
compiler: apple-clang | |
include: | |
- os: ubuntu-24.04 # For coverage generation | |
compiler: gcc-13 | |
build_type: Debug | |
log-level: "DEBUG" | |
- os: ubuntu-24.04 | |
compiler: gcc-13 | |
build_type: Debug | |
log-level: "OFF" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup Cache | |
uses: ./.github/actions/setup_cache | |
with: | |
compiler: ${{ matrix.compiler }} | |
build_type: ${{ matrix.build_type }} | |
- name: Setup Cpp | |
uses: aminya/setup-cpp@v1 | |
with: | |
compiler: ${{ matrix.compiler != 'apple-clang' && matrix.compiler || 'appleclang' }} | |
vcvarsall: ${{ contains(matrix.os, 'windows' )}} | |
cmake: true | |
brew: true | |
conan: true | |
gcovr: "8.2" | |
- name: Setup MacOS | |
if: ${{ runner.os == 'macOS' }} | |
run: | | |
brew install glfw | |
- name: Setup Linux | |
if: ${{ runner.os == 'Linux' }} | |
run: | | |
sudo apt install -y libglfw3-dev libglfw3 | |
- name: Create default conan profile | |
run: | | |
conan profile detect --force | |
- name: Check tool versions | |
uses: ./.github/actions/check_tool_versions | |
with: | |
coverage: true | |
compiler: ${{ matrix.compiler }} | |
- name: Installing conan dependencies | |
run: | | |
conan install . --build=missing -s build_type=${{matrix.build_type}} -s compiler.cppstd=17 | |
- name: Configure CMake | |
if: ${{ runner.os != 'Windows' }} | |
run: | | |
cmake -S . -B ./build -DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}} -DCMAKE_TOOLCHAIN_FILE="build/${{matrix.build_type}}/generators/conan_toolchain.cmake" -DENABLE_MAIN=TRUE -DENABLE_TESTING=TRUE -DENABLE_COVERAGE:BOOL=${{ runner.os == 'Linux' && matrix.build_type == 'Debug' && startsWith(matrix.compiler, 'gcc') }} -DENABLE_DOXYGEN=OFF -DLOG_LEVEL:STRING=${{matrix.log-level}} -DWARNINGS_AS_ERRORS:BOOL=${{ !contains(matrix.os, 'windows' )}} -DENABLE_CPPCHECK=OFF -DENABLE_CLANG_TIDY=OFF -DENABLE_INCLUDE_WHAT_YOU_USE=OFF | |
- name: Configure CMake | |
if: ${{ runner.os == 'Windows' }} | |
run: | | |
cmake -S . -B ./build -DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}} -DCMAKE_TOOLCHAIN_FILE="build/generators/conan_toolchain.cmake" -DENABLE_MAIN=TRUE -DENABLE_TESTING=TRUE -DENABLE_COVERAGE:BOOL=OFF -DENABLE_DOXYGEN=OFF -DLOG_LEVEL:STRING=${{matrix.log-level}} -DWARNINGS_AS_ERRORS:BOOL=${{ !contains(matrix.os, 'windows' )}} -DENABLE_CPPCHECK=OFF -DENABLE_CLANG_TIDY=OFF -DENABLE_INCLUDE_WHAT_YOU_USE=OFF | |
- name: Build | |
run: | | |
cmake --build ./build --config ${{matrix.build_type}} | |
- name: Archive executable | |
if: ${{ matrix.build_type == 'Release' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: instinct-${{runner.os}}-${{runner.arch}}-${{matrix.compiler}} | |
path: | | |
build/bin/Release/instinct* | |
!build/bin/Release/instinct.exp | |
!build/bin/Release/instinct.lib | |
- name: Test | |
if: ${{ matrix.build_type == 'Release' || startsWith(matrix.compiler, 'gcc') }} | |
working-directory: ./build | |
run: | | |
ctest -C ${{matrix.build_type}} --output-on-failure --timeout 600 | |
- name: Upload test results on failure | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-logs | |
path: test/logs | |
- name: Coverage | |
if: ${{ runner.os == 'Linux' && matrix.build_type == 'Debug' && startsWith(matrix.compiler, 'gcc') && matrix.log-level == 'DEBUG' }} | |
run: | | |
mkdir -p build/coverage | |
gcovr --config doc/coverage/gcovr.cfg | |
- name: Publish to codecov | |
if: ${{ runner.os == 'Linux' && matrix.build_type == 'Debug' && startsWith(matrix.compiler, 'gcc') && matrix.log-level == 'DEBUG' }} | |
uses: codecov/codecov-action@v4 | |
with: | |
flags: ${{ runner.os }} | |
name: ${{ runner.os }}-coverage | |
files: ./build/cobertura.xml | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Archive Coverage Report | |
if: ${{ runner.os == 'Linux' && matrix.build_type == 'Debug' && startsWith(matrix.compiler, 'gcc') && matrix.log-level == 'DEBUG' && github.ref == 'refs/heads/main' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-report | |
path: build/coverage/ | |
if-no-files-found: error | |
Pages: | |
runs-on: ubuntu-24.04 | |
needs: [Documentation, Test] | |
if: ${{ github.ref == 'refs/heads/main' }} | |
permissions: | |
contents: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
steps: | |
- name: Download documentation | |
uses: actions/download-artifact@v4 | |
with: | |
name: documentation | |
path: public/ | |
- name: Download coverage report | |
uses: actions/download-artifact@v4 | |
with: | |
name: coverage-report | |
path: public/coverage/ | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public |