Skip to content

Commit

Permalink
CI: update .gitignore, enable UTs on darwin
Browse files Browse the repository at this point in the history
Signed-off-by: Evgeny Malygin <emalygin@bloomberg.net>
  • Loading branch information
678098 committed Jun 20, 2024
1 parent 3c380f3 commit e9ef660
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v4
- name: Get dependencies hash
id: get-hash
run: echo "deps_hash=`cat blazingmq/docker/build_deps.sh | shasum`" >> $GITHUB_OUTPUT
run: echo "deps_hash=`cat ${{ github.workspace }}/docker/build_deps.sh | shasum`" >> $GITHUB_OUTPUT
- name: Cache lookup
uses: actions/cache/restore@v4
id: cache-lookup
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
run: |
mkdir -p deps
cd deps
../docker/build_deps.sh
${{ github.workspace }}/docker/build_deps.sh
- name: Cache save
if: steps.cache-lookup.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
Expand All @@ -66,7 +66,7 @@ jobs:
- uses: actions/checkout@v4
- name: Get dependencies hash
id: get-hash
run: echo "deps_hash=`cat blazingmq/docker/build_deps.sh | shasum`" >> $GITHUB_OUTPUT
run: echo "deps_hash=`cat ${{ github.workspace }}/docker/build_deps.sh | shasum`" >> $GITHUB_OUTPUT
- uses: actions/cache/restore@v4
with:
path: deps
Expand All @@ -89,7 +89,7 @@ jobs:
libz-dev
- name: Install cached non packaged dependencies
working-directory: deps
run: ../docker/build_deps.sh
run: ${{ github.workspace }}/docker/build_deps.sh
- name: Build BlazingMQ
env:
PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig:/opt/bb/lib64/pkgconfig
Expand All @@ -104,9 +104,8 @@ jobs:
-DCMAKE_INSTALL_LIBDIR=lib64
cmake --build build/blazingmq --parallel 8 --target all all.t
- name: Run C++ Unit Tests
run: |
cd ${{ github.workspace }}/build/blazingmq
ctest -E mwcsys_executil.t --output-on-failure
working-directory: ${{ github.workspace }}/build/blazingmq
run: ctest --output-on-failure
- name: Clean-up build directories before caching
run: |
find . -name "*.o" -type f -delete
Expand Down Expand Up @@ -218,9 +217,16 @@ jobs:
bison \
flex \
google-benchmark
ifconfig
- name: Build BlazingMQ
run: bin/build-darwin.sh

- name: Build & Run C++ Unit Tests
working-directory: ${{ github.workspace }}/build/blazingmq
run: |
make -j16 all.t
ctest --output-on-failure
build_and_test_bmqprometheus_plugin:
name: "Build Prometheus plugin [ubuntu]"
runs-on: ubuntu-latest
Expand Down
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,14 @@ settings.json
.pytest_cache/
.cache/
.venv/

# Symlink from 'src/applications/bmqbrkr/run'
src/applications/bmqbrkr/etc/etc

# 'sim_cpp11_features.pl' backups
src/groups/mwc/mwcex/mwcex_bindutil.h.bak
src/groups/mwc/mwcex/mwcex_future.h.bak
src/groups/mwc/mwcex/mwcex_promise.h.bak
src/groups/mwc/mwcu/mwcu_noop.h.bak
src/groups/mwc/mwcu/mwcu_objectplaceholder.h.bak
src/groups/mwc/mwcu/mwcu_operationchain.h.bak
3 changes: 3 additions & 0 deletions src/groups/mwc/mwcsys/mwcsys_executil.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ static void test2_executeSystemFailure()
"python3.8 -c 'import os,signal; "
"os.kill(os.getpid(), signal.SIGKILL)'");
#else
rc = mwcsys::ExecUtil::execute(&output, "python3 --version");
ASSERT_EQ_D("'python3 --version' exec failed, python3 might be missing", rc, 0);

rc = mwcsys::ExecUtil::execute(&output,
"python3 -c 'import os,signal; "
"os.kill(os.getpid(), signal.SIGKILL)'");
Expand Down

0 comments on commit e9ef660

Please sign in to comment.