Skip to content

Build all pkgin release tags #11

Build all pkgin release tags

Build all pkgin release tags #11

name: Build all pkgin release tags
on:
workflow_dispatch:
jobs:
build-tags:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up host
run: |
sudo apt-get update
sudo apt-get install -y \
bmake \
build-essential \
cvs \
libarchive-dev \
libsqlite3-dev \
libssl-dev
mkdir ~/.ssh
ssh-keyscan anoncvs.netbsd.org >>~/.ssh/known_hosts
cvs -d [email protected]:/cvsroot co -P pkgsrc/net/libfetch/files
cvs -d [email protected]:/cvsroot co -P pkgsrc/pkgtools/libnbcompat/files
(
cd pkgsrc/pkgtools/libnbcompat/files
./configure --enable-db
bmake
)
(
cd pkgsrc/net/libfetch/files
export BINOWN="$(id -un)"
export ROOT_GROUP="$(id -gn)"
env \
CFLAGS="-DHAVE_NBCOMPAT_H=1 -I${GITHUB_WORKSPACE}/pkgsrc/pkgtools/libnbcompat/files" \
bmake
bmake DESTDIR=/tmp/destdir install
)
- name: Get tags to build
run: |
#tags=$(git tag | grep ^v)
tags="v24.12.0"
echo "tags=$tags" >> $GITHUB_ENV
- name: Build each tag
run: |
mkdir bin
for tag in ${{ env.tags }}; do
git checkout $tag
mkdir build
(
cd build
env \
CFLAGS="-I${GITHUB_WORKSPACE}/pkgsrc/pkgtools/libnbcompat/files" \
LDFLAGS="-L${GITHUB_WORKSPACE}/pkgsrc/pkgtools/libnbcompat/files -lnbcompat" \
../configure \
--prefix=/usr/local \
--with-dbdir=/usr/local/.pkgdb \
--with-libfetch=/tmp/destdir/usr \
--with-pkg-install=/tmp \
--with-machine-arch=x86_64 || (cat config.log && false)
make
)
mv build/pkgin bin/pkgin-"$tag"
rm -rf build
done
tar -czf pkgin-bins.tar.gz ./bin
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: pkgin-binaries
path: pkgin-bins.tar.gz