Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
update script for new structure
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Sep 19, 2023
1 parent 28b4d3f commit f0445bc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 49 deletions.
49 changes: 5 additions & 44 deletions .github/workflows/bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,53 +29,14 @@ for URL in $URLS; do
done

# Copy libs
rm -Rf bin{32,64} lib lib-8.3.0
mkdir -p bin{32,64} lib/x64 lib-8.3.0/{x64,i386}
(cd ${OUTPUT}/ucrt64/lib; cp -fv *.a $ROOT/lib/x64/)
rm -Rf bin* lib* include
mkdir -p include bin{32,} lib lib-8.3.0/{x64,i386}
(cd ${OUTPUT}/ucrt64/lib; cp -fv *.a $ROOT/lib/)
(cd ${OUTPUT}/mingw64/lib; cp -fv *.a $ROOT/lib-8.3.0/x64/)
(cd ${OUTPUT}/mingw32/lib; cp -fv *.a $ROOT/lib-8.3.0/i386/)
(cd ${OUTPUT}/mingw32/bin/; cp -fv *.exe $ROOT/bin32/)
(cd ${OUTPUT}/mingw64/bin/; cp -fv *.exe $ROOT/bin64/)

# Copy headers for some packages
rm -Rf include
mkdir -p include
cp -Rf ${OUTPUT}/mingw64/include .
(cd ${OUTPUT}/mingw64/bin/; cp -fv *.exe $ROOT/bin/)
cp -Rf ${OUTPUT}/ucrt64/include $ROOT/

# Cleanup temporary dir
rm -Rf ${OUTPUT}/*

# Setup backports repo
function finish {
echo "Restoring pacman.conf"
cp -f /etc/pacman.conf.bak /etc/pacman.conf
rm -f /etc/pacman.conf.bak
pacman -Scc --noconfirm
pacman -Syy
}
trap finish EXIT
cp /etc/pacman.conf /etc/pacman.conf.bak
curl -Ol 'https://raw.githubusercontent.com/r-windows/rtools-backports/master/pacman.conf'
cp -f pacman.conf /etc/pacman.conf
pacman -Scc --noconfirm
pacman -Syy

# Download backports
backports=$(echo mingw-w64-{i686,x86_64}-${PACKAGE})
URLS=$(pacman -Sp $backports --cache=$OUTPUT)
for URL in $URLS; do
curl -OLs $URL
FILE=$(basename $URL)
echo "Extracting: $URL"
tar xf $FILE -C ${OUTPUT}
rm -f $FILE
done

# Copy libs
rm -Rf lib-4.9.3
mkdir -p lib-4.9.3/{x64,i386}
cp -fv ${OUTPUT}/mingw32/lib/lib*.a lib-4.9.3/i386/
cp -fv ${OUTPUT}/mingw64/lib/lib*.a lib-4.9.3/x64/

# Cleanup temporary dir
rm -Rf ${OUTPUT} pacman.conf
11 changes: 6 additions & 5 deletions .github/workflows/bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ jobs:
- name: Prepare git
run: |
git config --global core.autocrlf false
git config --global user.email '121622595+jeroen[bot]@users.noreply.github.com'
git config --global user.name 'Jeroen (via CI)'
- uses: actions/checkout@v2
git config --global user.email '[email protected]'
git config --global user.name 'Jeroen Ooms (via CI)'
- uses: actions/checkout@v3
- uses: r-windows/install-rtools@master
- id: download
name: Download libraries
run: |
Expand All @@ -22,8 +23,8 @@ jobs:
- name: Push binaries
run: |
version=${{ steps.download.outputs.VERSION }}
git add README.md include lib* bin*
git commit -m "Bundle $version ($(date +%F))" || exit 0
git add README.md include lib lib-8.3.0 bin bin32
git commit -a -m "Bundle $version ($(date +%F))" || exit 0
git tag $version
git push origin master $version
shell: bash

0 comments on commit f0445bc

Please sign in to comment.