Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Sep 30, 2024
1 parent 5139b17 commit d861b4b
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 16 deletions.
86 changes: 81 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
token: ${{ secrets.CLONE_PAT }}
submodules: 'recursive'
- name: Setup Xcode
run: sudo xcode-select -s /Applications/Xcode_15.3.app
run: sudo xcode-select -s /Applications/Xcode_${{ vars.XCODE }}.app
- name: 'Restore External Dep cache'
id: external-dep-cache
uses: actions/cache@v4
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
token: ${{ secrets.CLONE_PAT }}
submodules: 'recursive'
- name: Setup Xcode
run: sudo xcode-select -s /Applications/Xcode_15.3.app
run: sudo xcode-select -s /Applications/Xcode_${{ vars.XCODE }}.app
- name: 'Restore External Dep cache'
id: external-dep-cache
uses: actions/cache@v4
Expand Down Expand Up @@ -190,13 +190,13 @@ jobs:
needs: [macOS, iOS]
steps:
- name: Setup Xcode
run: sudo xcode-select -s /Applications/Xcode_15.3.app
run: sudo xcode-select -s /Applications/Xcode_${{ vars.XCODE }}.app
- uses: actions/checkout@v4
- name: Download macOS sdk
- name: Download macOS x64 sdk
uses: actions/download-artifact@v4
with:
name: mdk-sdk-macOS-x86_64-MinSizeRel
- name: Download macOS sdk
- name: Download macOS arm64 sdk
uses: actions/download-artifact@v4
with:
name: mdk-sdk-macOS-arm64-MinSizeRel
Expand Down Expand Up @@ -1032,3 +1032,79 @@ jobs:
gh workflow run main.yml --repo ${{ github.repository_owner }}/mdk-nvjp2k -f run_id=${{ github.run_id }}
env:
GH_TOKEN: ${{ secrets.ACTION_PAT }} # GITHUB_TOKEN?

Release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs: [Apple, NuGet, Linux, Android, ClangCL]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download iOS sdk
uses: actions/download-artifact@v4
with:
name: mdk-sdk-iOS-MinSizeRel
- name: Download iOSSimulator sdk
uses: actions/download-artifact@v4
with:
name: mdk-sdk-iOSSimulator-MinSizeRel
- name: Download tvOS sdk
uses: actions/download-artifact@v4
with:
name: mdk-sdk-tvOS-MinSizeRel
- name: Download tvOSSimulator sdk
uses: actions/download-artifact@v4
with:
name: mdk-sdk-tvOSSimulator-MinSizeRel
- name: Download visionOS sdk
uses: actions/download-artifact@v4
with:
name: mdk-sdk-visionOS-MinSizeRel
- name: Download visionOSSimulator sdk
uses: actions/download-artifact@v4
with:
name: mdk-sdk-visionOSSimulator-MinSizeRel
- name: Download macCatalyst sdk
uses: actions/download-artifact@v4
with:
name: mdk-sdk-macCatalyst-MinSizeRel
- name: Download macOS sdk
uses: actions/download-artifact@v4
with:
name: mdk-sdk-macOS
- name: Download Apple sdk
uses: actions/download-artifact@v4
with:
name: mdk-sdk-apple
- name: Download win32 vs2022 sdk
uses: actions/download-artifact@v4
with:
name: mdk-sdk-vs2022-windows-desktop-RelWithDebInfo
- name: Download win32 vs2022 ltl sdk
uses: actions/download-artifact@v4
with:
name: mdk-sdk-vs2022-ltl-windows-desktop-RelWithDebInfo
- name: Download uwp vs2022 sdk
uses: actions/download-artifact@v4
with:
name: mdk-sdk-vs2022-uwp-RelWithDebInfo
- name: Download clang-cl sdk
uses: actions/download-artifact@v4
with:
name: mdk-sdk-clang-windows-desktop-MinSizeRel
- name: Download linux sdk
uses: actions/download-artifact@v4
with:
name: mdk-sdk-linux-MinSizeRel
- name: Download android sdk
uses: actions/download-artifact@v4
with:
name: mdk-sdk-android-MinSizeRel
- name: Release
uses: softprops/action-gh-release@v2
with:
draft: true
body_path: Changelog.md
files: |
*.7z
*.xz
2 changes: 1 addition & 1 deletion README.Linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@


## About SDK for Linux
SDK is built by clang 19 with
SDK is built by clang 20 with
- ffmpeg: https://sourceforge.net/projects/avbuild/files/linux/ffmpeg-master-linux-clang-lite-lto.tar.xz/download
- libc++ 18. You can use delete libc++.so from sdk and use system libc++

Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ pod 'mdk'

Optionally you can use [mdk.xcframework](https://sourceforge.net/projects/mdk-sdk/files/nightly/mdk-sdk-apple.tar.xz/download) directly.

If fail to code sign: In `Build Phase`, add a `New Run Script Phase` with content
```bash
[ -n "$CODE_SIGN_IDENTITY" ] && find "$BUILT_PRODUCTS_DIR" -depth -name "lib*.dylib" -exec codesign -f -vvvv -s"${EXPANDED_CODE_SIGN_IDENTITY}" ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements,flags {} \;
````

#### Swift Users
```ruby
pod 'swift-mdk'
Expand All @@ -73,6 +68,12 @@ import swift_mdk

Install via [NuGet](https://www.nuget.org/packages/mdk) in Visual Studio for both Windows desktop and UWP

## macOS Hardened Runtime
You may fail to run(or codesign) with default hardened runtime options because there are some dylib files in mdk.framework not signed correctly. You can either select `Disable Library Validation` in `Hardened Runtime` options, or sign dylib(**RECOMMENDED**): In `Build Phase`, add a `New Run Script Phase` with content
```bash
[ -n "$CODE_SIGN_IDENTITY" ] && find "$BUILT_PRODUCTS_DIR" -depth -path "*mdk.framework/*" -name "lib*.dylib" -exec codesign -f -vvvv -s"${EXPANDED_CODE_SIGN_IDENTITY}" ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements,flags {} \;
```

## Distribute
- mdk(libmdk.so.0/ibmdk.dylib/mdk.dll) and ffmpeg library(or standard ffmpeg libraries) are always REQUIRED
- libass.dll/libass.dylib/ass.framework/libass.so can be optional if not using subtitle rendering
Expand Down Expand Up @@ -156,6 +157,7 @@ Install via [NuGet](https://www.nuget.org/packages/mdk) in Visual Studio for bot
<!-- <a href="https://smartplayer.ru"><img src="https://static.tildacdn.com/tild3431-3533-4461-b365-386335306263/Group_101.svg" alt="smartplayer" width=600 height=120 style="background-color:black"></a> -->
[![](https://teleguard.com/images/logo.png)](https://teleguard.com)[!
![DaKanji](https://dakanji.app/wp-content/uploads/thegem-logos/logo_a496404d3d63fd29f344146e428d0992_2x.png)](https://dakanji.app)
[![Fimosa](https://fimosa.app/_next/image?url=%2Flogo_final.png&w=64&q=75)](https://fimosa.app)
[金嵘达科技](http://www.kingroda.com)
Expand Down
5 changes: 0 additions & 5 deletions ci-before-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ tolower(){

crt_extra=$(tolower ${CRT_EXTRA})

if [[ "$TARGET_OS" == xr* || "$TARGET_OS" == vision* ]]; then
# FIXME: llvm-17 can't correctly merge visionOS lto libs(libavformat.a)
# FIXME: linking to libffmpeg.a(relocatable obj) by ci results in larger binary size
LTO_SUFFIX=
fi
if [[ "$TARGET_OS" == mac* || "$TARGET_OS" == iOS* || "$TARGET_OS" == tvOS* || "$TARGET_OS" == xr* || "$TARGET_OS" == vision* || "$TARGET_OS" == android ]]; then
FF_EXTRA=
fi
Expand Down

0 comments on commit d861b4b

Please sign in to comment.