Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/patches/gcc_14_2.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
From c9e05b03c18e898be604ab90401476e9c473cc52 Mon Sep 17 00:00:00 2001
From: Jonathan Wakely <[email protected]>
Date: Thu, 16 May 2024 17:15:55 +0100
Subject: [PATCH] libstdc++: Fix typo in _Grapheme_cluster_view::_Iterator
[PR115119]

libstdc++-v3/ChangeLog:

PR libstdc++/115119
* include/bits/unicode.h (_Iterator::operator++(int)): Fix typo
in increment expression.
* testsuite/ext/unicode/grapheme_view.cc: Check post-increment
on view's iterator.

Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=c9e05b03c18e898be604ab90401476e9c473cc52
Modified paths, to make it work
---
bits/unicode.h | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/bits/unicode.h b/bits/unicode.h
index 46238143fb61..a14a17c5dfcf 100644
--- a/bits/unicode.h
+++ b/bits/unicode.h
@@ -34,10 +34,12 @@
#include <array>
#include <bit> // bit_width
#include <charconv> // __detail::__from_chars_alnum_to_val_table
+#include <string_view>
#include <cstdint>
#include <bits/stl_algo.h>
#include <bits/stl_iterator.h>
-#include <bits/ranges_base.h>
+#include <bits/ranges_base.h> // iterator_t, sentinel_t, input_range, etc.
+#include <bits/ranges_util.h> // view_interface

namespace std _GLIBCXX_VISIBILITY(default)
{
@@ -802,7 +804,7 @@ inline namespace __v15_1_0
operator++(int)
{
auto __tmp = *this;
- ++this;
+ ++*this;
return __tmp;
}

17 changes: 8 additions & 9 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
release:
types: [published]
push:
branches: ["main"]
branches: ['main']
pull_request:
workflow_dispatch:

Expand All @@ -23,7 +23,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0"
fetch-depth: '0'

# NOTE: meson has no dependencies, so --break-system-packages doesn't really break anything!
- name: Setup Meson
Expand All @@ -32,30 +32,29 @@ jobs:

- name: Setup ninja
run: |
sudo apt-get update
sudo apt-get install ninja-build jq
sudo apt-get update
sudo apt-get install ninja-build jq -y --no-install-recommends

- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'

- name: Setup Android SDK
uses: android-actions/setup-android@v3

- name: Setup NDK
run: |
run: |
sdkmanager --install "ndk;27.1.12297006"


- name: Build native libraries
run: |
bash ./platforms/build-android.sh ${{ matrix.config.arch }} complete_rebuild release
cp -r ./assets/ platforms/android/app/src/main

- name: Build APK
run: |
run: |
cd platforms/android/
./gradlew assembleDebug --no-daemon -PANDROID_ABI=${{ matrix.config.arch }}

Expand Down
58 changes: 36 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build CI

on:
push:
branches: ["main"]
branches: ['main']
pull_request:
workflow_dispatch:

Expand Down Expand Up @@ -30,7 +30,7 @@ jobs:
architecture: x86_64
buildtype: release
library_type: static
shell: "msys2 {0}"
shell: 'msys2 {0}'

- name: Windows UCRT Release
os: windows
Expand All @@ -39,7 +39,7 @@ jobs:
architecture: ucrt-x86_64
buildtype: release
library_type: static
shell: "msys2 {0}"
shell: 'msys2 {0}'

- name: Linux Release
os: ubuntu
Expand Down Expand Up @@ -90,15 +90,14 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0"
fetch-depth: '0'

- name: Setup MSVC (Windows)
if: matrix.config.os == 'windows' && matrix.config.environment == 'msvc'
uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: x64
toolset: "14.41"

toolset: '14.41'

- name: Setup MYSYS2 (Windows)
if: matrix.config.os == 'windows' && ( matrix.config.environment == 'mingw' || matrix.config.environment == 'ucrt' )
Expand All @@ -120,17 +119,31 @@ jobs:
mingw-w64-${{matrix.config.architecture}}-cmake
git

- name: Setup Clang (Linux)
if: matrix.config.os == 'ubuntu' && matrix.config.use-clang == true
- name: Setup Clang (Linux) (libc++)
if: matrix.config.os == 'ubuntu' && matrix.config.use-clang == true && matrix.config.use-clang_stdlib
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 18
sudo apt-get install libc++-18* libc++abi*18* -y
echo "CC=clang-18" >> "$GITHUB_ENV"
echo "CXX=clang++-18" >> "$GITHUB_ENV"
echo "OBJC=clang-18" >> "$GITHUB_ENV"

sudo ./llvm.sh 19
sudo apt-get install libc++-19* libc++abi*19* -y --no-install-recommends
echo "CC=clang-19" >> "$GITHUB_ENV"
echo "CXX=clang++-19" >> "$GITHUB_ENV"
echo "OBJC=clang-19" >> "$GITHUB_ENV"

- name: Setup Clang (Linux) (libstdc++)
if: matrix.config.os == 'ubuntu' && matrix.config.use-clang == true && (! matrix.config.use-clang_stdlib)
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 19
echo "CC=clang-19" >> "$GITHUB_ENV"
echo "CXX=clang++-19" >> "$GITHUB_ENV"
echo "OBJC=clang-19" >> "$GITHUB_ENV"
# Patch the libstd++ library, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115119
# This is a dirty workaround, but it is needed, since gcc 14.2 (where this was patched usptream) is not easily available
# If we use the oracular (Ubuntu 24.10) repos, we could install gcc 14.2, but clang-19 isn't compatible with that
# TODO: remove this, after it works again
sudo patch -p1 /usr/include/c++/14/bits/unicode.h .github/patches/gcc_14_2.diff

- name: Setup GCC (Linux)
if: matrix.config.os == 'ubuntu' && matrix.config.use-clang == false
Expand All @@ -143,10 +156,11 @@ jobs:
if: matrix.config.os == 'macos'
run: |
brew update
brew install llvm@18
echo "$(brew --prefix)/opt/llvm@18/bin" >> $GITHUB_PATH
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"
echo "CPPFLAGS=-I$(brew --prefix)/opt/llvm@18/include" >> "$GITHUB_ENV"
# TODO annotate with lld@19, after that is accepted, we don't want to use lld@20 without manually updating it !
brew install llvm@19 lld
echo "$(brew --prefix)/opt/llvm/bin" >> $GITHUB_PATH
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"
echo "CPPFLAGS=-I$(brew --prefix)/opt/llvm/include" >> "$GITHUB_ENV"
echo "CC=clang" >> "$GITHUB_ENV"
echo "CXX=clang++" >> "$GITHUB_ENV"
echo "OBJC=clang" >> "$GITHUB_ENV"
Expand All @@ -155,7 +169,7 @@ jobs:
echo "OBJC_LD=lld" >> "$GITHUB_ENV"

- name: Unbreak Python in GHA (MacOS 13 image)
if: matrix.config.os == 'macos' && matrix.config.os-version == 13
if: matrix.config.os == 'macos' && matrix.config.os-version == 13
run: |
# TODO: remove this, after it works again
# A workaround for "The `brew link` step did not complete successfully" error.
Expand All @@ -180,7 +194,7 @@ jobs:
if: matrix.config.os == 'ubuntu'
run: |
sudo apt-get update
sudo apt-get install ninja-build libsdl2-2.0-0 libsdl2-dev libsdl2-ttf* libsdl2-mixer* libsdl2-image* -y
sudo apt-get install ninja-build libsdl2-2.0-0 libsdl2-dev libsdl2-ttf* libsdl2-mixer* libsdl2-image* -y --no-install-recommends

- name: Install dependencies (MacOS)
if: matrix.config.os == 'macos'
Expand All @@ -189,10 +203,10 @@ jobs:
brew install sdl2 sdl2_ttf sdl2_mixer sdl2_image

- name: Configure
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' }}
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' }}

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

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/cpp-linter.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: C++ lints(clang-format + clang-tidy)
on:
push:
branches: ["main"]
branches: ['main']
pull_request:
workflow_dispatch:

Expand All @@ -14,22 +14,22 @@ jobs:
steps:
- uses: actions/checkout@v4

# NOTE: meson has no dependencies, so --break-system-packages doesn't really break anything!
# NOTE: meson has no dependencies, so --break-system-packages doesn't really break anything!
- name: Setup Meson
run: |
pip install meson --break-system-packages

- name: Setup Clang
uses: egor-tensin/setup-clang@v1
with:
version: 18
version: 19
platform: x64

- name: Prepare compile_commands.json
run: |
sudo apt-get update
sudo apt-get install ninja-build libsdl2-2.0-0 libsdl2-dev libsdl2-ttf* libsdl2-mixer* libsdl2-image* -y
sudo apt-get install ninja-build libsdl2-2.0-0 libsdl2-dev libsdl2-ttf* libsdl2-mixer* libsdl2-image* -y --no-install-recommends

meson setup build -Dbuildtype=release -Dclang_libcpp=disabled -Dtests=true
meson compile -C build git_version.hpp

Expand All @@ -40,12 +40,12 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: file
version: 18
version: 19
database: build
files-changed-only: ${{ github.event_name != 'workflow_dispatch' }}
lines-changed-only: ${{ github.event_name != 'workflow_dispatch' }}
thread-comments: true
tidy-checks: ""
tidy-checks: ''
step-summary: true
file-annotations: true
ignore: subprojects|build|android|assets|recordings|docs|toolchains|platforms|wrapper|src/libs/core/hash-library
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ on:
release:
types: [published]
push:
branches: ["main"]
branches: ['main']
pull_request:
workflow_dispatch:

jobs:
flatpak:
name: "Flatpak build"
name: 'Flatpak build'
runs-on: ubuntu-24.04
container:
image: bilelmoussaoui/flatpak-github-actions:freedesktop-24.08
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Installer CI

on:
push:
branches: ["main"]
branches: ['main']
pull_request:
workflow_dispatch:

Expand All @@ -29,33 +29,33 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0"
fetch-depth: '0'

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

- name: Setup meson
if: matrix.config.os != 'macos'
run: |
pip install meson

- name: Configure
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
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

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

- name: Download EnVar plugin for NSIS
uses: carlosperate/download-file-action@v2
with:
file-url: https://nsis.sourceforge.io/mediawiki/images/7/7f/EnVar_plugin.zip
file-name: envar_plugin.zip
location: ${{ github.workspace }}

- name: Extract EnVar plugin
run: 7z x "-oC:/Program Files (x86)/NSIS" "${{ github.workspace }}/envar_plugin.zip"

Expand Down
Loading
Loading