cleanup(WORKSPACE.bazel)!: in favor of bzlmod #73
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 | |
on: [push] | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ubuntu-latest, macos-latest] | |
name: ${{ matrix.platform }} | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v4 | |
if: runner.os == 'Linux' | |
- name: Create Build Environment | |
run: cmake -E make_directory ${{runner.workspace}}/bld | |
- name: Configure CMake | |
# Use a bash shell so we can use the same syntax for environment variable | |
# access regardless of the host operating system | |
shell: bash | |
working-directory: ${{runner.workspace}}/bld | |
# Note the current convention is to use the -S and -B options here to specify source | |
# and build directories, but this is only available with CMake 3.13 and higher. | |
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12 | |
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE | |
- name: Build | |
working-directory: ${{runner.workspace}}/bld | |
shell: bash | |
run: cmake --build . --config $BUILD_TYPE | |
- name: Test | |
working-directory: ${{runner.workspace}}/bld | |
shell: bash | |
run: ctest --timeout 300 -C $BUILD_TYPE | |
- name: Upload Test Results | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: Testing-${{ matrix.platform }} | |
path: ${{runner.workspace}}/bld/Testing/ | |
configure_with_old_cmake: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: CMake Version Set | |
uses: jwlawson/actions-setup-cmake@v2 | |
with: | |
cmake-version: '3.14' | |
- name: CMake Version Get | |
run: cmake --version | |
- name: Create Build Environment | |
run: cmake -E make_directory ${{runner.workspace}}/bld | |
- name: Configure | |
shell: bash | |
working-directory: ${{runner.workspace}}/bld | |
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE |