Skip to content

Commit 27a485a

Browse files
authoredApr 20, 2020
Replace travis with github actions (#9641)
* Move outside of travis to Github actions This will permit to have better integrated CI workflow than the previous travis one.
1 parent 338195f commit 27a485a

18 files changed

+296
-274
lines changed
 

Diff for: ‎.github/workflows/build.yml

+171
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
name: build
2+
3+
# build on c/cpp changes or workflow changes
4+
on:
5+
push:
6+
paths:
7+
- 'lib/**.[ch]'
8+
- 'lib/**.cpp'
9+
- 'src/**.[ch]'
10+
- 'src/**.cpp'
11+
- '**/CMakeLists.txt'
12+
- 'cmake/Modules/**'
13+
- 'util/buildbot/**'
14+
- 'util/ci/**'
15+
- '.github/workflows/**.yml'
16+
pull_request:
17+
paths:
18+
- 'lib/**.[ch]'
19+
- 'lib/**.cpp'
20+
- 'src/**.[ch]'
21+
- 'src/**.cpp'
22+
- '**/CMakeLists.txt'
23+
- 'cmake/Modules/**'
24+
- 'util/buildbot/**'
25+
- 'util/ci/**'
26+
- '.github/workflows/**.yml'
27+
28+
jobs:
29+
# This is our minor gcc compiler
30+
gcc_6:
31+
runs-on: ubuntu-18.04
32+
steps:
33+
- uses: actions/checkout@v2
34+
- name: Install compiler
35+
run: |
36+
sudo apt-get install g++-6 gcc-6 -qyy
37+
source ./util/ci/common.sh
38+
install_linux_deps
39+
40+
- name: Build
41+
run: |
42+
./util/ci/build.sh
43+
env:
44+
CMAKE_FLAGS: "-DCMAKE_C_COMPILER=gcc-6 -DCMAKE_CXX_COMPILER=g++-6"
45+
46+
- name: Test
47+
run: |
48+
./bin/minetest --run-unittests
49+
50+
# This is the current gcc compiler (available in bionic)
51+
gcc_8:
52+
runs-on: ubuntu-18.04
53+
steps:
54+
- uses: actions/checkout@v2
55+
- name: Install compiler
56+
run: |
57+
sudo apt-get install g++-8 gcc-8 -qyy
58+
source ./util/ci/common.sh
59+
install_linux_deps
60+
61+
- name: Build
62+
run: |
63+
./util/ci/build.sh
64+
env:
65+
CMAKE_FLAGS: "-DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8"
66+
67+
- name: Test
68+
run: |
69+
./bin/minetest --run-unittests
70+
71+
# This is our minor clang compiler
72+
clang_3_9:
73+
runs-on: ubuntu-18.04
74+
steps:
75+
- uses: actions/checkout@v2
76+
- name: Install compiler
77+
run: |
78+
sudo apt-get install clang-3.9 -qyy
79+
source ./util/ci/common.sh
80+
install_linux_deps
81+
82+
- name: Build
83+
run: |
84+
./util/ci/build.sh
85+
env:
86+
CMAKE_FLAGS: "-DCMAKE_C_COMPILER=clang-3.9 -DCMAKE_CXX_COMPILER=clang++-3.9"
87+
88+
- name: Test
89+
run: |
90+
./bin/minetest --run-unittests
91+
92+
# This is the current clang version
93+
clang_9:
94+
runs-on: ubuntu-18.04
95+
steps:
96+
- uses: actions/checkout@v2
97+
- name: Install compiler
98+
run: |
99+
sudo apt-get install clang-9 valgrind -qyy
100+
source ./util/ci/common.sh
101+
install_linux_deps
102+
env:
103+
WITH_LUAJIT: 1
104+
105+
- name: Build
106+
run: |
107+
./util/ci/build.sh
108+
env:
109+
CMAKE_FLAGS: "-DCMAKE_C_COMPILER=clang-9 -DCMAKE_CXX_COMPILER=clang++-9"
110+
111+
- name: Test
112+
run: |
113+
./bin/minetest --run-unittests
114+
115+
- name: Valgrind
116+
run: |
117+
valgrind --leak-check=full --leak-check-heuristics=all --undef-value-errors=no --error-exitcode=9 ./bin/minetest --run-unittests
118+
119+
120+
# Some builds doesn't require freetype, ensure it compiled properly
121+
clang_9_no_freetype:
122+
runs-on: ubuntu-18.04
123+
steps:
124+
- uses: actions/checkout@v2
125+
- name: Install compiler
126+
run: |
127+
sudo apt-get install clang-9 -qyy
128+
source ./util/ci/common.sh
129+
install_linux_deps
130+
131+
- name: Build
132+
run: |
133+
./util/ci/build.sh
134+
env:
135+
CMAKE_FLAGS: "-DCMAKE_C_COMPILER=clang-9 -DCMAKE_CXX_COMPILER=clang++-9 -DENABLE_FREETYPE=0"
136+
137+
- name: Test
138+
run: |
139+
./bin/minetest --run-unittests
140+
141+
win32:
142+
runs-on: ubuntu-18.04
143+
steps:
144+
- uses: actions/checkout@v2
145+
- name: Install compiler
146+
run: |
147+
wget http://minetest.kitsunemimi.pw/mingw-w64-i686_9.2.0_ubuntu18.04.tar.xz -O mingw.tar.xz
148+
sudo tar -xaf mingw.tar.xz -C /usr
149+
150+
- name: Build
151+
run: |
152+
EXISTING_MINETEST_DIR=$PWD ./util/buildbot/buildwin32.sh winbuild
153+
env:
154+
NO_MINETEST_GAME: 1
155+
NO_PACKAGE: 1
156+
157+
win64:
158+
runs-on: ubuntu-18.04
159+
steps:
160+
- uses: actions/checkout@v2
161+
- name: Install compiler
162+
run: |
163+
wget http://minetest.kitsunemimi.pw/mingw-w64-x86_64_9.2.0_ubuntu18.04.tar.xz -O mingw.tar.xz
164+
sudo tar -xaf mingw.tar.xz -C /usr
165+
166+
- name: Build
167+
run: |
168+
EXISTING_MINETEST_DIR=$PWD ./util/buildbot/buildwin64.sh winbuild
169+
env:
170+
NO_MINETEST_GAME: 1
171+
NO_PACKAGE: 1

Diff for: ‎.github/workflows/cpp_lint.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: cpp_lint
2+
3+
# lint on c/cpp changes or workflow changes
4+
on:
5+
push:
6+
paths:
7+
- 'lib/**.[ch]'
8+
- 'lib/**.cpp'
9+
- 'src/**.[ch]'
10+
- 'src/**.cpp'
11+
- '**/CMakeLists.txt'
12+
- 'cmake/Modules/**'
13+
- 'util/ci/**'
14+
- '.github/workflows/**.yml'
15+
pull_request:
16+
paths:
17+
- 'lib/**.[ch]'
18+
- 'lib/**.cpp'
19+
- 'src/**.[ch]'
20+
- 'src/**.cpp'
21+
- '**/CMakeLists.txt'
22+
- 'cmake/Modules/**'
23+
- 'util/ci/**'
24+
- '.github/workflows/**.yml'
25+
26+
jobs:
27+
clang_format:
28+
runs-on: ubuntu-18.04
29+
steps:
30+
- uses: actions/checkout@v2
31+
- name: Install clang-format
32+
run: |
33+
sudo apt-get install ${CLANG_FORMAT} -qyy
34+
env:
35+
CLANG_FORMAT: clang-format-9
36+
- name: Run clang-format
37+
run: |
38+
source ./util/ci/lint.sh
39+
perform_lint
40+
41+
clang_tidy:
42+
runs-on: ubuntu-18.04
43+
steps:
44+
- uses: actions/checkout@v2
45+
- name: Install clang-tidy
46+
run: |
47+
sudo apt-get install clang-tidy-9 -qyy
48+
source ./util/ci/common.sh
49+
install_linux_deps
50+
51+
- name: Run clang-tidy
52+
run: |
53+
./util/ci/clang-tidy.sh

Diff for: ‎.github/workflows/lua_lint.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: lua_lint
2+
3+
# Lint on lua changes on builtin or if workflow changed
4+
on:
5+
push:
6+
paths:
7+
- 'builtin/**.lua'
8+
- '.github/workflows/**.yml'
9+
pull_request:
10+
paths:
11+
- 'builtin/**.lua'
12+
- '.github/workflows/**.yml'
13+
14+
jobs:
15+
luacheck:
16+
runs-on: ubuntu-18.04
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Install luarocks
20+
run: |
21+
sudo apt-get update -qyy
22+
sudo apt-get install luarocks -qyy
23+
24+
- name: Install luarocks tools
25+
run: |
26+
luarocks install --local luacheck
27+
luarocks install --local busted
28+
29+
- name: Run checks
30+
run: |
31+
$HOME/.luarocks/bin/luacheck builtin
32+
$HOME/.luarocks/bin/busted builtin

Diff for: ‎.gitlab-ci.yml

-5
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ build:fedora-24:
219219
- apt-get update -y
220220
- apt-get install -y wget xz-utils unzip git cmake gettext
221221
- wget -q http://minetest.kitsunemimi.pw/mingw-w64-${WIN_ARCH}_9.2.0_ubuntu18.04.tar.xz -O mingw.tar.xz
222-
- sed -e "s|%PREFIX%|${WIN_ARCH}-w64-mingw32|" -e "s|%ROOTPATH%|/usr/${WIN_ARCH}-w64-mingw32|" < util/travis/toolchain_mingw.cmake.in > ${TOOLCHAIN_OUTPUT}
223222
- tar -xaf mingw.tar.xz -C /usr
224223

225224
.build_win_template:
@@ -256,7 +255,6 @@ build:win32:
256255
variables:
257256
NO_PACKAGE: "1"
258257
WIN_ARCH: "i686"
259-
TOOLCHAIN_OUTPUT: "util/buildbot/toolchain_mingw.cmake"
260258

261259
package:win32:
262260
extends: .package_win_template
@@ -265,7 +263,6 @@ package:win32:
265263
variables:
266264
NO_PACKAGE: "1"
267265
WIN_ARCH: "i686"
268-
TOOLCHAIN_OUTPUT: "util/buildbot/toolchain_mingw.cmake"
269266

270267
build:win64:
271268
extends: .build_win_template
@@ -274,7 +271,6 @@ build:win64:
274271
variables:
275272
NO_PACKAGE: "1"
276273
WIN_ARCH: "x86_64"
277-
TOOLCHAIN_OUTPUT: "util/buildbot/toolchain_mingw64.cmake"
278274

279275
package:win64:
280276
extends: .package_win_template
@@ -283,7 +279,6 @@ package:win64:
283279
variables:
284280
NO_PACKAGE: "1"
285281
WIN_ARCH: "x86_64"
286-
TOOLCHAIN_OUTPUT: "util/buildbot/toolchain_mingw64.cmake"
287282

288283
package:docker:
289284
stage: package

Diff for: ‎.travis.yml

-98
This file was deleted.

0 commit comments

Comments
 (0)