Skip to content

create freebsd package framework and git action job #9

create freebsd package framework and git action job

create freebsd package framework and git action job #9

Workflow file for this run

# * manually applying safe.directory
#
# git config --global --add safe.directory /home/runner/work/strfry/strfry
# to avoid similar errors that may not be applicable if branches or submodules are not used
# https://stackoverflow.com/questions/72978485/git-submodule-update-failed-with-fatal-detected-dubious-ownership-in-repositor
#
# * release value is set to 13.2, remove to set to latest.
#
# * docs
# https://github.com/vmactions/freebsd-vm/blob/main/README.md
#
name: freebsd
on: [push, pull_request]
jobs:
freebsd:
runs-on: ubuntu-latest
name: A job to build and run strfry in FreeBSD
steps:
- name: Checkout strfry
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build strfry
uses: vmactions/freebsd-vm@v1
with:
release: 13.2
usesh: true
prepare: |
pkg install -y gcc gmake cmake git perl5 openssl lmdb flatbuffers libuv libinotify zstr secp256k1 zlib-ng p5-Regexp-Grammars p5-Module-Install-Template p5-YAML wget
run: |
# ownership workaround
git config --global --add safe.directory /home/runner/work/strfry/strfry
git config --local --name-only --get-regexp core\.sshCommand
git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
git submodule update --init
git config --global --add safe.directory /home/runner/work/strfry/strfry/golpe
make setup-golpe
gmake
if ! [ -f ./strfry ]; then
echo "Strfry build failed."
exit 1
fi
freebsd/build-pkg.sh
# backgrounding down not return
./strfry info
freebsd-version
- name: Verify strfry copy back
run: |
pkgfilename=`ls *.pkg`
echo "pkgfilename=$pkgfilename" >> $GITHUB_ENV
- name: Upload strfry
uses: actions/upload-artifact@v3
with:
name: ${{ env.pkgfilename }}
path: ${{ env.pkgfilename }}