Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

Commit

Permalink
Updated build pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
makinori committed Oct 19, 2020
1 parent 1dca5f1 commit 11e1ad7
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 24 deletions.
25 changes: 15 additions & 10 deletions .gitlab/linux.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,17 @@ linux:

- mkdir -p build
- cd build
- /usr/local/bin/cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- make teaProtocol -j$(nproc)
- /usr/local/bin/cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -G Ninja
- cmake --build . --config $BUILD_TYPE --target tea-protocol-plugin

- mkdir -p ../teaProtocol-$CI_COMMIT_TAG/linux
- mv plugins/teaProtocol/libteaProtocol.so ../teaProtocol-$CI_COMMIT_TAG/linux/libteaProtocol-$RELEASE_NUMBER.so
- mkdir -p ../tea-protocol-plugin/linux
- mv plugins/tea-protocol-plugin/libtivoli-tea-protocol-plugin.so
../tea-protocol-plugin/linux

artifacts:
expire_in: 1 day
paths:
- teaProtocol-$CI_COMMIT_TAG
- tea-protocol-plugin

linux arm64:
stage: build
Expand Down Expand Up @@ -63,13 +64,17 @@ linux arm64:

- mkdir -p build
- cd build
- /usr/local/bin/cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DDISABLE_HIFI_CODEC=ON -DDISABLE_PCM_CODEC=ON
- make teaProtocol -j$(nproc)
- /usr/local/bin/cmake ..
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
-DDISABLE_HIFI_CODEC=ON -DDISABLE_PCM_CODEC=ON
-G Ninja
- cmake --build . --config $BUILD_TYPE --target tea-protocol-plugin

- mkdir -p ../teaProtocol-$CI_COMMIT_TAG/linux-arm64
- mv plugins/teaProtocol/libteaProtocol.so ../teaProtocol-$CI_COMMIT_TAG/linux-arm64/libteaProtocol-$RELEASE_NUMBER.so
- mkdir -p ../tea-protocol-plugin/linux-arm64
- mv plugins/tea-protocol-plugin/libtivoli-tea-protocol-plugin.so
../tea-protocol-plugin/linux-arm64

artifacts:
expire_in: 1 day
paths:
- teaProtocol-$CI_COMMIT_TAG
- tea-protocol-plugin
16 changes: 7 additions & 9 deletions .gitlab/macos.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ macos:

RELEASE_NUMBER: $CI_COMMIT_TAG

OPENSSL_ROOT_DIR: /usr/local/Cellar/openssl/1.0.2t
OPENSSL_ROOT_DIR: /usr/local/Cellar/openssl@1.1/1.1.1h
OPENSSL_INCLUDE_DIR: ${OPENSSL_ROOT_DIR}/include
OPENSSL_USE_STATIC_LIBS: "TRUE"
OSX_SDK: "10.11"

script:
Expand All @@ -23,19 +22,18 @@ macos:
- mkdir -p build
- cd build

# TODO: update cmake to use env vars
- cmake
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
-DOPENSSL_ROOT_DIR=$OPENSSL_ROOT_DIR
-DOPENSSL_INCLUDE_DIR=$OPENSSL_INCLUDE_DIR
-DOPENSSL_USE_STATIC_LIBS=$OPENSSL_USE_STATIC_LIBS
-G Xcode ..
- cmake --build . --target teaProtocol --config $BUILD_TYPE | xcpretty
-G Ninja ..
- cmake --build . --config $BUILD_TYPE --target tea-protocol-plugin

- mkdir -p ../teaProtocol-$CI_COMMIT_TAG/macos
- mv plugins/teaProtocol/Release/libteaProtocol.dylib ../teaProtocol-$CI_COMMIT_TAG/macos/libteaProtocol-$RELEASE_NUMBER.dylib
- mkdir -p ../tea-protocol-plugin/macos
- mv plugins/tea-protocol-plugin/libtivoli-tea-protocol-plugin.dylib
../tea-protocol-plugin/macos

artifacts:
expire_in: 1 day
paths:
- teaProtocol-$CI_COMMIT_TAG
- tea-protocol-plugin
10 changes: 5 additions & 5 deletions .gitlab/windows.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ windows:
- cd build

- cmake -DCMAKE_BUILD_TYPE=Release -A x64 ..
- cmake --build . --parallel --config Release --target teaProtocol
- cmake --build . --parallel --config Release --target tea-protocol-plugin

- New-Item -ItemType directory -Path $("..\teaProtocol-" + $env:RELEASE_NUMBER + "\windows")
- New-Item -ItemType directory -Path $("..\tea-protocol-plugin\windows")
- Move-Item
-Path $(".\plugins\teaProtocol\Release\teaProtocol.dll")
-Destination $("..\teaProtocol-" + $env:RELEASE_NUMBER + "\windows\teaProtocol-" + $env:RELEASE_NUMBER + ".dll")
-Path $(".\plugins\tea-protocol-plugin\Release\tivoli-tea-protocol-plugin.dll")
-Destination $("..\tea-protocol-plugin\windows\tivoli-tea-protocol-plugin.dll")

artifacts:
expire_in: 1 day
paths:
- teaProtocol-$CI_COMMIT_TAG
- tea-protocol-plugin
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,17 @@ setup_hifi_client_server_plugin()
link_hifi_libraries(shared plugins networking)

target_openssl()

# if (NOT TEA_PROTOCOL_VERSION)
# if (RELEASE_TYPE STREQUAL "PRODUCTION")
# message(FATAL_ERROR "TEA_PROTOCOL_VERSION not set in a ${RELEASE_TYPE} build!")
# else ()
# message(WARNING "TEA_PROTOCOL_VERSION not set in a ${RELEASE_TYPE} build!")
# endif()
# else ()
# message(STATUS "The TEA_PROTOCOL_VERSION variable is: ${TEA_PROTOCOL_VERSION}")
# set_target_properties(${TARGET_NAME} PROPERTIES
# VERSION "${TEA_PROTOCOL_VERSION}"
# SOVERSION "${TEA_PROTOCOL_VERSION}"
# )
# endif ()

0 comments on commit 11e1ad7

Please sign in to comment.