-
Notifications
You must be signed in to change notification settings - Fork 83
179 lines (170 loc) · 6.56 KB
/
all.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
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 libocct-data-exchange-dev libocct-draw-dev occt-misc 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:noble
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 libpodofo-dev python3-dev libarchive-dev git libspnav-dev meson cmake libocct-data-exchange-dev libocct-draw-dev occt-misc -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 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
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: zypper in -y git make gcc gcc-c++ pkg-config cppzmq-devel occt-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 libocct-data-exchange-dev libocct-draw-dev occt-misc libpodofo-dev python3-dev libarchive-dev git meson cmake -y
- name: Build
run: |
mkdir ../build
meson setup ../build --buildtype debug
meson compile -C ../build