Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub actions setup static build #1405

Merged
merged 3 commits into from
Feb 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 50 additions & 40 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ jobs:
CC: /usr/bin/clang
CXX: /usr/bin/clang++
AWS_KVS_LOG_LEVEL: 2
LDFLAGS: -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
CPATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Build repository
run: |
mkdir build && cd build
sh -c 'cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE;cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE'
cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE
make
./tst/webrtc_client_test
mac-os-build-gcc:
Expand All @@ -46,15 +48,27 @@ jobs:
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Build repository and run all tests without auth
- name: Build repository and run tests
run: |
mkdir build && cd build
sh -c 'cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE;cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE'
cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE
make
./tst/webrtc_client_test
unset AWS_ACCESS_KEY_ID
unset AWS_SECRET_ACCESS_KEY
./tst/webrtc_client_test --gtest_break_on_failure --gtest_filter="SignalingApiFunctionalityTest.*:SignalingApiTest.*:TurnConnectionFunctionalityTest.*"
static-build-mac:
runs-on: macos-latest
env:
AWS_KVS_LOG_LEVEL: 2
LDFLAGS: -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
CPATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Build repository and run tests
run: |
mkdir build && cd build
cmake .. -DBUILD_STATIC_LIBS=TRUE -DBUILD_TEST=TRUE
make
./tst/webrtc_client_test
linux-gcc-code-coverage:
runs-on: ubuntu-18.04
env:
Expand Down Expand Up @@ -188,39 +202,27 @@ jobs:
make
ulimit -c unlimited -S
timeout --signal=SIGABRT 60m ./tst/webrtc_client_test
# static-build:
# runs-on: ubuntu-18.04
# container:
# image: alpine:latest
# env:
# CC: gcc
# CXX: g++
# AWS_KVS_LOG_LEVEL: 2
# steps:
# - name: Clone repository
# uses: actions/checkout@v2
# - name: Install dependencies
# run: |
# apk update
# apk upgrade
# apk add alpine-sdk cmake clang linux-headers perl bash openssl-dev
# - name: Build Repository
# run: |
# mkdir build && cd build
# cmake .. -DBUILD_STATIC_LIBS=TRUE -DBUILD_TEST=TRUE
# make
# ulimit -c unlimited -S
# ../scripts/check-static-build.sh
# ./tst/webrtc_client_test
# - name: Build repository
# run: |
# sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
# mkdir build && cd build
# cmake .. -DBUILD_STATIC_LIBS=TRUE -DBUILD_TEST=TRUE
# make
# ulimit -c unlimited -S
# ../scripts/check-static-build.sh
# timeout --signal=SIGABRT 60m ./tst/webrtc_client_test
static-build-linux:
runs-on: ubuntu-18.04
container:
image: alpine:latest
env:
CC: gcc
CXX: g++
AWS_KVS_LOG_LEVEL: 2
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Install dependencies
run: |
apk update
apk upgrade
apk add alpine-sdk cmake clang linux-headers perl bash openssl-dev
- name: Build Repository
run: |
mkdir build && cd build
cmake .. -DBUILD_STATIC_LIBS=TRUE -DBUILD_TEST=TRUE
make
mbedtls-ubuntu-gcc:
runs-on: ubuntu-latest
env:
Expand Down Expand Up @@ -269,9 +271,18 @@ jobs:
runs-on: ubuntu-latest
env:
AWS_KVS_LOG_LEVEL: 2
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Build repository
run: |
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
Expand Down Expand Up @@ -336,4 +347,3 @@ jobs:
mkdir build && cd build
cmake .. -DBUILD_OPENSSL=TRUE -DBUILD_OPENSSL_PLATFORM=linux-generic32 -DBUILD_LIBSRTP_HOST_PLATFORM=x86_64-unknown-linux-gnu -DBUILD_LIBSRTP_DESTINATION_PLATFORM=arm-unknown-linux-uclibcgnueabi
make

21 changes: 0 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,6 @@ matrix:
- env: allowTestFail=true

include:

# Static Build
- name: "Static Build"
before_install:
# TODO: Remove the following 2 lines. This is only a workaround for enabling IPv6, https://github.com/travis-ci/travis-ci/issues/8891.
- echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
- sudo service docker restart
- mkdir build
- docker run -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -w /src/build -dit --security-opt=seccomp=.github/default.json --name alpine -v $(pwd):/src alpine:latest
- alpine() { docker exec -it alpine "$@"; }
install:
- alpine apk update
- alpine apk upgrade
- alpine apk add alpine-sdk cmake clang linux-headers perl bash openssl-dev
script:
- alpine cmake .. -DBUILD_STATIC_LIBS=TRUE -DBUILD_TEST=TRUE
- alpine make
# ldd will return non-zero when there's no dynamic link. So, the positive value for static builds is non-zero
- alpine ../scripts/check-static-build.sh || travis_terminate 1
- alpine ./tst/webrtc_client_test
after_failure: skip # no coredumps in container

# MemorySanitizer
- name: "Linux Clang MemorySanitizer"
Expand Down
4 changes: 2 additions & 2 deletions CMake/Dependencies/libopenssl-CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ else()
endif()

if (DEFINED BUILD_OPENSSL_PLATFORM AND NOT BUILD_OPENSSL_PLATFORM STREQUAL OFF)
SET(CONFIGURE_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/build/src/project_libopenssl/Configure ${OPENSSL_EXTRA} no-async --prefix=${OPEN_SRC_INSTALL_PREFIX} --openssldir=${OPEN_SRC_INSTALL_PREFIX} ${BUILD_OPENSSL_PLATFORM})
SET(CONFIGURE_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/build/src/project_libopenssl/Configure ${OPENSSL_EXTRA} no-async --prefix=${OPEN_SRC_INSTALL_PREFIX} --openssldir=${OPEN_SRC_INSTALL_PREFIX} ${BUILD_OPENSSL_PLATFORM} -Wno-nullability-completeness -Wno-expansion-to-defined)
niyatim23 marked this conversation as resolved.
Show resolved Hide resolved
else()
SET(CONFIGURE_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/build/src/project_libopenssl/config ${OPENSSL_EXTRA} --prefix=${OPEN_SRC_INSTALL_PREFIX} --openssldir=${OPEN_SRC_INSTALL_PREFIX})
SET(CONFIGURE_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/build/src/project_libopenssl/config ${OPENSSL_EXTRA} --prefix=${OPEN_SRC_INSTALL_PREFIX} --openssldir=${OPEN_SRC_INSTALL_PREFIX} -Wno-nullability-completeness -Wno-expansion-to-defined)
endif()
endif()

Expand Down