[pre-commit.ci] pre-commit autoupdate #227
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: Tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
tags: | |
- v* | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build and test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-latest, macos-latest, ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install OpenSSL (Windows) | |
if: runner.os == 'Windows' | |
run: choco install openssl | |
- name: CMake Configure | |
shell: bash | |
run: | | |
if [[ "${{ runner.os }}" == "macOS" ]]; then export OPENSSL_ROOT_DIR=/usr/local/opt/openssl; fi | |
cmake -B build -S . -DGMLC_NETWORKING_ENABLE_ENCRYPTION=ON | |
- name: Build | |
run: cmake --build build --parallel | |
- name: Run unit tests | |
run: ctest --test-dir build --output-on-failure | |
# Test running CMake configure step with a variety of CMake versions | |
cmake-config: | |
name: CMake config check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check CMake 3.10 | |
uses: ./.github/actions/quick_cmake | |
with: | |
cmake-version: "3.10" | |
if: success() || failure() | |
- name: Check CMake 3.11 | |
uses: ./.github/actions/quick_cmake | |
with: | |
cmake-version: "3.11" | |
if: success() || failure() | |
- name: Check CMake 3.12 | |
uses: ./.github/actions/quick_cmake | |
with: | |
cmake-version: "3.12" | |
if: success() || failure() | |
- name: Check CMake 3.13 | |
uses: ./.github/actions/quick_cmake | |
with: | |
cmake-version: "3.13" | |
if: success() || failure() | |
- name: Check CMake 3.14 | |
uses: ./.github/actions/quick_cmake | |
with: | |
cmake-version: "3.14" | |
if: success() || failure() | |
- name: Check CMake 3.15 | |
uses: ./.github/actions/quick_cmake | |
with: | |
cmake-version: "3.15" | |
if: success() || failure() | |
- name: Check CMake 3.16 | |
uses: ./.github/actions/quick_cmake | |
with: | |
cmake-version: "3.16" | |
if: success() || failure() | |
- name: Check CMake 3.17 | |
uses: ./.github/actions/quick_cmake | |
with: | |
cmake-version: "3.17" | |
if: success() || failure() | |
- name: Check CMake 3.18 | |
uses: ./.github/actions/quick_cmake | |
with: | |
cmake-version: "3.18" | |
if: success() || failure() | |
- name: Check CMake 3.19 | |
uses: ./.github/actions/quick_cmake | |
with: | |
cmake-version: "3.19" | |
if: success() || failure() | |
- name: Check CMake 3.20 | |
uses: ./.github/actions/quick_cmake | |
with: | |
cmake-version: "3.20" | |
if: success() || failure() | |
- name: Check CMake 3.21 | |
uses: ./.github/actions/quick_cmake | |
with: | |
cmake-version: "3.21" | |
if: success() || failure() | |
- name: Check CMake 3.22 | |
uses: ./.github/actions/quick_cmake | |
with: | |
cmake-version: "3.22" | |
if: success() || failure() |