add support for OpenBSD #1507
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: Stylecheck and CI | |
on: | |
push: | |
branches: | |
- '*' | |
- '!win32-*' | |
- '!freebsd-*' | |
tags: [ '*' ] | |
pull_request: | |
branches: [ master ] | |
env: | |
LANG: en_US.UTF-8 | |
DEBIAN_FRONTEND: noninteractive | |
jobs: | |
stylecheck: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install preliminary dependencies | |
run: sudo apt-get update -y && sudo apt-get install curl gnupg apt-transport-https -y | |
- name: Add clang 11.0 to apt sources | |
run: echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" | sudo tee -a /etc/apt/sources.list | |
- name: Add LLVM apt key | |
run: curl https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
- name: Install dependencies | |
run: sudo apt-get update -y && sudo apt-get install git clang-format-15 -y | |
- name: Style checker | |
run: bash scripts/stylecheck.sh | |
build-pr-review: | |
runs-on: ubuntu-latest | |
container: debian:bullseye | |
needs: stylecheck | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: apt-get update -y && apt-get install git build-essential libsqlite3-dev util-linux librsvg2-dev libcairomm-1.0-dev libepoxy-dev libgtkmm-3.0-dev uuid-dev libzmq5 libzmq3-dev libglm-dev libgit2-dev libcurl4-gnutls-dev liboce-ocaf-dev libpodofo-dev python3-dev libarchive-dev git libosmesa6-dev cmake meson -y | |
- name: Build | |
run: | | |
mkdir ../build | |
CXX=${{ matrix.os.cxx }} CC=${{ matrix.os.cc }} meson setup ../build | |
ninja -C ../build horizon-pr-review | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- container: ubuntu:focal | |
cxx: g++ | |
cc: gcc | |
- container: ubuntu:jammy | |
cxx: g++ | |
cc: gcc | |
- container: ubuntu:lunar | |
cxx: g++ | |
cc: gcc | |
- container: debian:bullseye | |
cxx: g++ | |
cc: gcc | |
- container: debian:bookworm | |
cxx: clang | |
cc: clang | |
- container: debian:bookworm | |
cxx: g++ | |
cc: gcc | |
target: | |
- all | |
- horizon.so | |
runs-on: ubuntu-latest | |
container: ${{ matrix.os.container }} | |
needs: stylecheck | |
steps: | |
- uses: actions/checkout@v3 | |
- name: generate locales | |
run: | | |
apt-get update | |
apt-get install -y locales | |
locale-gen ${{ env.LANG }} | |
- name: Install dependencies | |
run: apt-get install git build-essential ${{ matrix.os.cxx }} libsqlite3-dev util-linux librsvg2-dev libcairomm-1.0-dev libepoxy-dev libgtkmm-3.0-dev uuid-dev libzmq5 libzmq3-dev libglm-dev libgit2-dev libcurl4-gnutls-dev liboce-ocaf-dev libpodofo-dev python3-dev libarchive-dev git libspnav-dev meson cmake -y | |
- name: Install python dependencies | |
if: ${{ matrix.target == 'horizon.so' }} | |
run: apt-get install python3-cairo-dev libosmesa6-dev python3-yaml -y | |
- name: Build | |
run: | | |
mkdir ../build | |
CXX=${{ matrix.os.cxx }} CC=${{ matrix.os.cc }} meson setup ../build | |
ninja -C ../build ${{ matrix.target }} | |
- name: Check version | |
run: python3 check_version.py | |
- name: Test python module | |
if: ${{ matrix.target == 'horizon.so' }} | |
run: python3 -c 'import sys; sys.path.append("../build"); import horizon' | |
- name: Check app versions | |
if: ${{ matrix.target == 'horizon.so' }} | |
run: python3 scripts/check_app_versions.py | |
- name: Build and run tests | |
if: ${{ matrix.target != 'horizon.so' }} | |
#run: make -j2 CXX=${{ matrix.os.cxx }} CC=${{ matrix.os.cc }} WARNFLAGS="-Wall -Wshadow -Wno-parentheses" test | |
run: meson test -C ../build | |
build-arch: | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- all | |
- horizon.so | |
runs-on: ubuntu-latest | |
container: archlinux:base-devel | |
needs: stylecheck | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install updates | |
run: pacman -Syu --noconfirm | |
- name: Install dependencies | |
run: pacman -Sy --needed --noconfirm zeromq cppzmq gtkmm3 cairomm librsvg sqlite3 libgit2 curl opencascade glm podofo-0.9 libarchive python libspnav cmake meson | |
- name: Install python dependencies | |
if: ${{ matrix.target == 'horizon.so' }} | |
run: pacman -S --needed --noconfirm mesa python-cairo python-yaml | |
- name: Build LD_PRELOAD kludge | |
run: gcc -shared -fPIC -o close_range.so scripts/close_range.c | |
- name: Build | |
run: | | |
mkdir ../build | |
CXX=${{ matrix.os.cxx }} CC=${{ matrix.os.cc }} meson setup ../build | |
ninja -C ../build ${{ matrix.target }} | |
- name: Check version | |
run: python3 check_version.py | |
- name: Test python module | |
if: ${{ matrix.target == 'horizon.so' }} | |
run: python3 -c 'import sys; sys.path.append("../build"); import horizon' | |
build-opensuse: | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- all | |
- horizon.so | |
runs-on: ubuntu-latest | |
container: opensuse/tumbleweed | |
needs: stylecheck | |
continue-on-error: true | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: zypper in -y git make gcc gcc-c++ pkg-config cppzmq-devel oce-devel gtkmm3-devel libgit2-devel libuuid-devel sqlite3-devel librsvg-devel cairomm-devel glm-devel boost-devel libcurl-devel libpodofo-devel binutils-gold libarchive-devel libspnav-devel python3 meson cmake | |
- name: Install python dependencies | |
if: ${{ matrix.target == 'horizon.so' }} | |
run: zypper in -y Mesa-devel python3-pycairo-devel python3-PyYAML | |
- name: Build | |
run: | | |
mkdir ../build | |
CXX=${{ matrix.os.cxx }} CC=${{ matrix.os.cc }} meson setup ../build | |
ninja -C ../build ${{ matrix.target }} | |
- name: Check version | |
run: python3 check_version.py | |
- name: Test python module | |
if: ${{ matrix.target == 'horizon.so' }} | |
run: python3 -c 'import sys; sys.path.append("../build"); import horizon' | |
build-debug: | |
runs-on: ubuntu-latest | |
container: debian:bookworm | |
needs: stylecheck | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: apt-get update -y && apt-get install git build-essential libsqlite3-dev util-linux librsvg2-dev libcairomm-1.0-dev libepoxy-dev libgtkmm-3.0-dev uuid-dev libzmq5 libzmq3-dev libglm-dev libgit2-dev libcurl4-gnutls-dev liboce-ocaf-dev libpodofo-dev python3-dev libarchive-dev git meson cmake -y | |
- name: Build | |
run: | | |
mkdir ../build | |
meson setup ../build --buildtype debug | |
meson compile -C ../build |