Skip to content

Commit f26070e

Browse files
committedAug 27, 2021
Switch from Travis-CI to Github Actions
1 parent fd4c5dd commit f26070e

File tree

5 files changed

+70
-34
lines changed

5 files changed

+70
-34
lines changed
 

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

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: build
2+
3+
# build on c/cpp changes or workflow changes
4+
on:
5+
push:
6+
paths:
7+
- '**.[ch]'
8+
- '**.cpp'
9+
- '**/CMakeLists.txt'
10+
- '.github/workflows/**.yml'
11+
pull_request:
12+
paths:
13+
- '**.[ch]'
14+
- '**.cpp'
15+
- '**/CMakeLists.txt'
16+
- '.github/workflows/**.yml'
17+
18+
jobs:
19+
gcc:
20+
runs-on: ubuntu-20.04
21+
steps:
22+
- uses: actions/checkout@v2
23+
- name: Install deps
24+
run: |
25+
source util/ci/script.sh
26+
install_linux_deps
27+
28+
- name: Build
29+
run: |
30+
source util/ci/script.sh
31+
run_build
32+
env:
33+
CC: gcc
34+
CXX: g++
35+
36+
clang:
37+
runs-on: ubuntu-20.04
38+
steps:
39+
- uses: actions/checkout@v2
40+
- name: Install deps
41+
run: |
42+
source util/ci/script.sh
43+
install_linux_deps
44+
45+
- name: Build
46+
run: |
47+
source util/ci/script.sh
48+
run_build
49+
env:
50+
CC: clang
51+
CXX: clang++

Diff for: ‎.travis.yml

-22
This file was deleted.

Diff for: ‎README.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Minetest Mapper C++
22
===================
33

4-
.. image:: https://travis-ci.org/minetest/minetestmapper.svg?branch=master
5-
:target: https://travis-ci.org/minetest/minetestmapper
4+
.. image:: https://github.com/minetest/minetestmapper/workflows/build/badge.svg
5+
:target: https://github.com/minetest/minetestmapper/actions/workflows/build.yml
66

77
Minetestmapper generates an overview image from a Minetest map.
88

9-
A port of minetestmapper.py to C++ from https://github.com/minetest/minetest/tree/master/util.
10-
This version is both faster and provides more features than the now deprecated Python script.
9+
A port of minetestmapper.py to C++ from https://github.com/minetest/minetest/tree/0.4.17/util.
10+
This version is both faster and provides more features than the now obsolete Python script.
1111

1212
Requirements
1313
------------

Diff for: ‎util/ci/script.sh

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash -e
2+
3+
install_linux_deps() {
4+
local pkgs=(cmake libgd-dev libsqlite3-dev libleveldb-dev libpq-dev libhiredis-dev)
5+
6+
sudo apt-get update
7+
sudo apt-get install -y --no-install-recommends ${pkgs[@]} "$@"
8+
}
9+
10+
run_build() {
11+
cmake . -DCMAKE_BUILD_TYPE=Debug \
12+
-DENABLE_LEVELDB=1 -DENABLE_POSTGRESQL=1 -DENABLE_REDIS=1
13+
14+
make -j2
15+
}

Diff for: ‎util/travis/script.sh

-8
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.