Skip to content

Build all pkgin release tags #9

Build all pkgin release tags

Build all pkgin release tags #9

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
(
cd pkgsrc/net/libfetch/files
mkdir nbcompat
echo '#include <netdb.h>' >nbcompat/netdb.h
echo '#include <stdio.h>' >nbcompat/stdio.h
echo '#define HAVE_POLL_H 1' >nbcompat.h
export BINOWN="$(id -un)"
export ROOT_GROUP="$(id -gn)"
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
../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