Don't use add_submodule for tess2. #177
Workflow file for this run
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: Build and Test | |
| on: push | |
| jobs: | |
| build-and-test: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-24.04, ubuntu-22.04, | |
| windows-latest, windows-2025, windows-2022, | |
| macos-latest, macos-26, macos-15, macos-14, macos-15-intel] | |
| include: | |
| - coverage: OFF | |
| config: Release | |
| static_lib: ON | |
| - coverage: ON | |
| config: DEBUG | |
| static_lib: OFF | |
| os: ubuntu-latest | |
| - coverage: OFF | |
| config: Release | |
| static_lib: ON | |
| os: ubuntu-latest | |
| fail-fast: false | |
| defaults: | |
| run: | |
| shell: bash | |
| runs-on: ${{ matrix.os }} | |
| name: ${{ matrix.os }} ${{ matrix.config }} coverage=${{ matrix.coverage }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Set Project Name | |
| run: echo "REPOSITORY_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV | |
| - name: Create Build Directory | |
| run: cmake -E make_directory ${{github.workspace}}/build | |
| - name: Install Linux Libraries | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get update && sudo apt-get -y install xorg-dev libgl1-mesa-dev libwayland-dev wayland-protocols extra-cmake-modules libxkbcommon-dev | |
| - name: Get compiler version | |
| run: | | |
| if [ "$RUNNER_OS" == "Linux" ]; then | |
| GCC_VERSION=$(g++ --version | head -n 1) | |
| echo "COMPILER_VERSION=$GCC_VERSION" >> $GITHUB_ENV | |
| elif [ "$RUNNER_OS" == "Windows" ]; then | |
| echo "COMPILER_VERSION=cl.exe" >> $GITHUB_ENV | |
| elif [ "$RUNNER_OS" == "macOS" ]; then | |
| CLANG_VERSION=$(clang --version | head -n 1) | |
| echo "COMPILER_VERSION=$CLANG_VERSION" >> $GITHUB_ENV | |
| fi | |
| - name: Configure CMake | |
| run: cmake -S . -B build -DCMAKE_BUILD_TYPE="${{ matrix.config }}" -D${{ env.REPOSITORY_NAME }}_STATIC_LIB="${{ matrix.static_lib }}" -D${{ env.REPOSITORY_NAME }}_COVERAGE="${{ matrix.coverage }}" -D${{ env.REPOSITORY_NAME }}_BUILD_EXAMPLES="${{ matrix.examples }}" | |
| - name: "Build with compiler: ${{ env.COMPILER_VERSION }}" | |
| run: cmake --build build --config ${{ matrix.config }} | |
| - name: Setup Mesa3D | |
| uses: bigladder/github-actions/setup-mesa3d@main | |
| with: | |
| install-directory: build\test\${{ matrix.config }} | |
| - name: Test | |
| uses: coactions/setup-xvfb@v1 | |
| with: | |
| run: ctest -C ${{ matrix.config }} --output-on-failure | |
| working-directory: build | |
| - name: Code Coverage Analysis | |
| if: matrix.coverage == 'ON' | |
| run: make gcov | |
| working-directory: build | |
| - name: Upload Code Coverage Report | |
| if: matrix.coverage == 'ON' | |
| uses: codecov/codecov-action@v3 |