From 818addb0e0b206093a69c4ceadd07415b94aa467 Mon Sep 17 00:00:00 2001 From: Daniel Markstedt Date: Thu, 18 Jan 2024 13:38:55 +0900 Subject: [PATCH] CI workflow: Build unit tests in debug mode (#1417) * Run CI jobs on push events only when merged to develop or main * Build unit tests with debug flags --- .github/workflows/build_code.yml | 5 +++-- .github/workflows/cpp.yml | 8 +++++++- .github/workflows/web.yml | 3 +++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_code.yml b/.github/workflows/build_code.yml index e0c38852..b6eefef0 100644 --- a/.github/workflows/build_code.yml +++ b/.github/workflows/build_code.yml @@ -7,16 +7,17 @@ on: - 'cpp/**' - '.github/workflows/build_code.yml' - '.github/workflows/arm_cross_compile.yml' + branches: + - 'develop' + - 'main' pull_request: paths: - 'cpp/**' - '.github/workflows/build_code.yml' - '.github/workflows/arm_cross_compile.yml' types: - - assigned - opened - synchronize - - reopened branches: - 'develop' - 'main' diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml index b4fac982..5b2a199b 100644 --- a/.github/workflows/cpp.yml +++ b/.github/workflows/cpp.yml @@ -7,11 +7,17 @@ on: - 'cpp/**' - 'python/**' - '.github/workflows/cpp.yml' + branches: + - 'develop' + - 'main' pull_request: paths: - 'cpp/**' - 'python/**' - '.github/workflows/cpp.yml' + types: + - opened + - synchronize branches: - 'develop' - 'main' @@ -32,7 +38,7 @@ jobs: run: sudo apt-get install ${{ env.APT_PACKAGES }} - name: Build unit tests - run: make -j $(nproc) test + run: DEBUG=1 make -j $(nproc) test - name: Run unit tests run: (set -o pipefail && bin/piscsi_test | tee piscsi_test_log.txt) diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index c2f0c086..054c0c07 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -14,6 +14,9 @@ on: - 'python/common/**' - '.github/workflows/web.yml' - 'easyinstall.sh' + types: + - opened + - synchronize branches: - 'develop' - 'main'