Skip to content

Commit ece7d31

Browse files
authored
Merge pull request #225 from OpenBrickProtocolFoundation/assert_ci_compiler_version
feat: Assert CI compiler version
2 parents d6163a4 + 84ea54b commit ece7d31

File tree

19 files changed

+330
-113
lines changed

19 files changed

+330
-113
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: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,41 +21,47 @@ jobs:
2121
environment: msvc
2222
shell: pwsh
2323
static: false
24+
fatal_warnings: false # TODO: enable fatal warnings, once cpp-httplib is patched either by ourselves or by the maintainers
2425

2526
- name: Windows MSVC (static)
2627
os: windows
2728
os-version: 2022
2829
environment: msvc
2930
shell: pwsh
3031
static: true
32+
fatal_warnings: false # TODO: enable fatal warnings, once cpp-httplib is patched either by ourselves or by the maintainers
3133

3234
- name: Windows MingGW
3335
os: windows
3436
os-version: 2022
3537
environment: mingw
3638
architecture: x86_64
3739
shell: 'msys2 {0}'
40+
fatal_warnings: true
3841

3942
- name: Windows UCRT
4043
os: windows
4144
os-version: 2022
4245
environment: ucrt
4346
architecture: ucrt-x86_64
4447
shell: 'msys2 {0}'
48+
fatal_warnings: true
4549

4650
- name: Linux (ARM64)
4751
os: ubuntu
4852
os-version: 24.04-arm
4953
use-clang: false
5054
arm: true
5155
shell: bash
56+
fatal_warnings: true
5257

5358
- name: Linux
5459
os: ubuntu
5560
os-version: 24.04
5661
use-clang: false
5762
arm: false
5863
shell: bash
64+
fatal_warnings: true
5965

6066
- name: Linux Clang (libstdc++)
6167
os: ubuntu
@@ -64,6 +70,7 @@ jobs:
6470
use-clang_stdlib: false
6571
arm: false
6672
shell: bash
73+
fatal_warnings: true
6774

6875
- name: Linux Clang (libc++)
6976
os: ubuntu
@@ -72,18 +79,21 @@ jobs:
7279
use-clang_stdlib: true
7380
arm: false
7481
shell: bash
82+
fatal_warnings: true
7583

7684
- name: MacOS
7785
os: macos
7886
os-version: 13
7987
arm: false
8088
shell: bash
89+
fatal_warnings: true
8190

8291
- name: MacOS (Arm64)
8392
os: macos
8493
os-version: 14
8594
arm: true
8695
shell: bash
96+
fatal_warnings: true
8797

8898
defaults:
8999
run:
@@ -199,7 +209,7 @@ jobs:
199209
brew install sdl2 sdl2_ttf sdl2_mixer sdl2_image
200210
201211
- 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' }}
212+
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 ${{( matrix.config.fatal_warnings ) && '--fatal-meson-warnings' || '' }}
203213

204214
- name: Build
205215
run: meson compile -C build

.github/workflows/flatpak.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
steps:
2929
- uses: actions/checkout@v4
3030

31-
- uses: flathub-infra/flatpak-github-actions/flatpak-builder@9386d85446c0f8c6b93dea3774002af2abcac3d5
31+
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
3232
with:
3333
bundle: oopetris.flatpak
3434
manifest-path: io.github.openbrickprotocolfoundation.oopetris.yml

.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 --fatal-meson-warnings
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 --fatal-meson-warnings
4545

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

.github/workflows/nintendo.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,20 @@ jobs:
1111
name: Nintendo ${{ matrix.config.name }} CI
1212
runs-on: ubuntu-24.04
1313
container:
14-
image: devkitpro/${{ matrix.config.container }} ## base on debian:buster-slim
14+
image: devkitpro/${{ matrix.config.container }}:${{ matrix.config.revision }} ## based on debian:buster-slim
1515
strategy:
1616
fail-fast: false
1717
matrix:
1818
config:
1919
- name: 3ds
2020
extension: 3dsx
2121
container: devkitarm
22+
revision: "20250102"
2223

2324
- name: switch
2425
extension: nro
2526
container: devkita64
27+
revision: "20241023"
2628

2729
steps:
2830
- uses: actions/checkout@v4
@@ -43,7 +45,7 @@ jobs:
4345
4446
- name: Configure and Build
4547
run: |
46-
bash ./platforms/build-${{ matrix.config.name }}.sh complete_rebuild release
48+
bash ./platforms/build-${{ matrix.config.name }}.sh complete_rebuild release CI
4749
4850
- name: Upload artifacts
4951
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 --fatal-meson-warnings
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 bash ./platforms/build-web.sh complete_rebuild release CI
3333
3434
# TODO upload page to gh-pages!
3535
- name: Upload artifacts

.github/workflows/windows_installer.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ 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
45+
# TODO: enable fatal warnings, once cpp-httplib is patched either by ourselves or by the maintainers: --fatal-meson-warnings
4546

4647
- name: Build installer
4748
run: |

io.github.openbrickprotocolfoundation.oopetris.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ modules:
1212
- -Dbuild_installer=true
1313
- --libdir=lib
1414
- -Dtests=true
15+
- --fatal-meson-warnings
16+
- -Drun_in_ci=true # note we always want the CI checks in the case we built the flatpak
1517
- --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
1618
builddir: true
1719
build-options:

0 commit comments

Comments
 (0)