Skip to content

Commit

Permalink
build.yaml
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Louis Leroy <[email protected]>
  • Loading branch information
jll63 committed Jan 24, 2024
1 parent 9778b9d commit bf7b191
Showing 1 changed file with 29 additions and 12 deletions.
41 changes: 29 additions & 12 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:

jobs:
build_and_test:
name: "Check if BlazingMQ can build and pass unit tests"
name: "Check if BlazingMQ can build, and pass unit and integration tests"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -25,13 +25,15 @@ jobs:
gdb \
curl \
python3.10 \
python3-pip \
cmake \
ninja-build \
pkg-config \
bison \
libfl-dev \
libbenchmark-dev \
libz-dev
pip install -r ${{ github.workspace }}/src/python/requirements.txt
- name: Create dependency fetcher working directory
run: mkdir -p deps
- name: Fetch & Build non packaged dependencies
Expand All @@ -41,23 +43,38 @@ jobs:
env:
PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig:/opt/bb/lib64/pkgconfig
run: |
cmake -S . -B cmake.bld/Linux -G Ninja \
cmake -S . -B build/blazingmq -G Ninja \
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/deps/srcs/bde-tools/BdeBuildSystem/toolchains/linux/gcc-default.cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DBDE_BUILD_TARGET_SAFE=ON \
-DBDE_BUILD_TARGET_64=ON \
-DBDE_BUILD_TARGET_CPP17=ON \
-DCMAKE_PREFIX_PATH=${{ github.workspace }}/deps/srcs/bde-tools/BdeBuildSystem \
-DCMAKE_INSTALL_LIBDIR=lib64
cmake --build cmake.bld/Linux --parallel 8 --target all all.t
- name: Run Unit Tests
cmake --build build/blazingmq --parallel 8 --target all all.t
- name: Run C++ Unit Tests
run: |
cd cmake.bld/Linux
cd build/blazingmq
ctest -E mwcsys_executil.t --output-on-failure
- name: Run Python Unit Tests
run: |
pytest src/python
- name: Run Integration Tests
run: |
${{ github.workspace }}/src/integration-tests/run-tests \
--log-level ERROR \
--log-file-level=info \
--bmq-tolerate-dirty-shutdown \
--bmq-log-dir=failure-logs \
--bmq-log-level=INFO \
--junitxml=integration-tests.xml \
--tb line \
--reruns=3 \
-n 4 -v
- uses: actions/cache@v3
with:
path: |
cmake.bld/Linux
build/blazingmq
deps
/opt/bb/include
key: cache-${{ github.sha }}
Expand All @@ -71,7 +88,7 @@ jobs:
- uses: actions/cache/@v3
with:
path: |
cmake.bld/Linux
build/blazingmq
deps
/opt/bb/include
key: cache-${{ github.sha }}
Expand Down Expand Up @@ -100,7 +117,7 @@ jobs:
env:
PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig:/opt/bb/lib64/pkgconfig
run: |
cmake -S . -B cmake.bld/Linux -G Ninja \
cmake -S . -B build/blazingmq -G Ninja \
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/deps/srcs/bde-tools/BdeBuildSystem/toolchains/linux/gcc-default.cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DBDE_BUILD_TARGET_SAFE=ON \
Expand All @@ -109,7 +126,7 @@ jobs:
-DCMAKE_PREFIX_PATH=${{ github.workspace }}/deps/srcs/bde-tools/BdeBuildSystem \
-DCMAKE_INSTALL_LIBDIR=lib64 \
-DINSTALL_TARGETS=prometheus
cmake --build cmake.bld/Linux --parallel 8 --target all
cmake --build build/blazingmq --parallel 8 --target all
- name: Create prometheus dir
run: mkdir -p prometheus_dir
- name: Download Prometheus
Expand All @@ -121,14 +138,14 @@ jobs:
docker pull prom/pushgateway
docker run -d -p 9091:9091 prom/pushgateway
- name: Run BMQPrometheus plugin integration test in "pull" mode
run: ${{ github.workspace }}/src/plugins/bmqprometheus/tests/bmqprometheus_prometheusstatconsumer_test.py -p ${{ github.workspace }}/cmake.bld/Linux -m pull --no-docker
run: ${{ github.workspace }}/src/plugins/bmqprometheus/tests/bmqprometheus_prometheusstatconsumer_test.py -p ${{ github.workspace }}/build/blazingmq -m pull --no-docker
- name: Clear Prometheus database and restart
run: |
curl -X POST "http://localhost:9090/-/quit"
rm -rf prometheus_dir/data
./prometheus_dir/prometheus-2.45.1.linux-amd64/prometheus --config.file=${{ github.workspace }}/src/plugins/bmqprometheus/tests/prometheus_localhost.yaml --web.enable-lifecycle --storage.tsdb.path=${{ github.workspace }}/prometheus_dir/data &
- name: Run Prometheus plugin integration test in "push" mode
run: ${{ github.workspace }}/src/plugins/bmqprometheus/tests/bmqprometheus_prometheusstatconsumer_test.py -p ${{ github.workspace }}/cmake.bld/Linux -m push --no-docker
run: ${{ github.workspace }}/src/plugins/bmqprometheus/tests/bmqprometheus_prometheusstatconsumer_test.py -p ${{ github.workspace }}/build/blazingmq -m push --no-docker

Documentation:
name: "Documentation"
Expand All @@ -142,7 +159,7 @@ jobs:
- name: Build docs
run: |
doxygen Doxyfile
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
Expand Down

0 comments on commit bf7b191

Please sign in to comment.