Skip to content

Commit

Permalink
update libs workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
debugly committed Jun 4, 2024
1 parent 672baa2 commit 4652290
Show file tree
Hide file tree
Showing 12 changed files with 300 additions and 321 deletions.
60 changes: 30 additions & 30 deletions .github/workflows/ass.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ jobs:
# git describe --tags --always | awk -F . '{printf "RELEASE_VERSION=%s.%d",$1,$2+1}' | xargs > constants.env
# git describe --tags --always | awk -F - '{printf "RELEASE_VERSION=V1.0-%s",$NF}' | xargs > constants.env
d=$(TZ=UTC-8 date +'%y%m%d%H%M%S')
grep GIT_REPO_VERSION= ./init-cfgs/ass | awk -F = '{printf "RELEASE_VERSION=%s",$2}' | xargs > constants.env
LIB_NAME=ass
grep GIT_REPO_VERSION= ./init-cfgs/$LIB_NAME | awk -F = '{printf "RELEASE_VERSION=%s",$2}' | xargs > constants.env
echo "LIB_NAME=$LIB_NAME" >> constants.env
echo "RELEASE_DATE=$d" >> constants.env
echo "HOMEBREW_NO_AUTO_UPDATE=1" >> constants.env
cat constants.env
Expand All @@ -30,75 +32,73 @@ jobs:
envFile: 'constants.env'
- name: init src
run: |
./init-any.sh all ass
./init-any.sh all ${{ env.LIB_NAME }}
./install-pre-any.sh all 'freetype harfbuzz fribidi unibreak'
- name: generate src log
run: |
cd build/src/macos
ls | awk -F ' ' '{printf "echo %s\n echo -------------\ngit -C %s log -n 1 | cat\n",$0,$0}' | bash > ../macos-src-log.md
cd ../ios
ls | awk -F ' ' '{printf "echo %s\n echo -------------\ngit -C %s log -n 1 | cat\n",$0,$0}' | bash > ../ios-src-log.md
cd ../tvos
ls | awk -F ' ' '{printf "echo %s\n echo -------------\ngit -C %s log -n 1 | cat\n",$0,$0}' | bash > ../tvos-src-log.md
- name: do compile macos libs
run: |
cd macos
./compile-any.sh build ass
./compile-any.sh lipo ass
./macos/compile-any.sh -c build -l ${{ env.LIB_NAME }}
- name: do compile ios libs
run: |
cd ios
./compile-any.sh build ass
./compile-any.sh lipo ass
- name: Zip macos libs
./ios/compile-any.sh -c build -l ${{ env.LIB_NAME }}
- name: do compile tvos libs
run: |
cd build/product/macos/universal
zip -rq macos-universal.zip ./*
- name: Zip ios libs
./tvos/compile-any.sh -c build -l ${{ env.LIB_NAME }}
- name: Zip apple xcframework
run: |
cd build/product/ios/universal
zip -rq ios-universal.zip ./*
cd build/product/xcframework
zip -rq apple-xcframework.zip ./*
mv apple-xcframework.zip ../
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ass-${{ env.RELEASE_VERSION }}-${{ env.RELEASE_DATE }}
release_name: ass-${{ env.RELEASE_VERSION }}
tag_name: ${{ env.LIB_NAME }}-${{ env.RELEASE_VERSION }}-${{ env.RELEASE_DATE }}
release_name: ${{ env.LIB_NAME }}-${{ env.RELEASE_VERSION }}
draft: false
prerelease: false
- name: Upload macos Release Asset
- name: Upload Apple Plat Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: build/product/macos/universal/macos-universal.zip
asset_name: "ass-macos-universal-${{ env.RELEASE_VERSION }}.zip"
asset_path: build/product/apple-xcframework.zip
asset_name: "${{ env.LIB_NAME }}-apple-xcframework-${{ env.RELEASE_VERSION }}.zip"
asset_content_type: application/zip
- name: Upload ios Release Asset
- name: Upload macos src md
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: build/product/ios/universal/ios-universal.zip
asset_name: "ass-ios-universal-${{ env.RELEASE_VERSION }}.zip"
asset_content_type: application/zip
- name: Upload macos src md
asset_path: build/src/macos-src-log.md
asset_name: "macos-src-log-${{ env.RELEASE_VERSION }}.md"
asset_content_type: application/text
- name: Upload ios src md
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: build/src/macos-src-log.md
asset_name: "macos-ass-src-log-${{ env.RELEASE_VERSION }}.md"
asset_path: build/src/ios-src-log.md
asset_name: "ios-src-log-${{ env.RELEASE_VERSION }}.md"
asset_content_type: application/text
- name: Upload ios src md
- name: Upload tvos src md
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: build/src/ios-src-log.md
asset_name: "ios-ass-src-log-${{ env.RELEASE_VERSION }}.md"
asset_content_type: application/text
asset_path: build/src/tvos-src-log.md
asset_name: "tvos-src-log-${{ env.RELEASE_VERSION }}.md"
asset_content_type: application/text
28 changes: 14 additions & 14 deletions .github/workflows/bluray.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,38 +20,38 @@ jobs:
# git describe --tags --always | awk -F . '{printf "RELEASE_VERSION=%s.%d",$1,$2+1}' | xargs > constants.env
# git describe --tags --always | awk -F - '{printf "RELEASE_VERSION=V1.0-%s",$NF}' | xargs > constants.env
d=$(TZ=UTC-8 date +'%y%m%d%H%M%S')
grep GIT_REPO_VERSION= ./init-cfgs/bluray | awk -F = '{printf "RELEASE_VERSION=%s",$2}' | xargs > constants.env
LIB_NAME=bluray
grep GIT_REPO_VERSION= ./init-cfgs/$LIB_NAME | awk -F = '{printf "RELEASE_VERSION=%s",$2}' | xargs > constants.env
echo "LIB_NAME=$LIB_NAME" >> constants.env
echo "RELEASE_DATE=$d" >> constants.env
echo "HOMEBREW_NO_AUTO_UPDATE=1" >> constants.env
cat constants.env
- name: Export Env
uses: cardinalby/export-env-action@v2
with:
envFile: 'constants.env'
- name: init src
run: ./init-any.sh all bluray
run: ./init-any.sh macos ${{ env.LIB_NAME }}
- name: generate src log
run: |
cd build/src/macos
ls | awk -F ' ' '{printf "echo %s\n echo -------------\ngit -C %s log -n 1 | cat\n",$0,$0}' | bash > ../macos-src-log.md
cd ../ios
ls | awk -F ' ' '{printf "echo %s\n echo -------------\ngit -C %s log -n 1 | cat\n",$0,$0}' | bash > ../ios-src-log.md
- name: do compile macos libs
run: |
cd macos
./compile-any.sh build bluray
./compile-any.sh lipo bluray
- name: Zip macos libs
./macos/compile-any.sh -c build -l ${{ env.LIB_NAME }}
- name: Zip macos xcframework
run: |
cd build/product/macos/universal
zip -rq macos-universal.zip ./*
cd build/product/xcframework
zip -rq apple-xcframework.zip ./*
mv apple-xcframework.zip ../
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: bluray-${{ env.RELEASE_VERSION }}-${{ env.RELEASE_DATE }}
release_name: bluray-${{ env.RELEASE_VERSION }}
tag_name: ${{ env.LIB_NAME }}-${{ env.RELEASE_VERSION }}-${{ env.RELEASE_DATE }}
release_name: ${{ env.LIB_NAME }}-${{ env.RELEASE_VERSION }}
draft: false
prerelease: false
- name: Upload macos Release Asset
Expand All @@ -60,8 +60,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: build/product/macos/universal/macos-universal.zip
asset_name: "bluray-macos-universal-${{ env.RELEASE_VERSION }}.zip"
asset_path: build/product/apple-xcframework.zip
asset_name: "${{ env.LIB_NAME }}-apple-xcframework-${{ env.RELEASE_VERSION }}.zip"
asset_content_type: application/zip
- name: Upload macos src md
uses: actions/upload-release-asset@v1
Expand Down
59 changes: 30 additions & 29 deletions .github/workflows/dav1d.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,66 +20,58 @@ jobs:
# git describe --tags --always | awk -F . '{printf "RELEASE_VERSION=%s.%d",$1,$2+1}' | xargs > constants.env
# git describe --tags --always | awk -F - '{printf "RELEASE_VERSION=V1.0-%s",$NF}' | xargs > constants.env
d=$(TZ=UTC-8 date +'%y%m%d%H%M%S')
grep GIT_REPO_VERSION= ./init-cfgs/dav1d | awk -F = '{printf "RELEASE_VERSION=%s",$2}' | xargs > constants.env
LIB_NAME=dav1d
grep GIT_REPO_VERSION= ./init-cfgs/$LIB_NAME | awk -F = '{printf "RELEASE_VERSION=%s",$2}' | xargs > constants.env
echo "LIB_NAME=$LIB_NAME" >> constants.env
echo "RELEASE_DATE=$d" >> constants.env
echo "HOMEBREW_NO_AUTO_UPDATE=1" >> constants.env
cat constants.env
- name: Export Env
uses: cardinalby/export-env-action@v2
with:
envFile: 'constants.env'
- name: init src
run: ./init-any.sh all dav1d
run: ./init-any.sh all ${{ env.LIB_NAME }}
- name: generate src log
run: |
cd build/src/macos
ls | awk -F ' ' '{printf "echo %s\n echo -------------\ngit -C %s log -n 1 | cat\n",$0,$0}' | bash > ../macos-src-log.md
cd ../ios
ls | awk -F ' ' '{printf "echo %s\n echo -------------\ngit -C %s log -n 1 | cat\n",$0,$0}' | bash > ../ios-src-log.md
cd ../tvos
ls | awk -F ' ' '{printf "echo %s\n echo -------------\ngit -C %s log -n 1 | cat\n",$0,$0}' | bash > ../tvos-src-log.md
- name: do compile macos libs
run: |
cd macos
./compile-any.sh build dav1d
./compile-any.sh lipo dav1d
./macos/compile-any.sh -c build -l ${{ env.LIB_NAME }}
- name: do compile ios libs
run: |
cd ios
./compile-any.sh build dav1d
./compile-any.sh lipo dav1d
- name: Zip macos libs
./ios/compile-any.sh -c build -l ${{ env.LIB_NAME }}
- name: do compile tvos libs
run: |
cd build/product/macos/universal
zip -rq macos-universal.zip ./*
- name: Zip ios libs
./tvos/compile-any.sh -c build -l ${{ env.LIB_NAME }}
- name: Zip apple xcframework
run: |
cd build/product/ios/universal
zip -rq ios-universal.zip ./*
cd build/product/xcframework
zip -rq apple-xcframework.zip ./*
mv apple-xcframework.zip ../
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: dav1d-${{ env.RELEASE_VERSION }}-${{ env.RELEASE_DATE }}
release_name: dav1d-${{ env.RELEASE_VERSION }}
tag_name: ${{ env.LIB_NAME }}-${{ env.RELEASE_VERSION }}-${{ env.RELEASE_DATE }}
release_name: ${{ env.LIB_NAME }}-${{ env.RELEASE_VERSION }}
draft: false
prerelease: false
- name: Upload macos Release Asset
- name: Upload Apple Plat Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: build/product/macos/universal/macos-universal.zip
asset_name: "dav1d-macos-universal-${{ env.RELEASE_VERSION }}.zip"
asset_content_type: application/zip
- name: Upload ios Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: build/product/ios/universal/ios-universal.zip
asset_name: "dav1d-ios-universal-${{ env.RELEASE_VERSION }}.zip"
asset_path: build/product/apple-xcframework.zip
asset_name: "${{ env.LIB_NAME }}-apple-xcframework-${{ env.RELEASE_VERSION }}.zip"
asset_content_type: application/zip
- name: Upload macos src md
uses: actions/upload-release-asset@v1
Expand All @@ -98,4 +90,13 @@ jobs:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: build/src/ios-src-log.md
asset_name: "ios-src-log-${{ env.RELEASE_VERSION }}.md"
asset_content_type: application/text
asset_content_type: application/text
- name: Upload tvos src md
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: build/src/tvos-src-log.md
asset_name: "tvos-src-log-${{ env.RELEASE_VERSION }}.md"
asset_content_type: application/text
Loading

0 comments on commit 4652290

Please sign in to comment.