Skip to content

Commit

Permalink
Merge branch 'master' into bring-back-borderless
Browse files Browse the repository at this point in the history
  • Loading branch information
Susko3 committed Nov 22, 2024
2 parents f3dfc4a + dc98996 commit 9c2e2a5
Show file tree
Hide file tree
Showing 267 changed files with 10,916 additions and 5,809 deletions.
117 changes: 116 additions & 1 deletion .github/workflows/build-ffmpeg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,80 @@ jobs:

- name: Combine
run: osu.Framework.NativeLibs/scripts/ffmpeg/combine_dylibs.sh
env:
platform: macOS

- name: Upload
uses: actions/upload-artifact@v4
with:
name: macOS-universal
path: macOS-universal

build-iOS:
name: Build iOS
runs-on: macos-12
strategy:
matrix:
arch: [arm64, simulator-arm64, simulator-x86_64]

steps:
- name: Checkout
uses: actions/checkout@v4

- uses: ilammy/setup-nasm@v1
if: matrix.arch == 'simulator-x86_64'

- name: Setup gas-preprocessor
run: |
git clone --depth=1 https://github.com/FFmpeg/gas-preprocessor
echo "GAS_PREPROCESSOR=$PWD/gas-preprocessor/gas-preprocessor.pl" >> $GITHUB_ENV
- name: Build
run: osu.Framework.NativeLibs/scripts/ffmpeg/build-iOS.sh
env:
arch: ${{ matrix.arch }}

- name: Upload
uses: actions/upload-artifact@v4
with:
name: iOS-${{ matrix.arch }}
path: iOS-${{ matrix.arch }}

combine-iOS:
name: Combine iOS libs
runs-on: macos-12
needs: build-iOS
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: actions/download-artifact@v4
with:
name: iOS-simulator-x86_64
path: iOS-simulator-x86_64
- uses: actions/download-artifact@v4
with:
name: iOS-simulator-arm64
path: iOS-simulator-arm64
- uses: actions/download-artifact@v4
with:
name: iOS-arm64
path: iOS-arm64

- name: Combine dylibs
run: osu.Framework.NativeLibs/scripts/ffmpeg/combine_dylibs.sh
env:
platform: iOS-simulator

- name: Create XCFrameworks
run: osu.Framework.NativeLibs/scripts/ffmpeg/create-xcframeworks.sh

- name: Upload
uses: actions/upload-artifact@v4
with:
name: iOS-xcframework
path: iOS-xcframework

build-win:
name: Build Windows
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -112,7 +179,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install nasm libva-dev libvdpau-dev
sudo apt-get install nasm
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -126,14 +193,42 @@ jobs:
name: linux-x64
path: linux-x64

build-android:
name: Build Android
runs-on: ubuntu-22.04
strategy:
matrix:
arch:
- armeabi-v7a
- arm64-v8a
- x86
- x86_64

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build
run: osu.Framework.NativeLibs/scripts/ffmpeg/build-android.sh
env:
arch: ${{ matrix.arch }}

- name: Upload
uses: actions/upload-artifact@v4
with:
name: android-${{ matrix.arch }}
path: android-${{ matrix.arch }}

make-pr:
name: Create pull request
runs-on: ubuntu-22.04
needs:
- combine-macos
- combine-iOS
- build-win
- build-win-arm64
- build-linux
- build-android
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -142,6 +237,10 @@ jobs:
with:
name: macOS-universal
path: osu.Framework.NativeLibs/runtimes/osx/native
- uses: actions/download-artifact@v4
with:
name: iOS-xcframework
path: osu.Framework.iOS/runtimes/ios/native
- uses: actions/download-artifact@v4
with:
name: linux-x64
Expand All @@ -158,6 +257,22 @@ jobs:
with:
name: win-x86
path: osu.Framework.NativeLibs/runtimes/win-x86/native
- uses: actions/download-artifact@v4
with:
name: android-armeabi-v7a
path: osu.Framework.Android/armeabi-v7a
- uses: actions/download-artifact@v4
with:
name: android-arm64-v8a
path: osu.Framework.Android/arm64-v8a
- uses: actions/download-artifact@v4
with:
name: android-x86
path: osu.Framework.Android/x86
- uses: actions/download-artifact@v4
with:
name: android-x86_64
path: osu.Framework.Android/x86_64

- uses: peter-evans/create-pull-request@v6
with:
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ jobs:

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.21.9

- name: Install httpbin
run: go install github.com/mccutchen/go-httpbin/v2/cmd/go-httpbin@latest
Expand All @@ -88,13 +90,13 @@ jobs:
run: dotnet build -c ${{matrix.os.configuration}} -warnaserror osu-framework.Desktop.slnf

- name: Test
run: dotnet test $pwd/**/*.Tests/bin/${{matrix.os.configuration}}/*/*.Tests.dll --no-build --settings $pwd/build/vstestconfig.runsettings --logger "trx;LogFileName=TestResults-${{matrix.os.prettyname}}-${{matrix.threadingMode}}-${{matrix.os.configuration}}.trx"
run: dotnet test $pwd/**/*.Tests/bin/${{matrix.os.configuration}}/*/*.Tests.dll --no-build --logger "trx;LogFileName=TestResults-${{matrix.os.prettyname}}-${{matrix.threadingMode}}-${{matrix.os.configuration}}.trx" -- NUnit.ConsoleOut=0
shell: pwsh

# Attempt to upload results even if test fails.
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#always
- name: Upload Test Results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: osu-framework-test-results-${{matrix.os.prettyname}}-${{matrix.threadingMode}}-${{matrix.os.configuration}}
Expand Down Expand Up @@ -139,9 +141,8 @@ jobs:
dotnet-version: "8.0.x"

- name: Restore .NET workloads
# `dotnet workload restore` is bugged in .NET 7.0.101+ when restoring iOS projects,
# see https://github.com/xamarin/xamarin-macios/issues/16400.
run: dotnet workload install ios
run: dotnet workload install ios --from-rollback-file workloads.json

- name: Compile
run: dotnet build -c Debug osu-framework.iOS.slnf

4 changes: 1 addition & 3 deletions .github/workflows/deploy-pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,7 @@ jobs:
dotnet-version: "8.0.x"

- name: Restore .NET Workloads
# `dotnet workload restore` is bugged in .NET 7.0.101+ when restoring iOS projects,
# see https://github.com/xamarin/xamarin-macios/issues/16400.
run: dotnet workload install ios
run: dotnet workload install ios --from-rollback-file workloads.json

- name: Pack (iOS Framework)
run: dotnet pack -c Release osu.Framework.iOS /p:Version=${{ github.ref_name }} /p:GenerateDocumentationFile=true -o ${{steps.artifactsPath.outputs.nuget_artifacts}}
Expand Down
34 changes: 22 additions & 12 deletions .github/workflows/report-nunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,40 @@
name: Annotate CI run with test results
on:
workflow_run:
workflows: ["Continuous Integration"]
workflows: [ "Continuous Integration" ]
types:
- completed

permissions:
contents: read
actions: read
checks: write

jobs:
annotate:
name: Annotate CI run with test results
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion != 'cancelled' }}
strategy:
fail-fast: false
matrix:
os:
- { prettyname: Windows, configuration: Debug }
- { prettyname: macOS, configuration: Debug }
- { prettyname: Linux, configuration: Debug }
- { prettyname: Linux, configuration: Release }
threadingMode: ['SingleThread', 'MultiThreaded']
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ github.event.workflow_run.repository.full_name }}
ref: ${{ github.event.workflow_run.head_sha }}

- name: Download results
uses: actions/download-artifact@v4
with:
pattern: osu-framework-test-results-*
merge-multiple: true
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ github.token }}

- name: Annotate CI run with test results
uses: dorny/[email protected]
with:
artifact: osu-framework-test-results-${{matrix.os.prettyname}}-${{matrix.threadingMode}}-${{matrix.os.configuration}}
name: Test Results (${{matrix.os.prettyname}}, ${{matrix.threadingMode}}, ${{matrix.os.configuration}})
name: Results
path: "*.trx"
reporter: dotnet-trx
list-suites: 'failed'
Expand Down
16 changes: 12 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,15 @@ fabric.properties
# Reference: https://github.com/JetBrains/resharper-rider-samples/blob/master/.gitignore

# User specific
**/.idea/**/workspace.xml
**/.idea/**/tasks.xml
**/.idea/shelf/*
**/.idea/dictionaries
**/.idea/httpRequests/
**/.idea/**/usage.statistics.xml
**/.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
.idea/*/.idea/projectSettingsUpdater.xml
.idea/*/.idea/encodings.xml

# Sensitive or high-churn files
**/.idea/**/dataSources/
Expand All @@ -339,3 +342,8 @@ inspectcode

.idea/.idea.osu-framework.Desktop/.idea/misc.xml
.idea/.idea.osu-framework.Android/.idea/deploymentTargetDropDown.xml

# NativeLibs build folders and tarballs
osu.Framework.NativeLibs/scripts/ffmpeg/*/
osu.Framework.NativeLibs/scripts/ffmpeg/*.tar.gz

This file was deleted.

4 changes: 0 additions & 4 deletions .idea/.idea.osu-framework.Desktop/.idea/encodings.xml

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/.idea.osu-framework/.idea/projectSettingsUpdater.xml

This file was deleted.

4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"${workspaceRoot}/SampleGame.Desktop/bin/Debug/net8.0/SampleGame.Desktop.dll",
],
"cwd": "${workspaceRoot}",
"preLaunchTask": "Build (Debug)",
"preLaunchTask": "Build SampleGame (Debug)",
"linux": {
"env": {
"LD_LIBRARY_PATH": "${workspaceRoot}/SampleGame.Desktop/bin/Debug/net8.0:${env:LD_LIBRARY_PATH}"
Expand All @@ -75,7 +75,7 @@
"${workspaceRoot}/SampleGame.Desktop/bin/Release/net8.0/SampleGame.Desktop.dll",
],
"cwd": "${workspaceRoot}",
"preLaunchTask": "Build (Release)",
"preLaunchTask": "Build SampleGame (Release)",
"linux": {
"env": {
"LD_LIBRARY_PATH": "${workspaceRoot}/SampleGame.Desktop/bin/Release/net8.0:${env:LD_LIBRARY_PATH}"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ This framework is intended to take steps beyond what you would normally expect f

## Requirements

- A desktop platform with the [.NET 6.0 SDK](https://dotnet.microsoft.com/download).
- A desktop platform with the [.NET 8.0 SDK](https://dotnet.microsoft.com/download).
- When running on linux, please have a system-wide ffmpeg installation available to support video decoding.
- When running on Windows 7 or 8.1, *[additional prerequisites](https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net60&pivots=os-windows#dependencies)** may be required to correctly run .NET 6 applications if your operating system is not up-to-date with the latest service packs.
- When running on Windows 7 or 8.1, *[additional prerequisites](https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net60&pivots=os-windows#dependencies)** may be required to correctly run .NET 8 applications if your operating system is not up-to-date with the latest service packs.
- When working with the codebase, we recommend using an IDE with intellisense and syntax highlighting, such as [Visual Studio 2019+](https://visualstudio.microsoft.com/vs/), [Jetbrains Rider](https://www.jetbrains.com/rider/), or [Visual Studio Code](https://code.visualstudio.com/) with the [EditorConfig](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig) and [C#](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp) plugin installed.

### Building
Expand Down
6 changes: 0 additions & 6 deletions build/vstestconfig.runsettings

This file was deleted.

2 changes: 1 addition & 1 deletion osu-framework.iOS.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
"SampleGame\\SampleGame.csproj"
]
}
}
}
Loading

0 comments on commit 9c2e2a5

Please sign in to comment.