NetBSD build #664
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "NetBSD build" | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| schedule: | |
| - cron: '0 7 * * 2' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Repository checkout | |
| uses: actions/checkout@v3 | |
| - name: Test on NetBSD 9.3 | |
| uses: cross-platform-actions/[email protected] # see https://github.com/cross-platform-actions/action | |
| with: | |
| operating_system: netbsd | |
| version: '9.3' | |
| shell: bash | |
| run: | | |
| uname -a | |
| whoami | |
| pwd | |
| export PKG_REPOS="http://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -p)/$(uname -r)/All/" | |
| sudo -E pkgin clean | |
| sudo -E pkgin update | |
| # https://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/index-all.html | |
| sudo -E pkgin -y install gcc14 automake autoconf autoconf-archive libtool pkgconf cppunit | |
| export CXX=/usr/pkg/gcc14/bin/g++ | |
| $CXX --version | |
| autoreconf -v --install --force | |
| ./configure --prefix=/usr | |
| CPU_COUNT="$( ( ( getconf _NPROCESSORS_ONLN 2>/dev/null || (getconf NPROCESSORS_ONLN 2>/dev/null) ) || nprocx 2>/dev/null ) || echo "1")" | |
| JOBS="$(( $((CPU_COUNT / 2)) > 1 ? $((CPU_COUNT / 2)) : 1 ))" | |
| make -j$JOBS | |