Skip to content

Commit

Permalink
Switch from Travis-CI to Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Aug 27, 2021
1 parent fd4c5dd commit f26070e
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 34 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/build.yml
@@ -0,0 +1,51 @@
name: build

# build on c/cpp changes or workflow changes
on:
push:
paths:
- '**.[ch]'
- '**.cpp'
- '**/CMakeLists.txt'
- '.github/workflows/**.yml'
pull_request:
paths:
- '**.[ch]'
- '**.cpp'
- '**/CMakeLists.txt'
- '.github/workflows/**.yml'

jobs:
gcc:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install deps
run: |
source util/ci/script.sh
install_linux_deps
- name: Build
run: |
source util/ci/script.sh
run_build
env:
CC: gcc
CXX: g++

clang:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install deps
run: |
source util/ci/script.sh
install_linux_deps
- name: Build
run: |
source util/ci/script.sh
run_build
env:
CC: clang
CXX: clang++
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

8 changes: 4 additions & 4 deletions README.rst
@@ -1,13 +1,13 @@
Minetest Mapper C++
===================

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

Minetestmapper generates an overview image from a Minetest map.

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

Requirements
------------
Expand Down
15 changes: 15 additions & 0 deletions util/ci/script.sh
@@ -0,0 +1,15 @@
#!/bin/bash -e

install_linux_deps() {
local pkgs=(cmake libgd-dev libsqlite3-dev libleveldb-dev libpq-dev libhiredis-dev)

sudo apt-get update
sudo apt-get install -y --no-install-recommends ${pkgs[@]} "$@"
}

run_build() {
cmake . -DCMAKE_BUILD_TYPE=Debug \
-DENABLE_LEVELDB=1 -DENABLE_POSTGRESQL=1 -DENABLE_REDIS=1

make -j2
}
8 changes: 0 additions & 8 deletions util/travis/script.sh

This file was deleted.

0 comments on commit f26070e

Please sign in to comment.