Skip to content

Commit 7e3c36a

Browse files
committed
ci: use cmake and ctest for C++ testing in GitHub Actions
- Install cmake and ninja-build packages in apt setup step - Remove obsolete Ubuntu 18.04 (bionic) repository - Replace legacy make command with cmake, ninja, and ctest - Switch workflow trigger branch and README badge from master to main
1 parent ce0fede commit 7e3c36a

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: libais CI
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [ main ]
66
pull_request:
7-
branches: [ master ]
7+
branches: [ main ]
88

99
# Allows you to run this workflow manually from the Actions tab
1010
workflow_dispatch:
@@ -26,8 +26,8 @@ jobs:
2626
steps:
2727
- name: Add required sources and pkgs
2828
run: |
29-
sudo add-apt-repository --update --yes 'deb http://archive.ubuntu.com/ubuntu/ bionic main universe'
30-
sudo apt-get install gcc g++
29+
sudo apt-get update
30+
sudo apt-get install --yes gcc g++ cmake ninja-build
3131
3232
- name: Checkout repo
3333
uses: actions/checkout@v2
@@ -49,5 +49,5 @@ jobs:
4949

5050
- name: Script
5151
run: |
52-
(cd src && CC=gcc CXX=g++ make -f Makefile-custom -j 4 test)
52+
cmake -G Ninja -B build -S . -DENABLE_ASAN=ON && ninja -C build && ctest --test-dir build --output-on-failure
5353
py.test ais test --cov=ais --cov-report term-missing

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Introduction
33
============
44

5-
.. image:: https://travis-ci.org/schwehr/libais.svg?branch=master
5+
.. image:: https://travis-ci.org/schwehr/libais.svg?branch=main
66
:target: https://travis-ci.org/schwehr/libais
77

88
.. image:: https://scan.coverity.com/projects/5519/badge.svg

0 commit comments

Comments
 (0)