Skip to content

Commit fd17248

Browse files
committed
feat: add option for meson, to know if we are running in Ci or not, enable it on every possible CI run
1 parent d6163a4 commit fd17248

File tree

13 files changed

+61
-16
lines changed

13 files changed

+61
-16
lines changed

.github/workflows/android.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
5151
- name: Build native libraries
5252
run: |
53-
bash ./platforms/build-android.sh ${{ matrix.config.arch }} complete_rebuild release
53+
bash ./platforms/build-android.sh ${{ matrix.config.arch }} complete_rebuild release CI
5454
cp -r ./assets/ platforms/android/app/src/main
5555
5656
- name: Build APK

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ jobs:
199199
brew install sdl2 sdl2_ttf sdl2_mixer sdl2_image
200200
201201
- name: Configure
202-
run: meson setup build -Dbuildtype=release -Ddefault_library=${{( matrix.config.os == 'windows' && matrix.config.environment == 'msvc' && matrix.config.static ) && 'static' ||'shared' }} -Dclang_libcpp=${{ ( ( matrix.config.os == 'ubuntu' && matrix.config.use-clang == true && matrix.config.use-clang_stdlib ) || matrix.config.os == 'macos' ) && 'enabled' || 'disabled' }}
202+
run: meson setup build -Dbuildtype=release -Ddefault_library=${{( matrix.config.os == 'windows' && matrix.config.environment == 'msvc' && matrix.config.static ) && 'static' ||'shared' }} -Dclang_libcpp=${{ ( ( matrix.config.os == 'ubuntu' && matrix.config.use-clang == true && matrix.config.use-clang_stdlib ) || matrix.config.os == 'macos' ) && 'enabled' || 'disabled' }} -Drun_in_ci=true
203203

204204
- name: Build
205205
run: meson compile -C build

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
sudo apt-get update
3535
sudo apt-get install ninja-build libsdl2-2.0-0 libsdl2-dev libsdl2-ttf* libsdl2-mixer* libsdl2-image* desktop-file-utils -y --no-install-recommends
3636
37-
meson setup build -Dbuildtype=release -Dclang_libcpp=disabled -Dtests=true
37+
meson setup build -Dbuildtype=release -Dclang_libcpp=disabled -Dtests=true -Drun_in_ci=true
3838
meson compile -C build git_version.hpp
3939
4040
- uses: cpp-linter/cpp-linter-action@v2

.github/workflows/musl.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
fetch-depth: '0'
4242

4343
- name: Configure
44-
run: meson setup build -Dbuildtype=release -Ddefault_library=shared -Dclang_libcpp=${{ ( matrix.config.use-clang == true && matrix.config.use-clang_stdlib ) && 'enabled' || 'disabled' }}
44+
run: meson setup build -Dbuildtype=release -Ddefault_library=shared -Dclang_libcpp=${{ ( matrix.config.use-clang == true && matrix.config.use-clang_stdlib ) && 'enabled' || 'disabled' }} -Drun_in_ci=true
4545

4646
- name: Build
4747
run: meson compile -C build

.github/workflows/nintendo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
4444
- name: Configure and Build
4545
run: |
46-
bash ./platforms/build-${{ matrix.config.name }}.sh complete_rebuild release
46+
bash ./platforms/build-${{ matrix.config.name }}.sh complete_rebuild release CI
4747
4848
- name: Upload artifacts
4949
uses: actions/upload-artifact@v4

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
sudo apt-get install ninja-build libsdl2-2.0-0 libsdl2-dev libsdl2-ttf* libsdl2-mixer* libsdl2-image* gcovr desktop-file-utils -y --no-install-recommends
3636
3737
- name: Configure
38-
run: meson setup build -Dbuildtype=debug -Db_coverage=true -Dtests=true -Dclang_libcpp=enabled
38+
run: meson setup build -Dbuildtype=debug -Db_coverage=true -Dtests=true -Dclang_libcpp=enabled -Drun_in_ci=true
3939

4040
- name: Run tests
4141
run: meson test -C build --verbose

.github/workflows/web_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
3030
- name: Build
3131
run: |
32-
ENABLE_TESTING=1 bash ./platforms/build-web.sh
32+
ENABLE_TESTING=1 RUN_IN_CI=true bash ./platforms/build-web.sh
3333
3434
# TODO upload page to gh-pages!
3535
- name: Upload artifacts

.github/workflows/windows_installer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
run: 7z x "-oC:/Program Files (x86)/NSIS" "${{ github.workspace }}/envar_plugin.zip"
4242

4343
- name: Configure
44-
run: meson setup build -Dbuildtype=release -Ddefault_library=shared -Dbuild_installer=true
44+
run: meson setup build -Dbuildtype=release -Ddefault_library=shared -Dbuild_installer=true -Drun_in_ci=true
4545

4646
- name: Build installer
4747
run: |

io.github.openbrickprotocolfoundation.oopetris.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ modules:
1212
- -Dbuild_installer=true
1313
- --libdir=lib
1414
- -Dtests=true
15+
- -Drun_in_ci=true # note we always want the CI checks in the case we built the flatpak
1516
- --force-fallback-for=fmt # note, the freedesktop sdk has this installed, but it is not copiable into the runtime, so we need to build it ourself, to be able to install it correctly
1617
builddir: true
1718
build-options:

meson.options

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,11 @@ option(
2525
value: false,
2626
description: 'if you only want to build the libs, enable this',
2727
)
28+
29+
30+
option(
31+
'run_in_ci',
32+
type: 'boolean',
33+
value: false,
34+
description: 'enable this, if it is run in CI',
35+
)

0 commit comments

Comments
 (0)