From 1491c94c9d742d2d7bfccfc57b3944d66e5e048a Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 28 Jul 2020 20:13:09 -0400 Subject: [PATCH] ci: cmake Configure test (#2327) --- .github/workflows/configure.yml | 81 +++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 .github/workflows/configure.yml diff --git a/.github/workflows/configure.yml b/.github/workflows/configure.yml new file mode 100644 index 000000000..a23276a34 --- /dev/null +++ b/.github/workflows/configure.yml @@ -0,0 +1,81 @@ +name: Configure + +on: + workflow_dispatch: + pull_request: + push: + branches: + - master + - stable + - v* + +jobs: + cmake: + strategy: + fail-fast: false + matrix: + python: + - 2.7 + - 3.8 + + name: CMake ${{ matrix.cmake }} Python ${{ matrix.python }} on ubuntu + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Setup Python ${{ matrix.python }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + + - name: Prepare env + run: python -m pip install -r tests/requirements.txt + + - name: Make build directories + run: | + mkdir build2.8 + mkdir build3.7 + mkdir build3.18 + + - name: Setup CMake 2.8 + uses: jwlawson/actions-setup-cmake@v1.3 + with: + cmake-version: 2.8 + + - name: Configure 2.8 + working-directory: build2.8 + run: > + cmake --version && + cmake .. + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)") + + - name: Setup CMake 3.7 + uses: jwlawson/actions-setup-cmake@v1.3 + with: + cmake-version: 3.7 + + - name: Configure 3.7 + working-directory: build3.7 + run: > + cmake --version && + cmake .. + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)") + + - name: Setup CMake 3.18 + uses: jwlawson/actions-setup-cmake@v1.3 + with: + cmake-version: 3.18 + + - name: Configure 3.18 + working-directory: build3.18 + run: > + cmake --version && + cmake .. + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)")