This repository was archived by the owner on Jan 16, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +66
-0
lines changed Expand file tree Collapse file tree 2 files changed +66
-0
lines changed Original file line number Diff line number Diff line change 1+ # /bin/sh
2+ set -e
3+ PACKAGE=ffmpeg
4+
5+ # Update
6+ pacman -Syy --noconfirm
7+ OUTPUT=$( mktemp -d)
8+
9+ # Download files (-dd skips dependencies)
10+ pkgs=$( echo mingw-w64-{i686,x86_64,ucrt-x86_64}-${PACKAGE} )
11+ deps=$( pacman -Si $pkgs | grep ' Depends On' | grep -o ' mingw-w64-[_.a-z0-9-]*' )
12+ URLS=$( pacman -Sp $pkgs $deps --cache=$OUTPUT )
13+ VERSION=$( pacman -Si mingw-w64-x86_64-${PACKAGE} | awk ' /^Version/{print $3}' )
14+
15+ # Set version for next step
16+ echo " ::set-output name=VERSION::${VERSION} "
17+ echo " ::set-output name=PACKAGE::${PACKAGE} "
18+ echo " Bundling $PACKAGE -$VERSION "
19+ echo " # $PACKAGE $VERSION " > README.md
20+ echo " " >> README.md
21+
22+ for URL in $URLS ; do
23+ curl -OLs $URL
24+ FILE=$( basename $URL )
25+ echo " Extracting: $URL "
26+ echo " - $FILE " >> README.md
27+ tar xf $FILE -C ${OUTPUT}
28+ rm -f $FILE
29+ done
30+
31+ # Copy libs
32+ rm -Rf include lib*
33+ mkdir -p lib/x64 lib-8.3.0/{x64,i386}
34+ cp -v ${OUTPUT} /ucrt64/lib/* .a lib/x64/
35+ cp -v ${OUTPUT} /mingw64/lib/* .a lib-8.3.0/x64/
36+ cp -v ${OUTPUT} /mingw32/lib/* .a lib-8.3.0/i386/
37+ cp -rv ${OUTPUT} /ucrt64/include .
Original file line number Diff line number Diff line change 1+ name : bundle binaries
2+
3+ on :
4+ workflow_dispatch :
5+
6+ jobs :
7+ build :
8+ runs-on : windows-latest
9+ steps :
10+ - name : Prepare git
11+ run : |
12+ git config --global core.autocrlf false
13+ git config --global user.email '121622595+jeroen[bot]@users.noreply.github.com'
14+ git config --global user.name 'Jeroen (via CI)'
15+ - uses : actions/checkout@v3
16+ - id : download
17+ name : Download libraries
18+ run : |
19+ cd $(cygpath ${GITHUB_WORKSPACE})
20+ .github/workflows/bundle.sh
21+ shell : c:\rtools40\usr\bin\bash.exe --login {0}
22+ - name : Push binaries
23+ run : |
24+ version=${{ steps.download.outputs.VERSION }}
25+ git add README.md include lib*
26+ git commit -m "Bundle $version ($(date +%F))" || exit 0
27+ git tag $version
28+ git push origin master $version
29+ shell : bash
You can’t perform that action at this time.
0 commit comments