OpenBSD #37
This file contains 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: OpenBSD | |
on: | |
pull_request: | |
paths: | |
- '.github/actions/**' | |
- '.github/workflows/openbsd.yml' | |
schedule: | |
- cron: '22 02 * * *' | |
workflow_dispatch: | |
inputs: | |
skip_functional_tests: | |
description: 'Skip functional tests' | |
required: true | |
default: false | |
type: boolean | |
concurrency: | |
group: ${{ github.workflow }}${{ github.event_name != 'pull_request' && github.run_id || github.ref }} | |
cancel-in-progress: true | |
env: | |
CCACHE_COMPILERCHECK: content | |
CCACHE_DIR: ${{ github.workspace }}/ccache | |
CCACHE_MAXSIZE: 300M | |
# See https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories | |
CI_NCPU: 4 | |
jobs: | |
openbsd-syslibs: | |
name: 'OpenBSD: system libs, no BDB, no GUI' | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: openbsd {0} | |
steps: | |
- name: Checkout Bitcoin Core repo | |
uses: actions/checkout@v4 | |
with: | |
repository: bitcoin/bitcoin | |
- name: Start OpenBSD VM | |
uses: vmactions/openbsd-vm@v1 | |
with: | |
envs: 'CCACHE_COMPILERCHECK CCACHE_DIR CCACHE_MAXSIZE' | |
prepare: pkg_add -v cmake git ccache boost libevent sqlite3 zeromq python py3-zmq | |
run: git config --global --add safe.directory ${{ github.workspace }} | |
sync: 'rsync' | |
copyback: false | |
- name: Checkout helper actions | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: .github/actions | |
path: ci/nightly | |
- name: Generate buildsystem | |
run: | | |
cd ${{ github.workspace }} | |
cmake -B build -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWERROR=ON | |
- name: Build | |
uses: ./ci/nightly/.github/actions/build-with-ccache | |
with: | |
vm: openbsd | |
- name: Check 'bitcoind' executable | |
run: | | |
set -e | |
cd ${{ github.workspace }} | |
ls -l ./build/src/bitcoind | |
file ./build/src/bitcoind | |
ldd ./build/src/bitcoind | |
./build/src/bitcoind -version | |
- name: Run test suite | |
uses: ./ci/nightly/.github/actions/run-test-suite | |
with: | |
vm: openbsd | |
- name: Run functional tests | |
if: ${{ ! inputs.skip_functional_tests }} | |
run: | | |
cd ${{ github.workspace }} | |
./build/test/functional/test_runner.py --ci --extended -j ${{ env.CI_NCPU }} --combinedlogslen=99999999 --quiet --tmpdirprefix . --timeout-factor=8 | |
openbsd-depends: | |
name: 'OpenBSD: depends, no MP' | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: openbsd {0} | |
steps: | |
- name: Checkout Bitcoin Core repo | |
uses: actions/checkout@v4 | |
with: | |
repository: bitcoin/bitcoin | |
- name: Start OpenBSD VM | |
uses: vmactions/openbsd-vm@v1 | |
with: | |
envs: 'CCACHE_COMPILERCHECK CCACHE_DIR CCACHE_MAXSIZE' | |
prepare: pkg_add bash curl gmake gtar-- cmake git ccache python py3-zmq | |
run: git config --global --add safe.directory ${{ github.workspace }} | |
sync: 'rsync' | |
copyback: false | |
- name: Checkout helper actions | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: .github/actions | |
path: ci/nightly | |
- name: Build depends | |
uses: ./ci/nightly/.github/actions/build-depends | |
with: | |
vm: openbsd | |
# TODO: Fix capnp compilation and enable MULTIPROCESS. | |
# options: "MULTIPROCESS=1" | |
- name: Generate buildsystem | |
run: | | |
cd ${{ github.workspace }} | |
cmake -B build --toolchain depends/$(./depends/config.guess)/toolchain.cmake -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWERROR=ON | |
- name: Build | |
uses: ./ci/nightly/.github/actions/build-with-ccache | |
with: | |
vm: openbsd | |
- name: Check 'bitcoind' executable | |
run: | | |
set -e | |
cd ${{ github.workspace }} | |
ls -l ./build/src/bitcoind | |
file ./build/src/bitcoind | |
ldd ./build/src/bitcoind | |
./build/src/bitcoind -version | |
- name: Run test suite | |
uses: ./ci/nightly/.github/actions/run-test-suite | |
with: | |
vm: openbsd | |
- name: Run functional tests | |
if: ${{ ! inputs.skip_functional_tests }} | |
run: | | |
cd ${{ github.workspace }} | |
./build/test/functional/test_runner.py --ci --extended -j ${{ env.CI_NCPU }} --combinedlogslen=99999999 --quiet --tmpdirprefix . --timeout-factor=8 |