Skip to content

Commit

Permalink
exclude some configurations and clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
FranciscoPombal committed Oct 19, 2020
1 parent 808f3d2 commit 2c0a9b7
Showing 1 changed file with 35 additions and 14 deletions.
49 changes: 35 additions & 14 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: GitHub Actions CI
name: Windows CMake build

# TODO: change branch name
on:
Expand All @@ -11,31 +11,47 @@ 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"
LIBT_STATIC_RT: "OFF"
LIBT_BSL: "ON"
LIBT_TESTS: "ON"
LIBT_DEPR_FUN: "ON"
LIBT_PY_BINDINGS: "OFF"
LIBT_PY_BINDINGS: "ON"

defaults:
run:
shell: pwsh

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
Expand All @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 2c0a9b7

Please sign in to comment.