diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 84ad181fec..64307bfcaf 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,4 +1,4 @@ -name: GitHub Actions CI +name: Windows CMake build # TODO: change branch name on: @@ -11,7 +11,7 @@ on: env: # openssl: 1.1.1g#1 # boost: 1.73.0 - VCPKG_COMMIT: 76a7e9248fb3c57350b559966dcaa2d52a5e4458 + VCPKG_COMMIT: 27a2418e91179d8607862348d7b498558e98a0ab VCPKG_DEST_WIN: C:\libt_tools\vcpkg VCPKG_TRIPLET: "x64-windows" BUILD_VARIANT: "shared" @@ -19,7 +19,7 @@ env: LIBT_BSL: "ON" LIBT_TESTS: "ON" LIBT_DEPR_FUN: "ON" - LIBT_PY_BINDINGS: "OFF" + LIBT_PY_BINDINGS: "ON" defaults: run: @@ -27,15 +27,31 @@ defaults: jobs: - ci_windows_static: - name: Windows + vcpkg + ci_windows_cmake: + name: Windows CMake build (w/ vcpkg) strategy: matrix: + build_config: [Release, Debug] build_variant: [shared, static] - deprecated_functions: [depr_fun, no_depr_fun] + deprecated_functions: [yes_depr_fun, no_depr_fun] + build_tests: [yes_tests, no_tests] python_bindings: [py_bindings, no_py_bindings] - build_config: [Release, Debug] + exclude: + # python bindings require building with shared libs + - build_variant: static + python_bindings: py_bindings + # FIXME: non-static build with python bindings is failing, presumably due to a boost port bug in vcpkg + - build_variant: shared + build_config: Debug + python_bindings: py_bindings + # tests require deprecated functions + - deprecated_functions: no_depr_fun + build_tests: yes_tests + # static debug build with tests is too big + - build_variant: static + build_config: Debug + build_tests: yes_tests fail-fast: false runs-on: windows-2019 @@ -52,16 +68,20 @@ jobs: echo "::set-env name=VCPKG_TRIPLET::x64-windows-static" echo "::set-env name=BUILD_VARIANT::static" - - name: setup environment - build with no deprecated functions + - name: setup environment - don't build with deprecated functions if: matrix.deprecated_functions == 'no_depr_fun' run: | - echo "::set-env name=LIBT_TESTS::OFF" echo "::set-env name=LIBT_DEPR_FUN::OFF" - - name: setup environment - build with python bindings - if: matrix.python_bindings == 'py_bindings' + - name: setup environment - don't build tests + if: matrix.build_tests == 'no_tests' + run: | + echo "::set-env name=LIBT_TESTS::OFF" + + - name: setup environment - don't build with python bindings + if: matrix.python_bindings == 'no_py_bindings' run: | - echo "::set-env name=LIBT_PY_BINDINGS::ON" + echo "::set-env name=LIBT_PY_BINDINGS::OFF" # NOTE: MSVC tools must be in the path for the Ninja generator. Caveat: must use cmd - name: setup MSVC dev cmd @@ -115,13 +135,14 @@ jobs: --graphviz=cmake-build-dir\target_graph.dot cmake --build cmake-build-dir - - name: run libtorrent tests + - name: run ctest + if: matrix.build_tests == 'yes_tests' run: | ctest - name: upload artifact as zip uses: actions/upload-artifact@v2.2.0 with: - name: libtorrent_RC_1_2-CI-Windows_x64-${{ matrix.build_variant }}-${{ matrix.deprecated_functions }}-${{ matrix.build_config }} + name: libtorrent_RC_1_2-CI-Windows_x64-${{ matrix.build_variant }}-${{ matrix.build_config }}-${{ matrix.deprecated_functions }}-${{ matrix.deprecated_functions }}-${{ matrix.build_tests }}-${{ matrix.python_bindings }} path: | cmake-build-dir