Skip to content

Commit

Permalink
move CI to github actions (#42)
Browse files Browse the repository at this point in the history
* move to github CI

* bump test version to C++14 for googletest

* update badge for github actions
  • Loading branch information
nmwsharp authored Feb 7, 2024
1 parent c0287ef commit 40759ab
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 45 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: linux

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')"
steps:
- uses: actions/checkout@v1
with:
submodules: true

- name: configure
run: cd test && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug ..

- name: build
run: cd test/build && make

- name: run test
run: cd test/build && ./bin/ply-test
25 changes: 25 additions & 0 deletions .github/workflows/macOS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: macOS

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: macos-latest
if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')"
steps:
- uses: actions/checkout@v1
with:
submodules: true

- name: configure
run: cd test && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug ..

- name: build
run: cd test/build && make

- name: run test
run: cd test/build && ./bin/ply-test
25 changes: 25 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: windows

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: windows-latest
if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')"
steps:
- uses: actions/checkout@v1
with:
submodules: true

- name: configure
run: cd test && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug ..

- name: build
run: cd test/build && cmake --build "."

- name: run test
run: cd test/build && ./bin/Debug/ply-test.exe
42 changes: 0 additions & 42 deletions .travis.yml

This file was deleted.

5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# hapPLY
![](https://travis-ci.com/nmwsharp/happly.svg?branch=master)

[![actions status linux](https://github.com/nmwsharp/happly/workflows/linux/badge.svg)](https://github.com/nmwsharp/happly/actions)
[![actions status macOS](https://github.com/nmwsharp/happly/workflows/macOS/badge.svg)](https://github.com/nmwsharp/happly/actions)
[![actions status windows](https://github.com/nmwsharp/happly/workflows/windows/badge.svg)](https://github.com/nmwsharp/happly/actions)

<p align="center">
<img src="https://github.com/nmwsharp/happly/blob/master/happly_logo.jpg" width="200">
Expand Down
4 changes: 2 additions & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
# using Clang (linux or apple) or GCC
message("Using clang/gcc compiler flags")
SET(BASE_CXX_FLAGS "-std=c++11 -Wall -Wextra -Werror -g3")
SET(BASE_CXX_FLAGS "-std=c++14 -Wall -Wextra -Werror -g3")
SET(DISABLED_WARNINGS " -Wno-unused-parameter -Wno-unused-variable -Wno-unused-private-field -Wno-unused-function -Wno-deprecated-declarations")
SET(TRACE_INCLUDES " -H -Wno-error=unused-command-line-argument")

Expand Down Expand Up @@ -75,7 +75,7 @@ add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/googletest-src
${CMAKE_CURRENT_BINARY_DIR}/googletest-build
EXCLUDE_FROM_ALL)

set_property(TARGET gtest PROPERTY CXX_STANDARD 11)
set_property(TARGET gtest PROPERTY CXX_STANDARD 14)


# Test executable
Expand Down

0 comments on commit 40759ab

Please sign in to comment.