-
Notifications
You must be signed in to change notification settings - Fork 928
138 lines (130 loc) · 4.25 KB
/
ci.yaml
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
name: CI Pipeline
on: [push, pull_request]
jobs:
build-linux:
strategy:
matrix:
cxx_std: [c++11, c++14, c++17, c++20]
runs-on: ubuntu-22.04
env:
CXX_STD: ${{ matrix.cxx_std }}
steps:
# Set default compiler toolchain version to latest available versions for Ubuntu 22.04 as of 2023-11-27
- name: Set default compiler toolchain versions
run: |
sudo update-alternatives --force --install /usr/bin/gcc gcc /usr/bin/gcc-12 1200 --slave /usr/bin/g++ g++ /usr/bin/g++-12
sudo update-alternatives --remove-all clang
sudo update-alternatives --remove-all clang++
sudo update-alternatives --remove-all clang-format
sudo update-alternatives --remove-all clang-tidy
sudo update-alternatives --force --install /usr/bin/clang clang /usr/bin/clang-15 1500 --slave /usr/bin/clang++ clang++ /usr/bin/clang++-15 --slave /usr/bin/clang-format clang-format /usr/bin/clang-format-15 --slave /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-15
- uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install libwebkit2gtk-4.0-dev xvfb -y
- name: Build and run tests
run: xvfb-run ./script/build.sh
build-macos:
strategy:
matrix:
cxx_std: [c++11, c++14, c++17, c++20]
runs-on: macos-latest
env:
CXX_STD: ${{ matrix.cxx_std }}
steps:
- uses: actions/checkout@v4
- name: Build and run tests
run: ./script/build.sh
build-windows-msvc:
strategy:
matrix:
cxx_std: [c++14, c++17, c++20]
arch: [x64, x86]
runs-on: windows-latest
env:
CXX_STD: ${{ matrix.cxx_std }}
TARGET_ARCH: ${{ matrix.arch }}
steps:
- uses: actions/checkout@v4
- name: Build and run tests
run: ./script/build.bat info clean format deps check build test
shell: cmd
build-windows-msys2:
strategy:
matrix:
cxx_std: [c++14, c++17, c++20]
include:
- { sys: mingw64, cc: gcc , cxx: g++ }
- { sys: clang64, cc: clang, cxx: clang++ }
runs-on: windows-latest
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
CXX_STD: ${{ matrix.cxx_std }}
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
update: true
pacboy: toolchain:p
- name: Build and run tests
run: ./script/build.sh info clean deps build test
build-cross-windows-on-linux:
strategy:
matrix:
cxx_std: [c++14, c++17]
image: [ubuntu-20.04, ubuntu-22.04]
include:
- cxx_std: c++20
image: ubuntu-22.04
runs-on: ${{ matrix.image }}
env:
TARGET_OS: windows
CC: x86_64-w64-mingw32-gcc-posix
CXX: x86_64-w64-mingw32-g++-posix
CXX_STD: ${{ matrix.cxx_std }}
PATCH_MSWEBVIEW2: 1
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install mingw-w64 -y
- name: Build
run: ./script/build.sh info clean deps build
swig:
runs-on: ubuntu-latest
strategy:
matrix:
language: [csharp, java, python, ruby]
steps:
- uses: actions/checkout@v4
- name: Generate bindings with SWIG
run: |
mkdir -p "build/bindings/${{ matrix.language }}" \
&& swig -Wall -Werror -c++ "-${{ matrix.language }}" \
-outdir "build/bindings/${{ matrix.language }}" \
-o build/bindings/${{ matrix.language }}/${{ matrix.language }}_wrap.cpp \
webview.i
clang-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run clang-format
uses: DoozyX/clang-format-lint-action@v0.16
with:
source: '.'
exclude: './build'
extensions: 'h,cc'
clangFormatVersion: 9
style: file
doxygen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Doxygen
run: sudo apt-get update && sudo apt-get install doxygen -y
- run: mkdir -p build/docs
- name: Run Doxygen
run: doxygen