-
-
Notifications
You must be signed in to change notification settings - Fork 17
177 lines (169 loc) · 4.8 KB
/
ci.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
name: CI
on:
schedule:
- cron: "0 2 * * 0"
push:
branches:
- master
pull_request:
branches:
- master
jobs:
# visual-studio:
# timeout-minutes: 60
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v4
# - name: Setup python
# uses: actions/setup-python@v1
# with:
# python-version: 3.8
# - uses: ilammy/msvc-dev-cmd@v1
# - uses: BSFishy/[email protected]
# with:
# action: test
# setup-options: -Dwith-fortran=false
macos:
timeout-minutes: 60
runs-on: macos-latest
steps:
- name: Install homebrew dependencies
run: |
set -ex
rm -f /usr/local/bin/2to3
rm -r "$(brew --cache)/api"
brew update
brew install wget pkg-config doxygen graphviz git meson ninja gtkmm4 plplot
set +ex
- uses: actions/checkout@v4
- name: Build and test
run: |
set -ex
meson setup --buildtype=debugoptimized -Dbuild-documentation=enabled builddir && cd builddir
meson compile
meson dist
set +ex
env:
CC: clang
CXX: clang++
msys2:
timeout-minutes: 60
strategy:
matrix:
cc:
- clang
- gcc
include:
- cc: clang
cxx: clang++
- cc: gcc
cxx: g++
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
update: true
install: >
base-devel
git
mingw-w64-x86_64-gcc
mingw-w64-x86_64-gtkmm4
mingw-w64-x86_64-meson
mingw-w64-x86_64-clang
mingw-w64-x86_64-lld
mingw-w64-x86_64-pkg-config
mingw-w64-x86_64-cmake
mingw-w64-x86_64-doxygen
mingw-w64-x86_64-graphviz
make
wget
- uses: actions/checkout@v4
- name: Install PLplot
run: |
set -ex
wget -q https://downloads.sourceforge.net/project/plplot/plplot/5.15.0%20Source/plplot-5.15.0.tar.gz
tar xfz plplot-${PLPLOT_VERSION}.tar.gz
cd plplot-${PLPLOT_VERSION}
cmake -G "MSYS Makefiles" \
-DENABLE_DYNDRIVERS=OFF \
-DPLD_wingcc=OFF \
-DENABLE_cxx=ON \
-DENABLE_qt=OFF \
-DENABLE_fortran=OFF \
-DENABLE_tcl=OFF \
-DENABLE_tk=OFF \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
.
make
make install
set +ex
env:
PLPLOT_VERSION: 5.15.0
- name: Build
run: |
set -ex
meson setup --buildtype=debugoptimized -Dbuild-documentation=enabled builddir && cd builddir
meson compile
meson dist --allow-dirty
set +ex
env:
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}
linux:
timeout-minutes: 60
strategy:
matrix:
image:
- ubuntu:rolling
- debian:bookworm
- fedora:latest
cc:
- clang
- gcc
include:
- cc: clang
cxx: clang++
- cc: gcc
cxx: g++
runs-on: ubuntu-latest
container:
image: ${{ matrix.image }}
steps:
- name: Install ubuntu dependencies
if: startsWith(matrix.image, 'ubuntu') || startsWith(matrix.image, 'debian')
run: |
set -ex
apt-get --yes --force-yes update
apt-get --yes --force-yes install gcc clang pkg-config git curl libplplot-dev libgtkmm-4.0-dev doxygen graphviz meson ninja-build
set +ex
env:
DEBIAN_FRONTEND: noninteractive
- name: Install RHEL dependencies
if: startsWith(matrix.image, 'rockylinux') || startsWith(matrix.image, 'fedora')
run: |
set -ex
yum clean all -y
yum install -y make gcc-gfortran gcc clang gcc-c++ pkgconfig git gtkmm4.0-devel plplot-devel doxygen graphviz meson ninja-build
set +ex
# checkout needs to happen later, as git needs to be installed to ensure a clone happens
- uses: actions/checkout@v4
# Add checkout directory as safe.directory and avoid git list issue
- name: Set permissions
run: |
set -ex
git config --global --add safe.directory /__w/gtkmm-plplot/gtkmm-plplot
set +ex
- name: Build and test with meson
run: |
set -ex
export PATH=${HOME}/.local/bin:${PATH}
meson setup --buildtype=debugoptimized -Dbuild-documentation=enabled builddir && cd builddir
meson compile
meson dist
set +ex
env:
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}