-
Notifications
You must be signed in to change notification settings - Fork 1
221 lines (209 loc) · 6.73 KB
/
build.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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
name: build
on: [push]
jobs:
build-linux:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v1
- name: prerequisites
run: |
sudo apt update --allow-unauthenticated --allow-insecure-repositories &&
sudo apt install libsword-common libsword-dev git cmake build-essential libreadline-dev libboost-dev libboost-filesystem-dev \
sqlite3 python3 python3-pexpect \
texlive-latex-recommended texlive-latex-extra texlive-science texlive-lang-european texlive-lang-german \
r-base-core pdf2svg highlight bison flex subversion
- name: prerequisites2
run: |
wget http://http.us.debian.org/debian/pool/main/s/sm/r-cran-sm_2.2-5.6-1+b2_amd64.deb &&
sudo dpkg -i r-cran-sm_2.2-5.6-1+b2_amd64.deb
- name: make-native
run: |
mkdir build
cd build
cmake ..
make
make install || true
- name: make-pbrst
run: |
cd statements
make
cd tests
./runme .
- name: make-native-pbrst
run: |
mkdir build-pbrst
cd build-pbrst
cmake -DPBRST=ON ..
make
make install || true
- name: prerequisites-qt
run: |
sudo apt install qt6-base-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools \
linguist-qt6 libgl1-mesa-dev freeglut3-dev libgraphviz-dev qt6-svg-dev
- name: make-qt
run: |
mkdir qt/build
cd qt/build
cmake ..
make
- name: make-qt-pbrst
run: |
mkdir qt/build-pbrst
cd qt/build-pbrst
cmake -DPBRST=ON ..
make
- name: install-emscripten
run: |
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install 2.0.22
./emsdk activate 2.0.22
- name: make-sword-wasm
run: |
. emsdk/emsdk_env.sh
git clone https://github.com/kovzol/crosswire-sword-mirror
cd crosswire-sword-mirror
mkdir build
cd build
emcmake cmake ..
emmake make sword_static
- name: make-wasm
run: |
. emsdk/emsdk_env.sh
yes | emmake make
- name: db-full
run: cd docs/common && make && make svgs && make statements.brst.html
- name: doc-hu
run: cd docs/hu && make || true # LaTeX seems to be broken on Ubuntu 22.04...
build-windows:
runs-on: windows-2019
defaults:
run:
shell: msys2 {0}
steps:
- name: Sparse checkout
shell: bash
run: |
REPO="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
BRANCH="${GITHUB_REF/#refs\/heads\//}"
echo "Syncing repository: $GITHUB_REPOSITORY"
echo "Working directory is '$(pwd)' GITHUB_WORKSPACE=$GITHUB_WORKSPACE BRANCH=$BRANCH"
git version
git init $GITHUB_WORKSPACE
git remote add origin https://github.com/$GITHUB_REPOSITORY
git config --local gc.auto 0
git config core.protectNTFS false
git -c protocol.version=2 fetch --no-tags --prune --progress --depth=10 origin +${GITHUB_SHA}:refs/remotes/origin/${BRANCH}
git sparse-checkout set --no-cone '/*' '!examples' '!docs'
git checkout --progress --force -B $BRANCH refs/remotes/origin/$BRANCH
- name: Install Prerequisites
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
base-devel
mingw-w64-x86_64-gcc
mingw-w64-x86_64-make
mingw-w64-x86_64-cmake
mingw-w64-x86_64-pkgconf
mingw-w64-x86_64-boost
mingw-w64-x86_64-clang
mingw-w64-x86_64-qt6-base
mingw-w64-x86_64-qt6-tools
mingw-w64-x86_64-qt6-translations
mingw-w64-x86_64-qt6-svg
mingw-w64-x86_64-readline
mingw-w64-x86_64-zlib
mingw-w64-x86_64-graphviz
- name: Build SWORD
run: |
wget https://www.crosswire.org/ftpmirror/pub/sword/source/v1.9/sword-1.9.0.tar.gz
mkdir orig
cd orig
tar xzf ../sword-1.9.0.tar.gz || true
patch -i ../sword-patch-mingw64.diff -p1
cp ../FindRegex.cmake sword-1.9.0/cmake # avoid use /usr/include on Wine/MSYS2
sed -i 's/2.6.0/3.5.0/' sword-1.9.0/CMakeLists.txt # eliminate some warnings and force newer cmake settings
cd sword-1.9.0
mkdir build
cd build
# Install SWORD in /mingw64 (which is usually C:/msys64/mingw64 on normal installations):
CC=clang CXX=clang++ cmake -DCMAKE_INSTALL_PREFIX=/mingw64 -DSWORD_LINK_LIBRARIES="-lcurl" -G "MinGW Makefiles" ..
mingw32-make install
- name: Build bibref
run: |
mkdir build
cd build
CC=clang CXX=clang++ cmake -G "MinGW Makefiles" ..
mingw32-make install || true
- name: Build bibref-pbrst
run: |
mkdir build-pbrst
cd build-pbrst
CC=clang CXX=clang++ cmake -DPBRST=ON -G "MinGW Makefiles" ..
mingw32-make
- name: Build bibref-qt
run: |
mkdir qt/build
cd qt/build
CC=clang CXX=clang++ cmake -G "MinGW Makefiles" ..
mingw32-make
- name: Build bibref-qt-pbrst
run: |
mkdir qt/build-pbrst
cd qt/build-pbrst
CC=clang CXX=clang++ cmake -DPBRST=ON -G "MinGW Makefiles" ..
mingw32-make
mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: prerequisites
run: brew install cmake boost
- name: Build SWORD
run: |
curl -O https://www.crosswire.org/ftpmirror/pub/sword/source/v1.9/sword-1.9.0.tar.gz
tar xzf sword-1.9.0.tar.gz
cd sword-1.9.0
./configure
make
sudo make install
- name: Build bibref
run: |
mkdir build
cd build
cmake ..
sudo make install
- name: prerequisites-pbrst
run: |
brew install bison m4
echo 'export PATH="/opt/homebrew/opt/bison/bin:$PATH"' >> /Users/runner/.bash_profile
echo 'export PATH="/opt/homebrew/opt/m4/bin:$PATH"' >> /Users/runner/.bash_profile
- name: Build bibref-pbrst
run: |
. /Users/runner/.bash_profile
mkdir build-pbrst
cd build-pbrst
cmake -DPBRST=ON ..
make
- name: prerequisites-qt
run: |
brew install qt graphviz
- name: Build bibref-qt
run: |
cd qt
mkdir build
cd build
. /Users/runner/.bash_profile
pkg-config libgvc --libs # Temporary info on GitHub's graphviz installation
cmake ..
make
- name: Build bibref-qt-pbrst
run: |
cd qt
mkdir build-pbrst
cd build-pbrst
. /Users/runner/.bash_profile
cmake -DPBRST=ON ..
make