-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'cw/sc-217924/persistent-store-refactoring' into cw/sc-2…
…24112/redis-client
- Loading branch information
Showing
9 changed files
with
231 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: hello-apps | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
paths-ignore: | ||
- '**.md' #Do not need to run CI for markdown changes. | ||
pull_request: | ||
branches: [ main, "feat/**" ] | ||
paths-ignore: | ||
- '**.md' | ||
|
||
|
||
jobs: | ||
smoketest: | ||
strategy: | ||
matrix: | ||
os: [ "ubuntu-22.04", "macos-12", "windows-2022" ] | ||
fail-fast: false | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ilammy/msvc-dev-cmd@v1 | ||
- name: Install Ninja | ||
uses: ./.github/actions/install-ninja | ||
- name: Install boost | ||
uses: ./.github/actions/install-boost | ||
id: install-boost | ||
- name: Install OpenSSL | ||
uses: ./.github/actions/install-openssl | ||
id: install-openssl | ||
- name: Statically Linked Hello Apps | ||
shell: bash | ||
run: ./scripts/run-hello-apps.sh static hello-c-client hello-cpp-client hello-c-server hello-cpp-server | ||
env: | ||
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} | ||
OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }} | ||
- name: Dynamically Linked Hello Apps | ||
shell: bash | ||
continue-on-error: true # TODO(SC-223804) | ||
# Only the C bindings work with dynamic linking because C++ symbols are hidden | ||
run: ./scripts/run-hello-apps.sh dynamic hello-c-client hello-c-server | ||
env: | ||
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} | ||
OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
# This script builds a set of hello-app cmake targets | ||
# using static or dynamic linkage. | ||
# This script should be ran from the root directory of the project. | ||
# Example: | ||
# ./scripts/run-hello-apps.sh dynamic hello-cpp-client hello-c-client | ||
# | ||
# $1 is the linkage, either 'static' or 'dynamic'. | ||
# Subsequent arguments are cmake target names. | ||
|
||
if [ "$1" != "static" ] && [ "$1" != "dynamic" ] | ||
then | ||
echo "Linkage must be specified ('static' or 'dynamic')" | ||
exit 1 | ||
fi | ||
|
||
dynamic_linkage="Off" | ||
if [ "$1" == "dynamic" ]; then | ||
dynamic_linkage="On" | ||
fi | ||
|
||
shift | ||
|
||
function cleanup { | ||
cd .. | ||
} | ||
|
||
mkdir -p build-"$1" | ||
cd build-"$1" || exit | ||
|
||
# After we enter the directory we want to make sure we always exit it when the | ||
# script ends. | ||
trap cleanup EXIT | ||
|
||
cmake -G Ninja -D CMAKE_BUILD_TYPE=Release -D BUILD_TESTING=OFF -D LD_BUILD_SHARED_LIBS=$dynamic_linkage .. | ||
|
||
export LD_MOBILE_KEY="bogus" | ||
export LD_SDK_KEY="bogus" | ||
|
||
for target in "$@" | ||
do | ||
cmake --build . --target "$target" | ||
./examples/"$target"/"$target" | tee "$target"_output.txt | ||
grep "failed to initialize" "$target"_output.txt || (echo "$target: expected connection to LD to fail" && exit 1) | ||
done |