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=libssh
4
+
5
+ # Update
6
+ pacman -Sy
7
+ OUTPUT=$( mktemp -d)
8
+
9
+ pkgs=$( echo mingw-w64-{i686,x86_64,ucrt-x86_64}-${PACKAGE} )
10
+ deps=$( pacman -Si $pkgs | grep ' Depends On' | grep -o ' mingw-w64-[_.a-z0-9-]*' )
11
+ URLS=$( pacman -Sp $pkgs $deps --cache=$OUTPUT )
12
+ VERSION=$( pacman -Si mingw-w64-x86_64-${PACKAGE} | awk ' /^Version/{print $3}' )
13
+
14
+ # Set version for next step
15
+ echo " ::set-output name=VERSION::${VERSION} "
16
+ echo " ::set-output name=PACKAGE::${PACKAGE} "
17
+ echo " Bundling $PACKAGE -$VERSION "
18
+ echo " # $PACKAGE $VERSION " > README.md
19
+ echo " " >> README.md
20
+
21
+ for URL in $URLS ; do
22
+ curl -OLs $URL
23
+ FILE=$( basename $URL )
24
+ echo " Extracting: $FILE "
25
+ echo " - $FILE " >> readme.md
26
+ tar xf $FILE -C ${OUTPUT}
27
+ unlink $FILE
28
+ done
29
+ rm -Rf lib lib-8.3.0 lib-4.9.3 include
30
+ mkdir -p lib-8.3.0
31
+ mkdir -p lib
32
+ cp -Rf ${OUTPUT} /mingw64/include .
33
+ cp -Rf ${OUTPUT} /mingw64/lib lib-8.3.0/x64
34
+ cp -Rf ${OUTPUT} /mingw32/lib lib-8.3.0/i386
35
+ cp -Rf ${OUTPUT} /ucrt64/lib lib/x64
36
+ ls -ltrRh .
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 '[email protected] '
14
+ git config --global user.name 'Jeroen Ooms (via CI)'
15
+ - uses : actions/checkout@v3
16
+ - uses : r-windows/install-rtools@master
17
+ - id : download
18
+ name : Download libraries
19
+ run : |
20
+ cd $(cygpath ${GITHUB_WORKSPACE})
21
+ .github/workflows/bundle.sh
22
+ shell : c:\rtools40\usr\bin\bash.exe --login {0}
23
+ - name : Push binaries
24
+ run : |
25
+ version=${{ steps.download.outputs.VERSION }}
26
+ git add README.md include lib*
27
+ git commit -m "Bundle $version ($(date +%F))" || exit 0
28
+ git tag $version
29
+ git push origin master $version
30
+ shell : bash
You can’t perform that action at this time.
0 commit comments