diff --git a/.github/scripts/fix-toolchain.sh b/.github/scripts/fix-toolchain.sh new file mode 100755 index 0000000..447ef4c --- /dev/null +++ b/.github/scripts/fix-toolchain.sh @@ -0,0 +1,33 @@ +#!/bin/bash +set -e + +# Find the path to swift binary +SWIFT_PATH=$(which swift) +echo "Swift binary found at: $SWIFT_PATH" + +# Extract the toolchain path from swift binary path +# Remove /usr/bin/swift from the path to get the toolchain root +TOOLCHAIN_ROOT=$(dirname $(dirname "$SWIFT_PATH")) +echo "Toolchain root: $TOOLCHAIN_ROOT" + +# Construct the path to CFBase.h +CFBASE_PATH="$TOOLCHAIN_ROOT/lib/swift/CoreFoundation/CFBase.h" +echo "Looking for CFBase.h at: $CFBASE_PATH" + +# Check if the file exists +if [ -f "$CFBASE_PATH" ]; then + echo "Found CFBase.h, applying patch..." + + # Create a backup of the original file + cp "$CFBASE_PATH" "$CFBASE_PATH.bak" + + # Replace the include line + sed -i 's/#include /\/\/ #include /g' "$CFBASE_PATH" + + echo "Patch applied successfully." + echo "Original file backed up at $CFBASE_PATH.bak" +else + echo "ERROR: Could not find CFBase.h in expected location." + echo "Toolchain structure may be different than expected." + exit 1 +fi diff --git a/.github/workflows/compatibility_tests.yml b/.github/workflows/compatibility_tests.yml index ef4a285..5f7b077 100644 --- a/.github/workflows/compatibility_tests.yml +++ b/.github/workflows/compatibility_tests.yml @@ -14,7 +14,7 @@ jobs: matrix: include: - os: macos-15 - xcode-version: "16.0" # Swift 6.0 + xcode-version: "16.3" # Swift 6.1 runs-on: ${{ matrix.os }} env: OPENBOX_WERROR: 1 diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 0a7e8ba..0f8f540 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -13,7 +13,7 @@ jobs: fail-fast: false matrix: os: [macos-15] - xcode-version: ["16.0"] # Swift 6.0 + xcode-version: ["16.3"] # Swift 6.1 ios-version: ["18.0"] include: - ios-version: "18.0" diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 6d3ab84..5ed5db8 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -13,7 +13,7 @@ jobs: fail-fast: false matrix: os: [macos-15] - xcode-version: [16.0] # Swift 6.0 + xcode-version: [16.3] # Swift 6.1 runs-on: ${{ matrix.os }} env: OPENBOX_WERROR: 1 diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index cd0524a..253918d 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - swift_version: ["6.0"] + swift_version: ["6.1"] runs-on: ubuntu-22.04 env: OPENBOX_WERROR: 1 @@ -24,6 +24,10 @@ jobs: - name: Swift version run: | which swift && swift --version + - name: Toolchain fix patch + run: | + # Fix swift-corelibs-foundation#5211 + .github/scripts/fix-toolchain.sh - name: Building and running tests in debug mode with coverage run: | swift test \ diff --git a/README.md b/README.md index af584cb..0667ab5 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,18 @@ RenderBox is a high performance rendering engine written in C++. And it powers the underlying rendering of SwiftUI. +The project is for the following purposes: +- Add RB support for non-Apple platform (eg. Linux, WASI and Windows) +- Diagnose and debug RB issues on Apple platform + +Currently, this project is in early development. + +## Build + +The current suggested toolchain to build the project is Swift 6.1 / Xcode 16.3. + +## Supported platforms + | **CI Status** | |---| |[![Compatibility tests](https://github.com/OpenSwiftUIProject/OpenBox/actions/workflows/compatibility_tests.yml/badge.svg)](https://github.com/OpenSwiftUIProject/OpenBox/actions/workflows/compatibility_tests.yml)| @@ -19,12 +31,6 @@ And it powers the underlying rendering of SwiftUI. |[![iOS](https://github.com/OpenSwiftUIProject/OpenBox/actions/workflows/ios.yml/badge.svg)](https://github.com/OpenSwiftUIProject/OpenBox/actions/workflows/ios.yml)| |[![Ubuntu](https://github.com/OpenSwiftUIProject/OpenBox/actions/workflows/ubuntu.yml/badge.svg)](https://github.com/OpenSwiftUIProject/OpenBox/actions/workflows/ubuntu.yml)| -The project is for the following purposes: -- Add OB support for non-Apple platform (eg. Linux, WASI and Windows) -- Diagnose and debug RB issues on Apple platform - -Currently, this project is in early development. - ## License See LICENSE file - MIT