Skip to content

Commit

Permalink
all workflows use onestep
Browse files Browse the repository at this point in the history
  • Loading branch information
debugly committed Jun 28, 2024
1 parent 6a9e51b commit aeec739
Show file tree
Hide file tree
Showing 15 changed files with 133 additions and 1,554 deletions.
148 changes: 4 additions & 144 deletions .github/workflows/ass.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,150 +14,10 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Read Tag Version
- name: Install denpendencies
run: |
# https://stackoverflow.com/questions/4916492/git-describe-fails-with-fatal-no-names-found-cannot-describe-anything
# 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')
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
- name: Export Env
uses: cardinalby/export-env-action@v2
with:
envFile: 'constants.env'
- name: init src
run: |
./main.sh init -p ios -l ${{ env.LIB_NAME }}
./main.sh init -p tvos -l ${{ env.LIB_NAME }}
./main.sh init -p macos -l ${{ env.LIB_NAME }}
./main.sh install -p ios -l 'harfbuzz fribidi unibreak'
./main.sh install -p tvos -l 'harfbuzz fribidi unibreak'
./main.sh install -p macos -l '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: |
./main.sh compile -p macos -c build -l ${{ env.LIB_NAME }}
cd build/product/macos/universal
zip -rq macos-universal.zip ./*
- name: do compile ios libs
run: |
./main.sh compile -p ios -c build -l ${{ env.LIB_NAME }}
cd build/product/ios/universal
zip -rq ios-universal.zip ./*
cd ../universal-simulator
zip -rq ios-universal-simulator.zip ./*
- name: do compile tvos libs
run: |
./main.sh compile -p tvos -c build -l ${{ env.LIB_NAME }}
cd build/product/tvos/universal
zip -rq tvos-universal.zip ./*
cd ../universal-simulator
zip -rq tvos-universal-simulator.zip ./*
- name: Zip apple xcframework
run: |
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: ${{ env.LIB_NAME }}-${{ env.RELEASE_VERSION }}-${{ env.RELEASE_DATE }}
release_name: ${{ env.LIB_NAME }}-${{ env.RELEASE_VERSION }}
draft: false
prerelease: false
- name: Upload xcframework Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
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 Plat Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/product/ios/universal/ios-universal.zip
asset_name: "${{ env.LIB_NAME }}-ios-universal-${{ env.RELEASE_VERSION }}.zip"
asset_content_type: application/zip
- name: Upload iOS Simulator Plat Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/product/ios/universal-simulator/ios-universal-simulator.zip
asset_name: "${{ env.LIB_NAME }}-ios-universal-simulator-${{ env.RELEASE_VERSION }}.zip"
asset_content_type: application/zip
- name: Upload macOS Plat Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/product/macos/universal/macos-universal.zip
asset_name: "${{ env.LIB_NAME }}-macos-universal-${{ env.RELEASE_VERSION }}.zip"
asset_content_type: application/zip
- name: Upload tvOS Plat Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/product/tvos/universal/tvos-universal.zip
asset_name: "${{ env.LIB_NAME }}-tvos-universal-${{ env.RELEASE_VERSION }}.zip"
asset_content_type: application/zip
- name: Upload tvOS Simulator Plat Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/product/tvos/universal-simulator/tvos-universal-simulator.zip
asset_name: "${{ env.LIB_NAME }}-tvos-universal-simulator-${{ env.RELEASE_VERSION }}.zip"
asset_content_type: application/zip
- 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 }}
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 }}
asset_path: build/src/ios-src-log.md
asset_name: "ios-src-log-${{ env.RELEASE_VERSION }}.md"
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 }}
asset_path: build/src/tvos-src-log.md
asset_name: "tvos-src-log-${{ env.RELEASE_VERSION }}.md"
asset_content_type: application/text
./main.sh install -p macos -l 'harfbuzz fribidi unibreak'
- name: One Step
run: .github/workflows/onestep.sh ass all
71 changes: 2 additions & 69 deletions .github/workflows/bluray.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,72 +14,5 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Read Tag Version
run: |
# https://stackoverflow.com/questions/4916492/git-describe-fails-with-fatal-no-names-found-cannot-describe-anything
# 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')
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: ./main.sh init -p macos -l ${{ 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
- name: do compile macos libs
run: |
./main.sh compile -p macos -c build -l ${{ env.LIB_NAME }}
cd build/product/macos/universal
zip -rq macos-universal.zip ./*
- name: Zip apple xcframework
run: |
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: ${{ env.LIB_NAME }}-${{ env.RELEASE_VERSION }}-${{ env.RELEASE_DATE }}
release_name: ${{ env.LIB_NAME }}-${{ env.RELEASE_VERSION }}
draft: false
prerelease: false
- name: Upload xcframework Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
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 Plat Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/product/macos/universal/macos-universal.zip
asset_name: "${{ env.LIB_NAME }}-macos-universal-${{ env.RELEASE_VERSION }}.zip"
asset_content_type: application/zip
- 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 }}
asset_path: build/src/macos-src-log.md
asset_name: "macos-src-log-${{ env.RELEASE_VERSION }}.md"
asset_content_type: application/text
- name: One Step
run: .github/workflows/onestep.sh bluray macos
146 changes: 2 additions & 144 deletions .github/workflows/dav1d.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,147 +14,5 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Read Tag Version
run: |
# https://stackoverflow.com/questions/4916492/git-describe-fails-with-fatal-no-names-found-cannot-describe-anything
# 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')
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: |
./main.sh init -p ios -l ${{ env.LIB_NAME }}
./main.sh init -p tvos -l ${{ env.LIB_NAME }}
./main.sh init -p macos -l ${{ 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: |
./main.sh compile -p macos -c build -l ${{ env.LIB_NAME }}
cd build/product/macos/universal
zip -rq macos-universal.zip ./*
- name: do compile ios libs
run: |
./main.sh compile -p ios -c build -l ${{ env.LIB_NAME }}
cd build/product/ios/universal
zip -rq ios-universal.zip ./*
cd ../universal-simulator
zip -rq ios-universal-simulator.zip ./*
- name: do compile tvos libs
run: |
./main.sh compile -p tvos -c build -l ${{ env.LIB_NAME }}
cd build/product/tvos/universal
zip -rq tvos-universal.zip ./*
cd ../universal-simulator
zip -rq tvos-universal-simulator.zip ./*
- name: Zip apple xcframework
run: |
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: ${{ env.LIB_NAME }}-${{ env.RELEASE_VERSION }}-${{ env.RELEASE_DATE }}
release_name: ${{ env.LIB_NAME }}-${{ env.RELEASE_VERSION }}
draft: false
prerelease: false
- name: Upload xcframework Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
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 Plat Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/product/ios/universal/ios-universal.zip
asset_name: "${{ env.LIB_NAME }}-ios-universal-${{ env.RELEASE_VERSION }}.zip"
asset_content_type: application/zip
- name: Upload iOS Simulator Plat Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/product/ios/universal-simulator/ios-universal-simulator.zip
asset_name: "${{ env.LIB_NAME }}-ios-universal-simulator-${{ env.RELEASE_VERSION }}.zip"
asset_content_type: application/zip
- name: Upload macOS Plat Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/product/macos/universal/macos-universal.zip
asset_name: "${{ env.LIB_NAME }}-macos-universal-${{ env.RELEASE_VERSION }}.zip"
asset_content_type: application/zip
- name: Upload tvOS Plat Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/product/tvos/universal/tvos-universal.zip
asset_name: "${{ env.LIB_NAME }}-tvos-universal-${{ env.RELEASE_VERSION }}.zip"
asset_content_type: application/zip
- name: Upload tvOS Simulator Plat Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/product/tvos/universal-simulator/tvos-universal-simulator.zip
asset_name: "${{ env.LIB_NAME }}-tvos-universal-simulator-${{ env.RELEASE_VERSION }}.zip"
asset_content_type: application/zip
- 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 }}
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 }}
asset_path: build/src/ios-src-log.md
asset_name: "ios-src-log-${{ env.RELEASE_VERSION }}.md"
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 }}
asset_path: build/src/tvos-src-log.md
asset_name: "tvos-src-log-${{ env.RELEASE_VERSION }}.md"
asset_content_type: application/text
- name: One Step
run: .github/workflows/onestep.sh dav1d all
Loading

0 comments on commit aeec739

Please sign in to comment.