Skip to content

Commit 4652290

Browse files
committed
update libs workflow
1 parent 672baa2 commit 4652290

12 files changed

Lines changed: 300 additions & 321 deletions

File tree

.github/workflows/ass.yml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ jobs:
2020
# git describe --tags --always | awk -F . '{printf "RELEASE_VERSION=%s.%d",$1,$2+1}' | xargs > constants.env
2121
# git describe --tags --always | awk -F - '{printf "RELEASE_VERSION=V1.0-%s",$NF}' | xargs > constants.env
2222
d=$(TZ=UTC-8 date +'%y%m%d%H%M%S')
23-
grep GIT_REPO_VERSION= ./init-cfgs/ass | awk -F = '{printf "RELEASE_VERSION=%s",$2}' | xargs > constants.env
23+
LIB_NAME=ass
24+
grep GIT_REPO_VERSION= ./init-cfgs/$LIB_NAME | awk -F = '{printf "RELEASE_VERSION=%s",$2}' | xargs > constants.env
25+
echo "LIB_NAME=$LIB_NAME" >> constants.env
2426
echo "RELEASE_DATE=$d" >> constants.env
2527
echo "HOMEBREW_NO_AUTO_UPDATE=1" >> constants.env
2628
cat constants.env
@@ -30,75 +32,73 @@ jobs:
3032
envFile: 'constants.env'
3133
- name: init src
3234
run: |
33-
./init-any.sh all ass
35+
./init-any.sh all ${{ env.LIB_NAME }}
3436
./install-pre-any.sh all 'freetype harfbuzz fribidi unibreak'
3537
- name: generate src log
3638
run: |
3739
cd build/src/macos
3840
ls | awk -F ' ' '{printf "echo %s\n echo -------------\ngit -C %s log -n 1 | cat\n",$0,$0}' | bash > ../macos-src-log.md
3941
cd ../ios
4042
ls | awk -F ' ' '{printf "echo %s\n echo -------------\ngit -C %s log -n 1 | cat\n",$0,$0}' | bash > ../ios-src-log.md
43+
cd ../tvos
44+
ls | awk -F ' ' '{printf "echo %s\n echo -------------\ngit -C %s log -n 1 | cat\n",$0,$0}' | bash > ../tvos-src-log.md
4145
- name: do compile macos libs
4246
run: |
43-
cd macos
44-
./compile-any.sh build ass
45-
./compile-any.sh lipo ass
47+
./macos/compile-any.sh -c build -l ${{ env.LIB_NAME }}
4648
- name: do compile ios libs
4749
run: |
48-
cd ios
49-
./compile-any.sh build ass
50-
./compile-any.sh lipo ass
51-
- name: Zip macos libs
50+
./ios/compile-any.sh -c build -l ${{ env.LIB_NAME }}
51+
- name: do compile tvos libs
5252
run: |
53-
cd build/product/macos/universal
54-
zip -rq macos-universal.zip ./*
55-
- name: Zip ios libs
53+
./tvos/compile-any.sh -c build -l ${{ env.LIB_NAME }}
54+
- name: Zip apple xcframework
5655
run: |
57-
cd build/product/ios/universal
58-
zip -rq ios-universal.zip ./*
56+
cd build/product/xcframework
57+
zip -rq apple-xcframework.zip ./*
58+
mv apple-xcframework.zip ../
5959
- name: Create Release
6060
id: create_release
6161
uses: actions/create-release@v1
6262
env:
6363
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6464
with:
65-
tag_name: ass-${{ env.RELEASE_VERSION }}-${{ env.RELEASE_DATE }}
66-
release_name: ass-${{ env.RELEASE_VERSION }}
65+
tag_name: ${{ env.LIB_NAME }}-${{ env.RELEASE_VERSION }}-${{ env.RELEASE_DATE }}
66+
release_name: ${{ env.LIB_NAME }}-${{ env.RELEASE_VERSION }}
6767
draft: false
6868
prerelease: false
69-
- name: Upload macos Release Asset
69+
- name: Upload Apple Plat Release Asset
7070
uses: actions/upload-release-asset@v1
7171
env:
7272
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7373
with:
7474
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
75-
asset_path: build/product/macos/universal/macos-universal.zip
76-
asset_name: "ass-macos-universal-${{ env.RELEASE_VERSION }}.zip"
75+
asset_path: build/product/apple-xcframework.zip
76+
asset_name: "${{ env.LIB_NAME }}-apple-xcframework-${{ env.RELEASE_VERSION }}.zip"
7777
asset_content_type: application/zip
78-
- name: Upload ios Release Asset
78+
- name: Upload macos src md
7979
uses: actions/upload-release-asset@v1
8080
env:
8181
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8282
with:
8383
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
84-
asset_path: build/product/ios/universal/ios-universal.zip
85-
asset_name: "ass-ios-universal-${{ env.RELEASE_VERSION }}.zip"
86-
asset_content_type: application/zip
87-
- name: Upload macos src md
84+
asset_path: build/src/macos-src-log.md
85+
asset_name: "macos-src-log-${{ env.RELEASE_VERSION }}.md"
86+
asset_content_type: application/text
87+
- name: Upload ios src md
8888
uses: actions/upload-release-asset@v1
8989
env:
9090
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9191
with:
9292
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
93-
asset_path: build/src/macos-src-log.md
94-
asset_name: "macos-ass-src-log-${{ env.RELEASE_VERSION }}.md"
93+
asset_path: build/src/ios-src-log.md
94+
asset_name: "ios-src-log-${{ env.RELEASE_VERSION }}.md"
9595
asset_content_type: application/text
96-
- name: Upload ios src md
96+
- name: Upload tvos src md
9797
uses: actions/upload-release-asset@v1
9898
env:
9999
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100100
with:
101101
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
102-
asset_path: build/src/ios-src-log.md
103-
asset_name: "ios-ass-src-log-${{ env.RELEASE_VERSION }}.md"
104-
asset_content_type: application/text
102+
asset_path: build/src/tvos-src-log.md
103+
asset_name: "tvos-src-log-${{ env.RELEASE_VERSION }}.md"
104+
asset_content_type: application/text

.github/workflows/bluray.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,38 +20,38 @@ jobs:
2020
# git describe --tags --always | awk -F . '{printf "RELEASE_VERSION=%s.%d",$1,$2+1}' | xargs > constants.env
2121
# git describe --tags --always | awk -F - '{printf "RELEASE_VERSION=V1.0-%s",$NF}' | xargs > constants.env
2222
d=$(TZ=UTC-8 date +'%y%m%d%H%M%S')
23-
grep GIT_REPO_VERSION= ./init-cfgs/bluray | awk -F = '{printf "RELEASE_VERSION=%s",$2}' | xargs > constants.env
23+
LIB_NAME=bluray
24+
grep GIT_REPO_VERSION= ./init-cfgs/$LIB_NAME | awk -F = '{printf "RELEASE_VERSION=%s",$2}' | xargs > constants.env
25+
echo "LIB_NAME=$LIB_NAME" >> constants.env
2426
echo "RELEASE_DATE=$d" >> constants.env
27+
echo "HOMEBREW_NO_AUTO_UPDATE=1" >> constants.env
2528
cat constants.env
2629
- name: Export Env
2730
uses: cardinalby/export-env-action@v2
2831
with:
2932
envFile: 'constants.env'
3033
- name: init src
31-
run: ./init-any.sh all bluray
34+
run: ./init-any.sh macos ${{ env.LIB_NAME }}
3235
- name: generate src log
3336
run: |
3437
cd build/src/macos
3538
ls | awk -F ' ' '{printf "echo %s\n echo -------------\ngit -C %s log -n 1 | cat\n",$0,$0}' | bash > ../macos-src-log.md
36-
cd ../ios
37-
ls | awk -F ' ' '{printf "echo %s\n echo -------------\ngit -C %s log -n 1 | cat\n",$0,$0}' | bash > ../ios-src-log.md
3839
- name: do compile macos libs
3940
run: |
40-
cd macos
41-
./compile-any.sh build bluray
42-
./compile-any.sh lipo bluray
43-
- name: Zip macos libs
41+
./macos/compile-any.sh -c build -l ${{ env.LIB_NAME }}
42+
- name: Zip macos xcframework
4443
run: |
45-
cd build/product/macos/universal
46-
zip -rq macos-universal.zip ./*
44+
cd build/product/xcframework
45+
zip -rq apple-xcframework.zip ./*
46+
mv apple-xcframework.zip ../
4747
- name: Create Release
4848
id: create_release
4949
uses: actions/create-release@v1
5050
env:
5151
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5252
with:
53-
tag_name: bluray-${{ env.RELEASE_VERSION }}-${{ env.RELEASE_DATE }}
54-
release_name: bluray-${{ env.RELEASE_VERSION }}
53+
tag_name: ${{ env.LIB_NAME }}-${{ env.RELEASE_VERSION }}-${{ env.RELEASE_DATE }}
54+
release_name: ${{ env.LIB_NAME }}-${{ env.RELEASE_VERSION }}
5555
draft: false
5656
prerelease: false
5757
- name: Upload macos Release Asset
@@ -60,8 +60,8 @@ jobs:
6060
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6161
with:
6262
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
63-
asset_path: build/product/macos/universal/macos-universal.zip
64-
asset_name: "bluray-macos-universal-${{ env.RELEASE_VERSION }}.zip"
63+
asset_path: build/product/apple-xcframework.zip
64+
asset_name: "${{ env.LIB_NAME }}-apple-xcframework-${{ env.RELEASE_VERSION }}.zip"
6565
asset_content_type: application/zip
6666
- name: Upload macos src md
6767
uses: actions/upload-release-asset@v1

.github/workflows/dav1d.yml

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -20,66 +20,58 @@ jobs:
2020
# git describe --tags --always | awk -F . '{printf "RELEASE_VERSION=%s.%d",$1,$2+1}' | xargs > constants.env
2121
# git describe --tags --always | awk -F - '{printf "RELEASE_VERSION=V1.0-%s",$NF}' | xargs > constants.env
2222
d=$(TZ=UTC-8 date +'%y%m%d%H%M%S')
23-
grep GIT_REPO_VERSION= ./init-cfgs/dav1d | awk -F = '{printf "RELEASE_VERSION=%s",$2}' | xargs > constants.env
23+
LIB_NAME=dav1d
24+
grep GIT_REPO_VERSION= ./init-cfgs/$LIB_NAME | awk -F = '{printf "RELEASE_VERSION=%s",$2}' | xargs > constants.env
25+
echo "LIB_NAME=$LIB_NAME" >> constants.env
2426
echo "RELEASE_DATE=$d" >> constants.env
27+
echo "HOMEBREW_NO_AUTO_UPDATE=1" >> constants.env
2528
cat constants.env
2629
- name: Export Env
2730
uses: cardinalby/export-env-action@v2
2831
with:
2932
envFile: 'constants.env'
3033
- name: init src
31-
run: ./init-any.sh all dav1d
34+
run: ./init-any.sh all ${{ env.LIB_NAME }}
3235
- name: generate src log
3336
run: |
3437
cd build/src/macos
3538
ls | awk -F ' ' '{printf "echo %s\n echo -------------\ngit -C %s log -n 1 | cat\n",$0,$0}' | bash > ../macos-src-log.md
3639
cd ../ios
3740
ls | awk -F ' ' '{printf "echo %s\n echo -------------\ngit -C %s log -n 1 | cat\n",$0,$0}' | bash > ../ios-src-log.md
41+
cd ../tvos
42+
ls | awk -F ' ' '{printf "echo %s\n echo -------------\ngit -C %s log -n 1 | cat\n",$0,$0}' | bash > ../tvos-src-log.md
3843
- name: do compile macos libs
3944
run: |
40-
cd macos
41-
./compile-any.sh build dav1d
42-
./compile-any.sh lipo dav1d
45+
./macos/compile-any.sh -c build -l ${{ env.LIB_NAME }}
4346
- name: do compile ios libs
4447
run: |
45-
cd ios
46-
./compile-any.sh build dav1d
47-
./compile-any.sh lipo dav1d
48-
- name: Zip macos libs
48+
./ios/compile-any.sh -c build -l ${{ env.LIB_NAME }}
49+
- name: do compile tvos libs
4950
run: |
50-
cd build/product/macos/universal
51-
zip -rq macos-universal.zip ./*
52-
- name: Zip ios libs
51+
./tvos/compile-any.sh -c build -l ${{ env.LIB_NAME }}
52+
- name: Zip apple xcframework
5353
run: |
54-
cd build/product/ios/universal
55-
zip -rq ios-universal.zip ./*
54+
cd build/product/xcframework
55+
zip -rq apple-xcframework.zip ./*
56+
mv apple-xcframework.zip ../
5657
- name: Create Release
5758
id: create_release
5859
uses: actions/create-release@v1
5960
env:
6061
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6162
with:
62-
tag_name: dav1d-${{ env.RELEASE_VERSION }}-${{ env.RELEASE_DATE }}
63-
release_name: dav1d-${{ env.RELEASE_VERSION }}
63+
tag_name: ${{ env.LIB_NAME }}-${{ env.RELEASE_VERSION }}-${{ env.RELEASE_DATE }}
64+
release_name: ${{ env.LIB_NAME }}-${{ env.RELEASE_VERSION }}
6465
draft: false
6566
prerelease: false
66-
- name: Upload macos Release Asset
67+
- name: Upload Apple Plat Release Asset
6768
uses: actions/upload-release-asset@v1
6869
env:
6970
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7071
with:
7172
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
72-
asset_path: build/product/macos/universal/macos-universal.zip
73-
asset_name: "dav1d-macos-universal-${{ env.RELEASE_VERSION }}.zip"
74-
asset_content_type: application/zip
75-
- name: Upload ios Release Asset
76-
uses: actions/upload-release-asset@v1
77-
env:
78-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
79-
with:
80-
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
81-
asset_path: build/product/ios/universal/ios-universal.zip
82-
asset_name: "dav1d-ios-universal-${{ env.RELEASE_VERSION }}.zip"
73+
asset_path: build/product/apple-xcframework.zip
74+
asset_name: "${{ env.LIB_NAME }}-apple-xcframework-${{ env.RELEASE_VERSION }}.zip"
8375
asset_content_type: application/zip
8476
- name: Upload macos src md
8577
uses: actions/upload-release-asset@v1
@@ -98,4 +90,13 @@ jobs:
9890
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
9991
asset_path: build/src/ios-src-log.md
10092
asset_name: "ios-src-log-${{ env.RELEASE_VERSION }}.md"
101-
asset_content_type: application/text
93+
asset_content_type: application/text
94+
- name: Upload tvos src md
95+
uses: actions/upload-release-asset@v1
96+
env:
97+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
98+
with:
99+
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
100+
asset_path: build/src/tvos-src-log.md
101+
asset_name: "tvos-src-log-${{ env.RELEASE_VERSION }}.md"
102+
asset_content_type: application/text

0 commit comments

Comments
 (0)