Skip to content

Commit

Permalink
Merge pull request #87 from fallahn/github-actions
Browse files Browse the repository at this point in the history
Move CI to github actions
  • Loading branch information
fallahn authored Apr 2, 2021
2 parents ff49fd9 + 713d285 commit 59fd4d9
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 60 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: CMake

on: [push, pull_request]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
name: ${{ matrix.platform.name }} ${{ matrix.config.name }}
runs-on: ${{ matrix.platform.os }}

strategy:
fail-fast: false
matrix:
platform:
- { name: Windows VS2019, os: windows-latest }
- { name: Linux GCC, os: ubuntu-latest }
- { name: Linux Clang, os: ubuntu-latest, flags: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ }
- { name: MacOS XCode, os: macos-latest }
config:
- { name: Shared, flags: -DTMXLITE_STATIC_LIB=TRUE }
- { name: Static, flags: -DTMXLITE_STATIC_LIB=FALSE }

steps:
- uses: actions/checkout@v2

- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{github.workspace}}/build

- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
working-directory: ${{github.workspace}}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: cmake $GITHUB_WORKSPACE/tmxlite -DCMAKE_BUILD_TYPE=$BUILD_TYPE


#linux requires sudo to install, Windows obviously has no idea what that is
#macOS, for once, doesn't seem to care either way.
- name: Build Linux
working-directory: ${{github.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
if: runner.os == 'Linux'
run: sudo cmake --build . --config $BUILD_TYPE --target install

- name: Build Other
working-directory: ${{github.workspace}}/build
shell: bash
if: runner.os != 'Linux'
run: cmake --build . --config $BUILD_TYPE --target install
43 changes: 0 additions & 43 deletions .travis.yml

This file was deleted.

15 changes: 0 additions & 15 deletions appveyor.yml

This file was deleted.

3 changes: 1 addition & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
tmxlite
-------

[![Build Status](https://img.shields.io/travis/fallahn/tmxlite.svg?branch=master&label=*nix)](https://travis-ci.org/fallahn/tmxlite)
[![Build status](https://ci.appveyor.com/api/projects/status/qhhh1geu47uoi2lj/branch/master?svg=true)](https://ci.appveyor.com/project/fallahn/tmxlite/branch/master)
[![Github Actions](https://github.com/fallahn/tmxlite/actions/workflows/cmake.yml/badge.svg)](https://github.com/fallahn/tmxlite/actions)

#### Description
A lightweight C++14 parsing library for tmx map files created with the Tiled map editor. Requires no external linking, all dependencies are included. Fully supports tmx maps up to 1.0 (see [here](https://doc.mapeditor.org/en/stable/reference/tmx-changelog/#tiled-1-0)) with CSV, zlib and base64 compression. Also supports some features of newer map versions (see below). The parser is renderer agnostic, and is cross platform on Windows, linux and OS X. It has also been successfully built for Android too.
Expand Down

0 comments on commit 59fd4d9

Please sign in to comment.