Skip to content

Commit 0b0ec7f

Browse files
committed
ci: gate artifacts test deps on BUILD_APP_TESTS
1 parent 852f13e commit 0b0ec7f

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/artifacts.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ on:
1616
jobs:
1717
build:
1818
runs-on: ${{matrix.os}}
19+
env:
20+
BUILD_APP_TESTS: ON
1921
strategy:
2022
fail-fast: false
2123
matrix:
@@ -29,6 +31,9 @@ jobs:
2931
if: contains(matrix.os, 'macos')
3032
run: |
3133
brew install ccache boost pkgconf libevent qt@6 qrencode coreutils
34+
if [ "${BUILD_APP_TESTS}" = "ON" ]; then
35+
brew install googletest
36+
fi
3237
echo "CCACHE_DIR=${{ runner.temp }}/ccache" >> "$GITHUB_ENV"
3338
3439
- name: Ubuntu Install Deps
@@ -39,6 +44,9 @@ jobs:
3944
libevent-dev libboost-dev libsqlite3-dev libgl-dev libqrencode-dev \
4045
qt6-base-dev qt6-tools-dev qt6-l10n-tools qt6-tools-dev-tools \
4146
qt6-declarative-dev qml6-module-qt-labs-settings qml6-module-qtquick qml6-module-qtquick-controls qml6-module-qtquick-dialogs qml6-module-qtquick-layouts qml6-module-qtquick-templates qml6-module-qtqml
47+
if [ "${BUILD_APP_TESTS}" = "ON" ]; then
48+
sudo apt-get install -y libgtest-dev libgmock-dev
49+
fi
4250
echo "CCACHE_DIR=${{ runner.temp }}/ccache" >> "$GITHUB_ENV"
4351
4452
- name: Restore Ccache cache
@@ -52,7 +60,7 @@ jobs:
5260
- name: Build
5361
run: |
5462
git submodule update --init
55-
cmake -B build
63+
cmake -B build -DBUILD_APP_TESTS=${{ env.BUILD_APP_TESTS }}
5664
cmake --build build -j$(nproc)
5765
5866
- name: Save Ccache cache

0 commit comments

Comments
 (0)