c++2b #78
This file contains hidden or 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: [push, pull_request] | |
| env: | |
| # Path to the solution file relative to the root of the project. | |
| SOLUTION_FILE_PATH: . | |
| # Configuration type to build. | |
| # You can convert this to a build matrix if you need coverage of multiple configuration types. | |
| # https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | |
| BUILD_CONFIGURATION: Release | |
| jobs: | |
| build: | |
| name: Build & test on ${{ matrix.os }} with ${{ matrix.compiler }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v3 | |
| - name: Windows - setup MSBuild | |
| if: startsWith(matrix.os, 'windows') | |
| uses: microsoft/[email protected] | |
| - name: Install dependencies | |
| run: git clone https://github.com/VioletGiraffe/cpp-template-utils | |
| - name: Windows | |
| if: startsWith(matrix.os, 'windows') | |
| shell: cmd | |
| run: | | |
| %Qt5_DIR%\bin\qmake.exe -v | |
| dir "C:\Program Files (x86)\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC" | |
| pushd tests | |
| call "%programfiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 | |
| %Qt5_DIR%\bin\qmake.exe -tp vc -r | |
| msbuild /t:Build /p:Configuration=Release;PlatformToolset=v143 | |
| popd | |
| - name: Mac | |
| if: startsWith(matrix.os, 'macos') | |
| working-directory: ${{env.GITHUB_WORKSPACE}} | |
| run: | | |
| clang --version | |
| pushd tests | |
| $Qt5_DIR/bin/qmake -r -config release CONFIG+=release "DEFINES+=NDEBUG" | |
| make -j | |
| popd | |
| - name: Linux | |
| if: startsWith(matrix.os, 'ubuntu') | |
| working-directory: ${{env.GITHUB_WORKSPACE}} | |
| run: | | |
| sudo apt update -y; sudo apt install -qq gcc-12 g++-12 #required for move_only_function | |
| sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 50 | |
| sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 50 | |
| g++ --version | |
| ls | |
| pushd tests | |
| $Qt5_DIR/bin/qmake -r -config release CONFIG+=release "DEFINES+=NDEBUG" | |
| make -j | |
| popd | |
| - name: Test run | |
| if: startsWith(matrix.os, 'macos') | |
| run: ./tests/bin/test-app.app/Contents/MacOS/tests | |
| - name: Test run | |
| if: startsWith(matrix.os, 'ubuntu') | |
| run: ./tests/bin/test-app | |
| - name: Test run | |
| if: startsWith(matrix.os, 'windows') | |
| run: ./tests/bin/test-app.exe |