diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9a4b7d8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,79 @@ +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 + env: + CI_DONT_TARGET_ANDROID: 1 + 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 + env: + CI_DONT_TARGET_ANDROID: 1 + 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 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 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