diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 87a8faa814..2199c2cb81 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -9,7 +9,7 @@ ] }, "jetbrains.resharper.globaltools": { - "version": "2022.2.3", + "version": "2023.3.3", "commands": [ "jb" ] diff --git a/.editorconfig b/.editorconfig index 6468252b6c..c341ed3647 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,6 +9,9 @@ indent_style = space indent_size = 2 trim_trailing_whitespace = true +[g_*.cs] +generated_code = true + [*.cs] end_of_line = crlf insert_final_newline = true @@ -197,4 +200,4 @@ csharp_style_namespace_declarations = block_scoped:warning insert_final_newline = true indent_style = space indent_size = 2 -trim_trailing_whitespace = true \ No newline at end of file +trim_trailing_whitespace = true diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index b276fb97f3..ffd1c2e4eb 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -4,3 +4,5 @@ ba1385330cc501f34937e08257e586c84e35d772 # Make everything partial 9bbc6a81a2b8f035e2b043d3718d2db6e4f1d868 +# Mass NRT enabling +75ed421f60228920abd819cebc5982cb7799bbbb diff --git a/.github/workflows/build-ffmpeg.yml b/.github/workflows/build-ffmpeg.yml index b4de4b3bc3..c8812e0a5e 100644 --- a/.github/workflows/build-ffmpeg.yml +++ b/.github/workflows/build-ffmpeg.yml @@ -4,7 +4,7 @@ on: workflow_dispatch jobs: build-macos: name: Build macOS - runs-on: macos-latest + runs-on: macos-12 strategy: fail-fast: false matrix: @@ -13,50 +13,117 @@ jobs: - arm64 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - uses: ilammy/setup-nasm@v1 - name: Build - run: osu.Framework.NativeLibs/scripts/ffmpeg/macOS/fetch_and_build.sh + run: osu.Framework.NativeLibs/scripts/ffmpeg/build-macOS.sh env: arch: ${{ matrix.arch }} - name: Upload - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: macOS-${{ matrix.arch }} - path: build-${{ matrix.arch }} + path: macOS-${{ matrix.arch }} combine-macos: name: Combine macOS libs - runs-on: macos-latest + runs-on: macos-12 needs: build-macos steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: macOS-x86_64 path: macOS-x86_64 - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: macOS-arm64 path: macOS-arm64 - name: Combine - run: osu.Framework.NativeLibs/scripts/ffmpeg/macOS/combine_universal.sh + run: osu.Framework.NativeLibs/scripts/ffmpeg/combine_dylibs.sh + env: + platform: macOS - name: Upload - uses: actions/upload-artifact@v3 + 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-latest + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: @@ -65,106 +132,154 @@ jobs: - x64 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install dependencies run: | sudo apt-get update - sudo apt-get install make nasm gcc mingw-w64 + sudo apt-get install nasm mingw-w64 - name: Build - run: osu.Framework.NativeLibs/scripts/ffmpeg/win/fetch_and_build.sh + run: osu.Framework.NativeLibs/scripts/ffmpeg/build-win.sh env: arch: ${{ matrix.arch }} - name: Upload - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: win-${{ matrix.arch }} - path: build-${{ matrix.arch }} + path: win-${{ matrix.arch }} # The win-arm64 build runs in a special MinGW container to cross-compile successfully. build-win-arm64: name: Build Windows (arm64) - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 container: image: mstorsjo/llvm-mingw:latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build - run: osu.Framework.NativeLibs/scripts/ffmpeg/win/fetch_and_build.sh + run: osu.Framework.NativeLibs/scripts/ffmpeg/build-win.sh env: arch: arm64 - name: Upload - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: win-arm64 - path: build-arm64 + path: win-arm64 build-linux: name: Build Linux (x64) - runs-on: ubuntu-latest - container: - image: ubuntu:16.04 + # Use 20.04 to target glibc 2.31 like the other native libs + runs-on: ubuntu-20.04 steps: - name: Install dependencies run: | - apt-get update - apt-get install -y git curl gcc make nasm + sudo apt-get update + sudo apt-get install nasm - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build - run: osu.Framework.NativeLibs/scripts/ffmpeg/linux/fetch_and_build.sh + run: osu.Framework.NativeLibs/scripts/ffmpeg/build-linux.sh - name: Upload - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: linux-x64 - path: build-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-latest + 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@v3 + uses: actions/checkout@v4 - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: macOS-universal path: osu.Framework.NativeLibs/runtimes/osx/native - - uses: actions/download-artifact@v3 + - 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 path: osu.Framework.NativeLibs/runtimes/linux-x64/native - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: win-arm64 path: osu.Framework.NativeLibs/runtimes/win-arm64/native - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: win-x64 path: osu.Framework.NativeLibs/runtimes/win-x64/native - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 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@v4 + - uses: peter-evans/create-pull-request@v6 with: commit-message: Update FFmpeg binaries title: Update FFmpeg binaries body: This PR has been auto-generated to update the FFmpeg binaries. branch: update-ffmpeg-binaries + delete-branch: true env: ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4302dceff6..5905850e62 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,12 +7,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Install .NET 6.0.x - uses: actions/setup-dotnet@v3 + - name: Install .NET 8.0.x + uses: actions/setup-dotnet@v4 with: - dotnet-version: "6.0.x" + dotnet-version: "8.0.x" - name: Restore Tools run: dotnet tool restore @@ -21,7 +21,7 @@ jobs: run: dotnet restore osu-framework.Desktop.slnf - name: Restore inspectcode cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ github.workspace }}/inspectcode key: inspectcode-${{ hashFiles('.config/dotnet-tools.json', '.github/workflows/ci.yml', 'osu-framework.sln*', 'osu-framework*.slnf', '.editorconfig', '.globalconfig', 'CodeAnalysis/*', '**/*.csproj', '**/*.props') }} @@ -58,23 +58,26 @@ jobs: fail-fast: false matrix: os: - - { prettyname: Windows, fullname: windows-latest } - - { prettyname: macOS, fullname: macos-latest } - - { prettyname: Linux, fullname: ubuntu-latest } + - { prettyname: Windows, fullname: windows-latest, configuration: Debug } + - { prettyname: macOS, fullname: macos-latest, configuration: Debug } + - { prettyname: Linux, fullname: ubuntu-latest, configuration: Debug } + - { prettyname: Linux, fullname: ubuntu-latest, configuration: Release } threadingMode: ['SingleThread', 'MultiThreaded'] timeout-minutes: 60 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Install .NET 6.0.x - uses: actions/setup-dotnet@v3 + - name: Install .NET 8.0.x + uses: actions/setup-dotnet@v4 with: - dotnet-version: "6.0.x" + dotnet-version: "8.0.x" - name: Setup Go - uses: actions/setup-go@v3 + 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 @@ -84,20 +87,20 @@ jobs: shell: bash - name: Compile - run: dotnet build -c Debug -warnaserror osu-framework.Desktop.slnf + run: dotnet build -c ${{matrix.os.configuration}} -warnaserror osu-framework.Desktop.slnf - name: Test - run: dotnet test $pwd/**/*.Tests/bin/Debug/*/*.Tests.dll --settings $pwd/build/vstestconfig.runsettings --logger "trx;LogFileName=TestResults-${{matrix.os.prettyname}}-${{matrix.threadingMode}}.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}} - path: ${{github.workspace}}/TestResults/TestResults-${{matrix.os.prettyname}}-${{matrix.threadingMode}}.trx + name: osu-framework-test-results-${{matrix.os.prettyname}}-${{matrix.threadingMode}}-${{matrix.os.configuration}} + path: ${{github.workspace}}/TestResults/TestResults-${{matrix.os.prettyname}}-${{matrix.threadingMode}}-${{matrix.os.configuration}}.trx build-only-android: name: Build only (Android) @@ -105,12 +108,18 @@ jobs: timeout-minutes: 60 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 + + - name: Setup JDK 11 + uses: actions/setup-java@v4 + with: + distribution: microsoft + java-version: 11 - - name: Install .NET 6.0.x - uses: actions/setup-dotnet@v3 + - name: Install .NET 8.0.x + uses: actions/setup-dotnet@v4 with: - dotnet-version: "6.0.x" + dotnet-version: "8.0.x" - name: Restore .NET workloads run: dotnet workload install android @@ -124,17 +133,16 @@ jobs: timeout-minutes: 60 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Install .NET 6.0.x - uses: actions/setup-dotnet@v3 + - name: Install .NET 8.0.x + uses: actions/setup-dotnet@v4 with: - dotnet-version: "6.0.x" + 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 + diff --git a/.github/workflows/deploy-nativelibs.yml b/.github/workflows/deploy-nativelibs.yml index b037de3a7d..2b54f12150 100644 --- a/.github/workflows/deploy-nativelibs.yml +++ b/.github/workflows/deploy-nativelibs.yml @@ -40,22 +40,22 @@ jobs: needs: check-if-tag steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set Artifacts Directory id: artifactsPath run: echo "::set-output name=NUGET_ARTIFACTS::${{github.workspace}}/artifacts" - - name: Setup .NET 6.0.x - uses: actions/setup-dotnet@v3 + - name: Setup .NET 8.0.x + uses: actions/setup-dotnet@v4 with: - dotnet-version: "6.0.x" + dotnet-version: "8.0.x" - name: Build NativeLibs run: dotnet pack -c Release osu.Framework.NativeLibs /p:Configuration=Release /p:Version=${{needs.check-if-tag.outputs.version}} /p:GenerateDocumentationFile=true -o ${{steps.artifactsPath.outputs.nuget_artifacts}} - name: Upload Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: osu-framework-nativelibs path: ${{steps.artifactsPath.outputs.nuget_artifacts}}/*.nupkg diff --git a/.github/workflows/deploy-pack.yml b/.github/workflows/deploy-pack.yml index d9c85bcbd1..88bc62e7ac 100644 --- a/.github/workflows/deploy-pack.yml +++ b/.github/workflows/deploy-pack.yml @@ -1,64 +1,68 @@ -# There is no manual way to call this out to run this on tags via UI. -# See: https://github.community/t/workflow-dispatch-from-a-tag-in-actions-tab/130561 -on: workflow_dispatch -name: Deploy - Framework +name: Pack and nuget + +on: + push: + tags: + - '*' jobs: - check-if-tag: - name: Set Package Version + notify_pending_production_deploy: runs-on: ubuntu-latest - outputs: - version: ${{steps.deployment.outputs.version}} steps: - - name: Checkout - run: | - REPOSITORY="https://${{ github.actor }}:${{ github.token }}@github.com/${{ github.repository }}.git" - BRANCH="${GITHUB_REF/#refs\/heads\//}" - - git version - git clone --no-checkout ${REPOSITORY} . - git config --local gc.auto 0 - - git -c protocol.version=2 fetch --no-tags --prune --progress --depth=2 origin +${GITHUB_SHA}:refs/remotes/origin/${BRANCH} - git checkout --progress --force -B $BRANCH refs/remotes/origin/$BRANCH - - - - name: Set Variables - id: deployment - shell: bash + - + name: Submit pending deployment notification run: | - if [ $(git describe --exact-match --tags HEAD &> /dev/null; echo $?) == 0 ]; then - echo "::set-output name=VERSION::$(git describe --exact-match --tags HEAD)" - else - echo "fatal: no tag detected for HEAD. Workflow will now stop." - exit 128; - fi + export TITLE="Pending osu-framework Production Deployment: $GITHUB_REF_NAME" + export URL="https://github.com/ppy/osu-framework/actions/runs/$GITHUB_RUN_ID" + export DESCRIPTION="Awaiting approval for building NuGet packages for tag $GITHUB_REF_NAME: + [View Workflow Run]($URL)" + export ACTOR_ICON="https://avatars.githubusercontent.com/u/$GITHUB_ACTOR_ID" + + BODY="$(jq --null-input '{ + "embeds": [ + { + "title": env.TITLE, + "color": 15098112, + "description": env.DESCRIPTION, + "url": env.URL, + "author": { + "name": env.GITHUB_ACTOR, + "icon_url": env.ACTOR_ICON + } + } + ] + }')" + + curl \ + -H "Content-Type: application/json" \ + -d "$BODY" \ + "${{ secrets.DISCORD_INFRA_WEBHOOK_URL }}" pack-framework: name: Pack (Framework) runs-on: windows-latest - needs: [check-if-tag] + environment: production defaults: run: shell: powershell steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Set Artifacts Directory + - name: Set artifacts directory id: artifactsPath run: echo "::set-output name=NUGET_ARTIFACTS::${{github.workspace}}\artifacts" - - name: Install .NET 6.0.x - uses: actions/setup-dotnet@v3 + - name: Install .NET 8.0.x + uses: actions/setup-dotnet@v4 with: - dotnet-version: "6.0.x" + dotnet-version: "8.0.x" - name: Pack (Framework) - run: dotnet pack -c Release osu.Framework /p:Version=${{needs.check-if-tag.outputs.version}} /p:GenerateDocumentationFile=true /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg -o ${{steps.artifactsPath.outputs.nuget_artifacts}} + run: dotnet pack -c Release osu.Framework /p:Version=${{ github.ref_name }} /p:GenerateDocumentationFile=true /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg -o ${{steps.artifactsPath.outputs.nuget_artifacts}} - - name: Upload Artifacts - uses: actions/upload-artifact@v3 + - name: Upload artifacts + uses: actions/upload-artifact@v4 with: name: osu-framework path: | @@ -71,28 +75,28 @@ jobs: pack-template: name: Pack (Templates) runs-on: ubuntu-latest - needs: [check-if-tag] + environment: production steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Set Artifacts Directory + - name: Set artifacts Directory id: artifactsPath run: echo "::set-output name=NUGET_ARTIFACTS::${{github.workspace}}/artifacts" - - name: Install .NET 6.0.x - uses: actions/setup-dotnet@v3 + - name: Install .NET 8.0.x + uses: actions/setup-dotnet@v4 with: - dotnet-version: "6.0.x" + dotnet-version: "8.0.x" - - name: Replace Project References - run: osu.Framework.Templates/replace-references.sh ${{needs.check-if-tag.outputs.version}} + - name: Replace project references + run: osu.Framework.Templates/replace-references.sh ${{ github.ref_name }} - name: Pack (Template) - run: dotnet pack -c Release osu.Framework.Templates /p:Configuration=Release /p:Version=${{needs.check-if-tag.outputs.version}} /p:GenerateDocumentationFile=true /p:NoDefaultExcludes=true -o ${{steps.artifactsPath.outputs.nuget_artifacts}} + run: dotnet pack -c Release osu.Framework.Templates /p:Configuration=Release /p:Version=${{ github.ref_name }} /p:GenerateDocumentationFile=true /p:NoDefaultExcludes=true -o ${{steps.artifactsPath.outputs.nuget_artifacts}} - - name: Upload Artifacts - uses: actions/upload-artifact@v3 + - name: Upload artifacts + uses: actions/upload-artifact@v4 with: name: osu-framework-templates path: ${{steps.artifactsPath.outputs.nuget_artifacts}}/*.nupkg @@ -103,31 +107,37 @@ jobs: pack-android: name: Pack (Android) runs-on: windows-latest - needs: [check-if-tag] + environment: production defaults: run: shell: powershell steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Set Artifacts Directory + - name: Set artifacts directory id: artifactsPath run: echo "::set-output name=NUGET_ARTIFACTS::${{github.workspace}}\artifacts" - - name: Install .NET 6.0.x - uses: actions/setup-dotnet@v3 + - name: Install .NET 8.0.x + uses: actions/setup-dotnet@v4 + with: + dotnet-version: "8.0.x" + + - name: Setup JDK 11 + uses: actions/setup-java@v4 with: - dotnet-version: "6.0.x" + distribution: microsoft + java-version: 11 - name: Restore .NET workloads run: dotnet workload install android - name: Pack (Android Framework) - run: dotnet pack -c Release osu.Framework.Android /p:Version=${{needs.check-if-tag.outputs.version}} /p:GenerateDocumentationFile=true -o ${{steps.artifactsPath.outputs.nuget_artifacts}} + run: dotnet pack -c Release osu.Framework.Android /p:Version=${{ github.ref_name }} /p:GenerateDocumentationFile=true -o ${{steps.artifactsPath.outputs.nuget_artifacts}} - - name: Upload Artifacts - uses: actions/upload-artifact@v3 + - name: Upload artifacts + uses: actions/upload-artifact@v4 with: name: osu-framework-android path: ${{steps.artifactsPath.outputs.nuget_artifacts}}\*.nupkg @@ -138,33 +148,31 @@ jobs: pack-ios: name: Pack (iOS) runs-on: macos-latest - needs: [check-if-tag] + environment: production defaults: run: shell: bash steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Set Artifacts Directory + - name: Set artifacts directory id: artifactsPath run: echo "::set-output name=NUGET_ARTIFACTS::${{github.workspace}}/artifacts" - - name: Install .NET 6.0.x - uses: actions/setup-dotnet@v3 + - name: Install .NET 8.0.x + uses: actions/setup-dotnet@v4 with: - dotnet-version: "6.0.x" + 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=${{needs.check-if-tag.outputs.version}} /p:GenerateDocumentationFile=true -o ${{steps.artifactsPath.outputs.nuget_artifacts}} + run: dotnet pack -c Release osu.Framework.iOS /p:Version=${{ github.ref_name }} /p:GenerateDocumentationFile=true -o ${{steps.artifactsPath.outputs.nuget_artifacts}} - - name: Upload Artifacts - uses: actions/upload-artifact@v3 + - name: Upload artifacts + uses: actions/upload-artifact@v4 with: name: osu-framework-ios path: ${{steps.artifactsPath.outputs.nuget_artifacts}}/*.nupkg diff --git a/.github/workflows/report-nunit.yml b/.github/workflows/report-nunit.yml index a60028f30b..476000a223 100644 --- a/.github/workflows/report-nunit.yml +++ b/.github/workflows/report-nunit.yml @@ -5,29 +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 } - - { prettyname: macOS } - - { prettyname: Linux } - 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/test-reporter@v1.6.0 + uses: dorny/test-reporter@v1.8.0 with: - artifact: osu-framework-test-results-${{matrix.os.prettyname}}-${{matrix.threadingMode}} - name: Test Results (${{matrix.os.prettyname}}, ${{matrix.threadingMode}}) + name: Results path: "*.trx" reporter: dotnet-trx list-suites: 'failed' diff --git a/.gitignore b/.gitignore index 9e77922eb8..841e492d7d 100644 --- a/.gitignore +++ b/.gitignore @@ -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/ @@ -337,4 +340,10 @@ fabric.properties inspectcodereport.xml inspectcode -.idea/.idea.osu-framework.Desktop/.idea/misc.xml \ No newline at end of file +.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 + diff --git a/.globalconfig b/.globalconfig index 607798492c..0a2727ecd4 100644 --- a/.globalconfig +++ b/.globalconfig @@ -1,5 +1,3 @@ -is_global = true - # .NET Code Style # IDE styles reference: https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ diff --git a/.idea/.idea.osu-framework.Android/.idea/projectSettingsUpdater.xml b/.idea/.idea.osu-framework.Android/.idea/projectSettingsUpdater.xml deleted file mode 100644 index 4bb9f4d2a0..0000000000 --- a/.idea/.idea.osu-framework.Android/.idea/projectSettingsUpdater.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/.idea.osu-framework.Desktop/.idea/encodings.xml b/.idea/.idea.osu-framework.Desktop/.idea/encodings.xml deleted file mode 100644 index 15a15b218a..0000000000 --- a/.idea/.idea.osu-framework.Desktop/.idea/encodings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/.idea.osu-framework.Desktop/.idea/projectSettingsUpdater.xml b/.idea/.idea.osu-framework.Desktop/.idea/projectSettingsUpdater.xml deleted file mode 100644 index 4bb9f4d2a0..0000000000 --- a/.idea/.idea.osu-framework.Desktop/.idea/projectSettingsUpdater.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/.idea.osu-framework.Desktop/.idea/runConfigurations/Benchmarks.xml b/.idea/.idea.osu-framework.Desktop/.idea/runConfigurations/Benchmarks.xml index e3413de811..11482fa08b 100644 --- a/.idea/.idea.osu-framework.Desktop/.idea/runConfigurations/Benchmarks.xml +++ b/.idea/.idea.osu-framework.Desktop/.idea/runConfigurations/Benchmarks.xml @@ -1,8 +1,8 @@ -