From 981a1f7c5de3bacdddc35e935fb75987da7904b9 Mon Sep 17 00:00:00 2001 From: Casey Waldren Date: Wed, 2 Oct 2024 16:50:20 -0700 Subject: [PATCH] more platforms --- .github/actions/cmake-test/action.yml | 43 +++++++++++++++++++++++++++ .github/workflows/cmake.yml | 43 ++++++++++++++------------- 2 files changed, 65 insertions(+), 21 deletions(-) create mode 100644 .github/actions/cmake-test/action.yml diff --git a/.github/actions/cmake-test/action.yml b/.github/actions/cmake-test/action.yml new file mode 100644 index 000000000..f036b9134 --- /dev/null +++ b/.github/actions/cmake-test/action.yml @@ -0,0 +1,43 @@ +# This is a composite to allow sharing these steps into other workflows. +# It isn't a shared workflow, because then it isn't convenient to add +# additional package-specific steps. +name: CMake Integration Test +description: 'CMake integration test suitable for running on multiple platforms.' +inputs: + platform_version: + description: 'Boost platform version' + required: false + default: "22.04" + toolset: + description: 'Boost toolset' + required: false + + +runs: + using: composite + steps: + - name: Install Ninja + uses: ./.github/actions/install-ninja + - name: Install boost + uses: ./.github/actions/install-boost + id: install-boost + with: + platform_version: ${{ inputs.platform_version }} + toolset: ${{ inputs.toolset }} + - name: Install OpenSSL + uses: ./.github/actions/install-openssl + id: install-openssl + - name: Configure CMake Integration Tests + shell: bash + run: ./scripts/configure-cmake-integration-tests.sh + env: + # These will be injected into the SDK CMake project on the command line, via "-D BOOST_ROOT=..." + # and "-D OPENSSL_ROOT_DIR=...". When the integration tests are configured, they will then be passed + # along in the same manner to those test projects via the command line. + BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} + OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }} + - name: Run CMake Integration Tests + shell: bash + run: | + export CTEST_OUTPUT_ON_FAILURE=1 + cd build/cmake-tests && ctest diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 737809158..7f1be3f88 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -14,29 +14,30 @@ on: - cron: '0 8 * * *' jobs: - test: + test-ubuntu: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - - name: Install Ninja - uses: ./.github/actions/install-ninja - - name: Install boost - uses: ./.github/actions/install-boost - id: install-boost + - uses: ./.github/actions/cmake-test with: - platform_version: "22.04" - - name: Install OpenSSL - uses: ./.github/actions/install-openssl - id: install-openssl - - name: Configure CMake Integration Tests - run: ./scripts/configure-cmake-integration-tests.sh + platform_version: '22.04' + + test-macos: + runs-on: macos-12 + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/cmake-test + with: + platform_version: '12' + + test-windows: + runs-on: windows-2022 + steps: + - uses: actions/checkout@v4 + - uses: ilammy/msvc-dev-cmd@v1 + - uses: ./.github/actions/cmake-test env: - # These will be injected into the SDK CMake project on the command line, via "-D BOOST_ROOT=..." - # and "-D OPENSSL_ROOT_DIR=...". When the integration tests are configured, they will then be passed - # along in the same manner to those test projects via the command line. - BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} - OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }} - - name: Run CMake Integration Tests - run: | - export CTEST_OUTPUT_ON_FAILURE=1 - cd build/cmake-tests && ctest + BOOST_ROOT: 'C:\local\boost_1_81_0\lib64-msvc-14.3' + with: + platform_version: 2022 + toolset: msvc