Skip to content

Commit 8fa991a

Browse files
authored
Merge pull request #182 from OpenBrickProtocolFoundation/update_ci
Update CI
2 parents e6aa09e + ff0da0b commit 8fa991a

File tree

8 files changed

+168
-108
lines changed

8 files changed

+168
-108
lines changed

.github/patches/gcc_14_2.diff

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
From c9e05b03c18e898be604ab90401476e9c473cc52 Mon Sep 17 00:00:00 2001
2+
From: Jonathan Wakely <[email protected]>
3+
Date: Thu, 16 May 2024 17:15:55 +0100
4+
Subject: [PATCH] libstdc++: Fix typo in _Grapheme_cluster_view::_Iterator
5+
[PR115119]
6+
7+
libstdc++-v3/ChangeLog:
8+
9+
PR libstdc++/115119
10+
* include/bits/unicode.h (_Iterator::operator++(int)): Fix typo
11+
in increment expression.
12+
* testsuite/ext/unicode/grapheme_view.cc: Check post-increment
13+
on view's iterator.
14+
15+
Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=c9e05b03c18e898be604ab90401476e9c473cc52
16+
Modified paths, to make it work
17+
---
18+
bits/unicode.h | 6 ++++--
19+
1 files changed, 4 insertions(+), 2 deletions(-)
20+
21+
diff --git a/bits/unicode.h b/bits/unicode.h
22+
index 46238143fb61..a14a17c5dfcf 100644
23+
--- a/bits/unicode.h
24+
+++ b/bits/unicode.h
25+
@@ -34,10 +34,12 @@
26+
#include <array>
27+
#include <bit> // bit_width
28+
#include <charconv> // __detail::__from_chars_alnum_to_val_table
29+
+#include <string_view>
30+
#include <cstdint>
31+
#include <bits/stl_algo.h>
32+
#include <bits/stl_iterator.h>
33+
-#include <bits/ranges_base.h>
34+
+#include <bits/ranges_base.h> // iterator_t, sentinel_t, input_range, etc.
35+
+#include <bits/ranges_util.h> // view_interface
36+
37+
namespace std _GLIBCXX_VISIBILITY(default)
38+
{
39+
@@ -802,7 +804,7 @@ inline namespace __v15_1_0
40+
operator++(int)
41+
{
42+
auto __tmp = *this;
43+
- ++this;
44+
+ ++*this;
45+
return __tmp;
46+
}
47+

.github/workflows/android.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
release:
55
types: [published]
66
push:
7-
branches: ["main"]
7+
branches: ['main']
88
pull_request:
99
workflow_dispatch:
1010

@@ -23,7 +23,7 @@ jobs:
2323
steps:
2424
- uses: actions/checkout@v4
2525
with:
26-
fetch-depth: "0"
26+
fetch-depth: '0'
2727

2828
# NOTE: meson has no dependencies, so --break-system-packages doesn't really break anything!
2929
- name: Setup Meson
@@ -32,30 +32,29 @@ jobs:
3232
3333
- name: Setup ninja
3434
run: |
35-
sudo apt-get update
36-
sudo apt-get install ninja-build jq
35+
sudo apt-get update
36+
sudo apt-get install ninja-build jq -y --no-install-recommends
3737
3838
- name: Setup JDK
3939
uses: actions/setup-java@v4
4040
with:
4141
distribution: 'temurin'
4242
java-version: '21'
43-
43+
4444
- name: Setup Android SDK
4545
uses: android-actions/setup-android@v3
46-
46+
4747
- name: Setup NDK
48-
run: |
48+
run: |
4949
sdkmanager --install "ndk;27.1.12297006"
5050
51-
5251
- name: Build native libraries
5352
run: |
5453
bash ./platforms/build-android.sh ${{ matrix.config.arch }} complete_rebuild release
5554
cp -r ./assets/ platforms/android/app/src/main
5655
5756
- name: Build APK
58-
run: |
57+
run: |
5958
cd platforms/android/
6059
./gradlew assembleDebug --no-daemon -PANDROID_ABI=${{ matrix.config.arch }}
6160

.github/workflows/build.yml

Lines changed: 36 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build CI
22

33
on:
44
push:
5-
branches: ["main"]
5+
branches: ['main']
66
pull_request:
77
workflow_dispatch:
88

@@ -30,7 +30,7 @@ jobs:
3030
architecture: x86_64
3131
buildtype: release
3232
library_type: static
33-
shell: "msys2 {0}"
33+
shell: 'msys2 {0}'
3434

3535
- name: Windows UCRT Release
3636
os: windows
@@ -39,7 +39,7 @@ jobs:
3939
architecture: ucrt-x86_64
4040
buildtype: release
4141
library_type: static
42-
shell: "msys2 {0}"
42+
shell: 'msys2 {0}'
4343

4444
- name: Linux Release
4545
os: ubuntu
@@ -90,15 +90,14 @@ jobs:
9090
steps:
9191
- uses: actions/checkout@v4
9292
with:
93-
fetch-depth: "0"
93+
fetch-depth: '0'
9494

9595
- name: Setup MSVC (Windows)
9696
if: matrix.config.os == 'windows' && matrix.config.environment == 'msvc'
9797
uses: TheMrMilchmann/setup-msvc-dev@v3
9898
with:
9999
arch: x64
100-
toolset: "14.41"
101-
100+
toolset: '14.41'
102101

103102
- name: Setup MYSYS2 (Windows)
104103
if: matrix.config.os == 'windows' && ( matrix.config.environment == 'mingw' || matrix.config.environment == 'ucrt' )
@@ -120,17 +119,31 @@ jobs:
120119
mingw-w64-${{matrix.config.architecture}}-cmake
121120
git
122121
123-
- name: Setup Clang (Linux)
124-
if: matrix.config.os == 'ubuntu' && matrix.config.use-clang == true
122+
- name: Setup Clang (Linux) (libc++)
123+
if: matrix.config.os == 'ubuntu' && matrix.config.use-clang == true && matrix.config.use-clang_stdlib
125124
run: |
126125
wget https://apt.llvm.org/llvm.sh
127126
chmod +x llvm.sh
128-
sudo ./llvm.sh 18
129-
sudo apt-get install libc++-18* libc++abi*18* -y
130-
echo "CC=clang-18" >> "$GITHUB_ENV"
131-
echo "CXX=clang++-18" >> "$GITHUB_ENV"
132-
echo "OBJC=clang-18" >> "$GITHUB_ENV"
133-
127+
sudo ./llvm.sh 19
128+
sudo apt-get install libc++-19* libc++abi*19* -y --no-install-recommends
129+
echo "CC=clang-19" >> "$GITHUB_ENV"
130+
echo "CXX=clang++-19" >> "$GITHUB_ENV"
131+
echo "OBJC=clang-19" >> "$GITHUB_ENV"
132+
133+
- name: Setup Clang (Linux) (libstdc++)
134+
if: matrix.config.os == 'ubuntu' && matrix.config.use-clang == true && (! matrix.config.use-clang_stdlib)
135+
run: |
136+
wget https://apt.llvm.org/llvm.sh
137+
chmod +x llvm.sh
138+
sudo ./llvm.sh 19
139+
echo "CC=clang-19" >> "$GITHUB_ENV"
140+
echo "CXX=clang++-19" >> "$GITHUB_ENV"
141+
echo "OBJC=clang-19" >> "$GITHUB_ENV"
142+
# Patch the libstd++ library, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115119
143+
# This is a dirty workaround, but it is needed, since gcc 14.2 (where this was patched usptream) is not easily available
144+
# If we use the oracular (Ubuntu 24.10) repos, we could install gcc 14.2, but clang-19 isn't compatible with that
145+
# TODO: remove this, after it works again
146+
sudo patch -p1 /usr/include/c++/14/bits/unicode.h .github/patches/gcc_14_2.diff
134147
135148
- name: Setup GCC (Linux)
136149
if: matrix.config.os == 'ubuntu' && matrix.config.use-clang == false
@@ -143,10 +156,11 @@ jobs:
143156
if: matrix.config.os == 'macos'
144157
run: |
145158
brew update
146-
brew install llvm@18
147-
echo "$(brew --prefix)/opt/llvm@18/bin" >> $GITHUB_PATH
148-
echo "LDFLAGS=-L$(brew --prefix)/opt/llvm@18/lib -L$(brew --prefix)/opt/llvm@18/lib/c++ -Wl,-rpath,$(brew --prefix)/opt/llvm@18/lib/c++" >> "$GITHUB_ENV"
149-
echo "CPPFLAGS=-I$(brew --prefix)/opt/llvm@18/include" >> "$GITHUB_ENV"
159+
# TODO annotate with lld@19, after that is accepted, we don't want to use lld@20 without manually updating it !
160+
brew install llvm@19 lld
161+
echo "$(brew --prefix)/opt/llvm/bin" >> $GITHUB_PATH
162+
echo "LDFLAGS=-L$(brew --prefix)/opt/llvm/lib -L$(brew --prefix)/opt/llvm/lib/c++ -Wl,-rpath,$(brew --prefix)/opt/llvm/lib/c++" >> "$GITHUB_ENV"
163+
echo "CPPFLAGS=-I$(brew --prefix)/opt/llvm/include" >> "$GITHUB_ENV"
150164
echo "CC=clang" >> "$GITHUB_ENV"
151165
echo "CXX=clang++" >> "$GITHUB_ENV"
152166
echo "OBJC=clang" >> "$GITHUB_ENV"
@@ -155,7 +169,7 @@ jobs:
155169
echo "OBJC_LD=lld" >> "$GITHUB_ENV"
156170
157171
- name: Unbreak Python in GHA (MacOS 13 image)
158-
if: matrix.config.os == 'macos' && matrix.config.os-version == 13
172+
if: matrix.config.os == 'macos' && matrix.config.os-version == 13
159173
run: |
160174
# TODO: remove this, after it works again
161175
# A workaround for "The `brew link` step did not complete successfully" error.
@@ -180,7 +194,7 @@ jobs:
180194
if: matrix.config.os == 'ubuntu'
181195
run: |
182196
sudo apt-get update
183-
sudo apt-get install ninja-build libsdl2-2.0-0 libsdl2-dev libsdl2-ttf* libsdl2-mixer* libsdl2-image* -y
197+
sudo apt-get install ninja-build libsdl2-2.0-0 libsdl2-dev libsdl2-ttf* libsdl2-mixer* libsdl2-image* -y --no-install-recommends
184198
185199
- name: Install dependencies (MacOS)
186200
if: matrix.config.os == 'macos'
@@ -189,10 +203,10 @@ jobs:
189203
brew install sdl2 sdl2_ttf sdl2_mixer sdl2_image
190204
191205
- name: Configure
192-
run: meson setup build -Dbuildtype=${{ matrix.config.buildtype }} -Ddefault_library=${{ matrix.config.library_type }} -Dclang_libcpp=${{ ( ( matrix.config.os == 'ubuntu' && matrix.config.use-clang == true && matrix.config.use-clang_stdlib ) || matrix.config.os == 'macos' ) && 'enabled' || 'disabled' }}
206+
run: meson setup build -Dbuildtype=${{ matrix.config.buildtype }} -Ddefault_library=${{ matrix.config.library_type }} -Dclang_libcpp=${{ ( ( matrix.config.os == 'ubuntu' && matrix.config.use-clang == true && matrix.config.use-clang_stdlib ) || matrix.config.os == 'macos' ) && 'enabled' || 'disabled' }}
193207

194208
- name: Build
195-
run: meson compile -C build
209+
run: meson compile -C build
196210

197211
- name: Upload artifacts
198212
uses: actions/upload-artifact@v4

.github/workflows/cpp-linter.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: C++ lints(clang-format + clang-tidy)
22
on:
33
push:
4-
branches: ["main"]
4+
branches: ['main']
55
pull_request:
66
workflow_dispatch:
77

@@ -14,22 +14,22 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v4
1616

17-
# NOTE: meson has no dependencies, so --break-system-packages doesn't really break anything!
17+
# NOTE: meson has no dependencies, so --break-system-packages doesn't really break anything!
1818
- name: Setup Meson
1919
run: |
2020
pip install meson --break-system-packages
2121
2222
- name: Setup Clang
2323
uses: egor-tensin/setup-clang@v1
2424
with:
25-
version: 18
25+
version: 19
2626
platform: x64
2727

2828
- name: Prepare compile_commands.json
2929
run: |
3030
sudo apt-get update
31-
sudo apt-get install ninja-build libsdl2-2.0-0 libsdl2-dev libsdl2-ttf* libsdl2-mixer* libsdl2-image* -y
32-
31+
sudo apt-get install ninja-build libsdl2-2.0-0 libsdl2-dev libsdl2-ttf* libsdl2-mixer* libsdl2-image* -y --no-install-recommends
32+
3333
meson setup build -Dbuildtype=release -Dclang_libcpp=disabled -Dtests=true
3434
meson compile -C build git_version.hpp
3535
@@ -40,12 +40,12 @@ jobs:
4040
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4141
with:
4242
style: file
43-
version: 18
43+
version: 19
4444
database: build
4545
files-changed-only: ${{ github.event_name != 'workflow_dispatch' }}
4646
lines-changed-only: ${{ github.event_name != 'workflow_dispatch' }}
4747
thread-comments: true
48-
tidy-checks: ""
48+
tidy-checks: ''
4949
step-summary: true
5050
file-annotations: true
5151
ignore: subprojects|build|android|assets|recordings|docs|toolchains|platforms|wrapper|src/libs/core/hash-library

.github/workflows/flatpak.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ on:
44
release:
55
types: [published]
66
push:
7-
branches: ["main"]
7+
branches: ['main']
88
pull_request:
99
workflow_dispatch:
1010

1111
jobs:
1212
flatpak:
13-
name: "Flatpak build"
13+
name: 'Flatpak build'
1414
runs-on: ubuntu-24.04
1515
container:
1616
image: bilelmoussaoui/flatpak-github-actions:freedesktop-24.08

.github/workflows/installer.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Installer CI
22

33
on:
44
push:
5-
branches: ["main"]
5+
branches: ['main']
66
pull_request:
77
workflow_dispatch:
88

@@ -29,33 +29,33 @@ jobs:
2929
steps:
3030
- uses: actions/checkout@v4
3131
with:
32-
fetch-depth: "0"
32+
fetch-depth: '0'
3333

3434
- name: Setup MSVC (Windows)
3535
if: matrix.config.os == 'windows' && matrix.config.msvc == true
3636
uses: TheMrMilchmann/setup-msvc-dev@v3
3737
with:
3838
arch: x64
39-
toolset: "14.41"
39+
toolset: '14.41'
4040

4141
- name: Setup meson
4242
if: matrix.config.os != 'macos'
4343
run: |
4444
pip install meson
4545
4646
- name: Configure
47-
run: meson setup build -Dbuildtype=${{ matrix.config.buildtype }} -Ddefault_library=${{ matrix.config.library_type }} -Dclang_libcpp=${{ ( ( matrix.config.os == 'ubuntu' && matrix.config.use-clang == true && matrix.config.use-clang_stdlib ) || matrix.config.os == 'macos' ) && 'enabled' || 'disabled' }} -Dbuild_installer=true
47+
run: meson setup build -Dbuildtype=${{ matrix.config.buildtype }} -Ddefault_library=${{ matrix.config.library_type }} -Dclang_libcpp=${{ ( ( matrix.config.os == 'ubuntu' && matrix.config.use-clang == true && matrix.config.use-clang_stdlib ) || matrix.config.os == 'macos' ) && 'enabled' || 'disabled' }} -Dbuild_installer=true
4848

4949
- name: Build
50-
run: meson compile -C build
50+
run: meson compile -C build
5151

5252
- name: Download EnVar plugin for NSIS
5353
uses: carlosperate/download-file-action@v2
5454
with:
5555
file-url: https://nsis.sourceforge.io/mediawiki/images/7/7f/EnVar_plugin.zip
5656
file-name: envar_plugin.zip
5757
location: ${{ github.workspace }}
58-
58+
5959
- name: Extract EnVar plugin
6060
run: 7z x "-oC:/Program Files (x86)/NSIS" "${{ github.workspace }}/envar_plugin.zip"
6161

0 commit comments

Comments
 (0)