forked from ShadowNinja/minetest-mapper-cpp
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch from Travis-CI to Github Actions
- Loading branch information
Showing
5 changed files
with
70 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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++ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |
This file was deleted.
Oops, something went wrong.