Skip to content

Commit

Permalink
ci(clipper): fix ffmpeg dependency download and packaging steps
Browse files Browse the repository at this point in the history
  • Loading branch information
exwm committed Aug 12, 2023
1 parent a12d3a1 commit 334d8e8
Showing 1 changed file with 42 additions and 37 deletions.
79 changes: 42 additions & 37 deletions .github/workflows/yt_clipper_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,47 @@ jobs:
- uses: actions/checkout@v3

- name: Download ffmpeg dependency (windows)
if: matrix.os == 'windows-latest'
shell: bash
run: |
cd ./bindeps
curl -o ./ffmpeg.zip -L ${{ format('{0}/{1}.zip', matrix.ffmpeg_dl_prefix, matrix.ffmpeg_dl_name) }}
7z x ./ffmpeg.zip
mv ./${{matrix.ffmpeg_dl_name}} ffmpeg
./ffmpeg/bin/ffmpeg -version > version.txt
mv version.txt ffmpeg
ls -laR
- name: Download ffmpeg dependency (markup)
if: matrix.os == 'macos-latest'
shell: bash
run: |
cd ./bindeps
mkdir temp
cd temp
curl -o ./ffmpeg.7z -L ${{matrix.ffmpeg_dl_url}}
curl -o ./ffprobe.7z -L ${{matrix.ffprobe_dl_url}}
curl -o ./ffplay.7z -L ${{matrix.ffplay_dl_url}}
curl -o version.txt -L ${{matrix.ffmpeg_info_url}}
7z x ./ffmpeg.7z
7z x ./ffprobe.7z
7z x ./ffplay.7z
cd ..
mkdir -p ffmpeg/bin
mv temp/ffmpeg temp/ffprobe temp/ffplay ffmpeg/bin
chmod -v +x ffmpeg/bin/*
mv temp/version.txt ffmpeg
ls -laR
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -93,47 +134,11 @@ jobs:
mkdir -p ./artifact/py/${{env.FULL_NAME}}/{webms,bin,temp}/
mkdir -p ./bindeps
- name: Download ffmpeg dependency (windows)
if: matrix.os == 'windows-latest'
shell: bash
run: |
cd ./bindeps
curl -o ./ffmpeg.zip -L ${{ format('{0}/{1}.zip', matrix.ffmpeg_dl_prefix, matrix.ffmpeg_dl_name) }}
7z x ./ffmpeg.zip
mv ./${{matrix.ffmpeg_dl_name}} ffmpeg
./ffmpeg/bin/ffmpeg -version > version.txt
ls -laR
- name: Download ffmpeg dependency (markup)
if: matrix.os == 'macos-latest'
shell: bash
run: |
cd ./bindeps
curl -o ./ffmpeg.zip -L ${{matrix.ffmpeg_dl_url}}
curl -o ./ffprobe.zip -L ${{matrix.ffprobe_dl_url}}
curl -o ./ffplay.zip -L ${{matrix.ffplay_dl_url}}
curl -o version.txt -L ${{matrix.ffmpeg_info_url}}
7z x ./ffmpeg.zip
7z x ./ffprobe.zip
7z x ./ffplay.zip
mkdir -p ffmpeg/bin
mv ffmpeg ffprobe ffplay ffmpeg/bin
chmod -v +x ./bindeps/ffmpeg/bin/*
mv version.txt ffmpeg/bin
ls -laR
- name: Copy artifacts
shell: bash
run: |
mv ./bindeps/ffmpeg/bin/* ./artifact/py/${{env.FULL_NAME}}/bin/
mv ./bindeps/ffmpeg/*.{txt,json,md} ./artifact/py/${{env.FULL_NAME}}/bin/
mv ./bindeps/ffmpeg/*.txt ./artifact/py/${{env.FULL_NAME}}/bin/
cp ./src/clipper/include/* ./artifact/py/${{env.FULL_NAME}}/
cp ./src/clipper/${{matrix.shortos}}_helpers/* ./artifact/py/${{env.FULL_NAME}}/
cp ./dist/py/yt_clipper* ./artifact/py/${{env.FULL_NAME}}/
Expand Down

0 comments on commit 334d8e8

Please sign in to comment.