From c42876e0ee63f19229a555315175f3b62fdd4a59 Mon Sep 17 00:00:00 2001 From: Susko3 Date: Sat, 30 Aug 2025 22:10:02 +0200 Subject: [PATCH 1/3] Add simple CI workflow that builds all platforms --- .github/workflows/ci.yml | 75 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0e52c0a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,75 @@ +name: Continuous Integration +on: [push, pull_request] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read # to fetch code (actions/checkout) + +jobs: + build-only-desktop: + name: Build only (Desktop) + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install .NET 8.0.x + uses: actions/setup-dotnet@v4 + with: + dotnet-version: "8.0.x" + + - name: Build + run: dotnet build -c Debug SDL3-CS.Desktop.slnf + + build-only-android: + name: Build only (Android) + runs-on: windows-latest + timeout-minutes: 60 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup JDK 11 + uses: actions/setup-java@v4 + with: + distribution: microsoft + java-version: 11 + + - name: Install .NET 8.0.x + uses: actions/setup-dotnet@v4 + with: + dotnet-version: "8.0.x" + + - name: Install .NET workloads + run: dotnet workload install android + + - name: Build + run: dotnet build -c Debug SDL3-CS.Android.slnf + + build-only-ios: + name: Build only (iOS) + runs-on: macos-15 + timeout-minutes: 60 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install .NET 8.0.x + uses: actions/setup-dotnet@v4 + with: + dotnet-version: "8.0.x" + + - name: Install .NET Workloads + run: dotnet workload install ios + + # https://github.com/dotnet/macios/issues/19157 + # https://github.com/actions/runner-images/issues/12758 + - name: Use Xcode 16.4 + run: sudo xcode-select -switch /Applications/Xcode_16.4.app + + - name: Build + run: dotnet build -c Debug SDL3-CS.iOS.slnf From db3993e71b32de9fa8d5547bd6bacf6b5271375e Mon Sep 17 00:00:00 2001 From: Susko3 Date: Sat, 30 Aug 2025 22:19:11 +0200 Subject: [PATCH 2/3] Fix build failing if SDL is not cloned --- SDL3-CS.Tests/SDL3-CS.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SDL3-CS.Tests/SDL3-CS.Tests.csproj b/SDL3-CS.Tests/SDL3-CS.Tests.csproj index f2157b3..fa3114e 100644 --- a/SDL3-CS.Tests/SDL3-CS.Tests.csproj +++ b/SDL3-CS.Tests/SDL3-CS.Tests.csproj @@ -28,7 +28,7 @@ - + sample.png PreserveNewest From 95010b084672bdbec02797d035d5ebd4074cbe19 Mon Sep 17 00:00:00 2001 From: Susko3 Date: Sat, 30 Aug 2025 23:05:35 +0200 Subject: [PATCH 3/3] Add envvar CI_DONT_TARGET_ANDROID=1 to fix CI build without android workload --- .github/workflows/ci.yml | 4 ++++ SDL3-CS/SDL3-CS.csproj | 3 ++- SDL3_image-CS/SDL3_image-CS.csproj | 3 ++- SDL3_mixer-CS/SDL3_mixer-CS.csproj | 3 ++- SDL3_ttf-CS/SDL3_ttf-CS.csproj | 3 ++- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e52c0a..9a4b7d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,8 @@ jobs: name: Build only (Desktop) runs-on: ubuntu-latest timeout-minutes: 60 + env: + CI_DONT_TARGET_ANDROID: 1 steps: - name: Checkout uses: actions/checkout@v4 @@ -54,6 +56,8 @@ jobs: name: Build only (iOS) runs-on: macos-15 timeout-minutes: 60 + env: + CI_DONT_TARGET_ANDROID: 1 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/SDL3-CS/SDL3-CS.csproj b/SDL3-CS/SDL3-CS.csproj index 170dabf..7d46bf5 100644 --- a/SDL3-CS/SDL3-CS.csproj +++ b/SDL3-CS/SDL3-CS.csproj @@ -2,7 +2,8 @@ SDL - net8.0;net8.0-android + net8.0;net8.0-android + net8.0 21 enable true diff --git a/SDL3_image-CS/SDL3_image-CS.csproj b/SDL3_image-CS/SDL3_image-CS.csproj index 3bbbe3c..b868fd5 100644 --- a/SDL3_image-CS/SDL3_image-CS.csproj +++ b/SDL3_image-CS/SDL3_image-CS.csproj @@ -1,7 +1,8 @@  - net8.0;net8.0-android + net8.0;net8.0-android + net8.0 21 SDL enable diff --git a/SDL3_mixer-CS/SDL3_mixer-CS.csproj b/SDL3_mixer-CS/SDL3_mixer-CS.csproj index 881e7da..ac24899 100644 --- a/SDL3_mixer-CS/SDL3_mixer-CS.csproj +++ b/SDL3_mixer-CS/SDL3_mixer-CS.csproj @@ -1,7 +1,8 @@  - net8.0;net8.0-android + net8.0;net8.0-android + net8.0 21 SDL enable diff --git a/SDL3_ttf-CS/SDL3_ttf-CS.csproj b/SDL3_ttf-CS/SDL3_ttf-CS.csproj index 62d36dc..89c8680 100644 --- a/SDL3_ttf-CS/SDL3_ttf-CS.csproj +++ b/SDL3_ttf-CS/SDL3_ttf-CS.csproj @@ -1,7 +1,8 @@  - net8.0;net8.0-android + net8.0;net8.0-android + net8.0 21 SDL enable