Print GCC version #17
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: CMake build and tests | |
on: [ push ] | |
# TODO: just use CMake presets? | |
jobs: | |
build: | |
name: ${{ matrix.os }}-${{ matrix.build_type }}-${{ github.workflow }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
build_type: [ Debug, Release ] | |
os: [ ubuntu-latest, windows-latest ] | |
include: | |
- os: windows-latest | |
vcpkg_commit_id: 'fe1e9f508ee13ed3d0a7d318beac7efe1ec4f9d7' | |
umb_include_meta: OFF # TODO: fix later. Boost Hana issues on MSVC. | |
- os: ubuntu-latest | |
compiler: gcc | |
gcc: 13 | |
vcpkg_commit_id: 'fe1e9f508ee13ed3d0a7d318beac7efe1ec4f9d7' | |
umb_include_meta: ON | |
steps: | |
- name: install apt dependencies | |
uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: autoconf-archive | |
if: matrix.os == 'ubuntu-latest' | |
- name: print GCC version | |
shell: bash | |
run: gcc --version | |
if: matrix.os == 'ubuntu-latest' | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Create Build Environment | |
run: cmake -E make_directory ${{github.workspace}}/build | |
- name: Setup vcpkg | |
uses: lukka/run-vcpkg@main | |
id: runvcpkg | |
with: | |
vcpkgDirectory: '${{ runner.workspace }}/build/vcpkg' | |
vcpkgGitCommitId: '${{ matrix.vcpkg_commit_id }}' | |
# Run vcpkg with the command specified by the `runVcpkgFormatString` input. | |
runVcpkgInstall: true | |
vcpkgJsonGlob: '**/vcpkg.json' | |
- name: Print output of run-vcpkg's action. | |
run: echo "root='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}', triplet='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_DEFAULT_TRIPLET_OUT }}' " | |
- name: Configure CMake | |
shell: bash | |
working-directory: ${{github.workspace}}/build | |
run: cmake $GITHUB_WORKSPACE | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON | |
-DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake | |
-DBUILD_TESTS=ON | |
-DUMB_INCLUDE_META={{ matrix.umb_include_meta }} | |
- name: Build | |
shell: bash | |
working-directory: ${{github.workspace}}/build | |
run: cmake --build . --config ${{ matrix.build_type }} | |
- name: Test | |
shell: bash | |
working-directory: ${{github.workspace}}/build | |
run: ctest -C ${{ matrix.build_type }} |