Skip to content

Commit

Permalink
Set up GitHub actions instead of Travis CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jmc-88 committed Dec 6, 2023
1 parent c13be91 commit 96bf631
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 80 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/build-test-cmake-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build and test with CMake on Linux

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

env:
BUILD_TYPE: Debug

jobs:
setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install prerequisites
run: |
sudo apt update -qq
sudo apt install -y libcairo2-dev libpango1.0-dev libglib2.0-dev libimlib2-dev libxinerama-dev libx11-dev libxdamage-dev libxcomposite-dev libxrender-dev libxrandr-dev libxsettings-client-dev libxsettings-dev librsvg2-dev libstartup-notification0-dev libcurl4-openssl-dev binutils xvfb xauth lcov curl pandoc
pip install --user cpp-coveralls
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCOVERALLS=ON

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}}

- name: Install
run: cmake --install ${{github.workspace}}/build

- name: Coveralls
run: |
coveralls \
--root ${{github.workspace}}/build \
--build-root ${{github.workspace}}/build \
--exclude build/abseil-cpp \
--exclude build/generated \
--exclude build/CMakeFiles \
--exclude abseil-cpp \
--exclude external_includes \
--exclude test \
--exclude-pattern '.*_test\.cc$' \
--exclude-lines-pattern '.*_test\.cc$' \
--gcov-options '\-lp'
79 changes: 0 additions & 79 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![build Status](https://travis-ci.org/jmc-88/tint3.svg?branch=master)](https://travis-ci.org/jmc-88/tint3)
[![Build and test with CMake on Linux](https://github.com/jmc-88/tint3/actions/workflows/build-test-cmake-linux.yml/badge.svg)](https://github.com/jmc-88/tint3/actions/workflows/build-test-cmake-linux.yml)
[![CodeFactor](https://www.codefactor.io/repository/github/jmc-88/tint3/badge)](https://www.codefactor.io/repository/github/jmc-88/tint3)
[![coverage status](https://coveralls.io/repos/github/jmc-88/tint3/badge.svg?branch=master)](https://coveralls.io/github/jmc-88/tint3?branch=master)
[![GitHub release](https://img.shields.io/github/release/jmc-88/tint3.svg)](https://github.com/jmc-88/tint3/releases)
Expand Down

0 comments on commit 96bf631

Please sign in to comment.