Skip to content

Commit

Permalink
Merge branch 'master'
Browse files Browse the repository at this point in the history
  • Loading branch information
huoyaoyuan committed Nov 27, 2024
2 parents db7c54a + c274d81 commit 6804bda
Show file tree
Hide file tree
Showing 1,158 changed files with 31,599 additions and 12,550 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
]
},
"jetbrains.resharper.globaltools": {
"version": "2022.2.3",
"version": "2023.3.3",
"commands": [
"jb"
]
Expand Down
5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
trim_trailing_whitespace = true
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
ba1385330cc501f34937e08257e586c84e35d772
# Make everything partial
9bbc6a81a2b8f035e2b043d3718d2db6e4f1d868
# Mass NRT enabling
75ed421f60228920abd819cebc5982cb7799bbbb
193 changes: 154 additions & 39 deletions .github/workflows/build-ffmpeg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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'
Loading

0 comments on commit 6804bda

Please sign in to comment.