Add a simple Github Actions workflow build script

This commit is contained in:
Sébastien Rombauts 2019-12-27 11:46:27 +01:00
parent 3c60b8ce3c
commit 8e0bd6b3fe
3 changed files with 61 additions and 0 deletions

59
.github/workflows/actions.yml vendored Normal file
View File

@ -0,0 +1,59 @@
name: build
on: [push]
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Windows Latest MSVC",
os: windows-latest,
build_type: "Debug", cc: "cl", cxx: "cl",
}
# TODO: this is not working, since CMake is using generator for latest Visual Studio
#- {
# name: "Windows Latest MinGW",
# os: windows-latest,
# build_type: "Debug", cc: "gcc", cxx: "g++"
# }
- {
name: "Ubuntu Latest GCC",
os: ubuntu-latest,
build_type: "Debug", cc: "gcc", cxx: "g++"
}
- {
name: "Ubuntu 16.04 GCC",
os: ubuntu-16.04,
build_type: "Debug", cc: "gcc", cxx: "g++"
}
- {
name: "macOS Latest Clang",
os: macos-latest,
build_type: "Debug", cc: "clang", cxx: "clang++"
}
steps:
- uses: actions/checkout@v1
- name: submodule
run: git submodule update --init --recursive
- name: configure
shell: cmake -P {0}
run: |
set(ENV{CC} ${{matrix.config.cc}})
set(ENV{CXX} ${{matrix.config.cxx}})
- name: generate
run: |
mkdir build
cd build
cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} -DSQLITECPP_BUILD_EXAMPLES=ON -DSQLITECPP_BUILD_TESTS=ON -DSQLITECPP_RUN_CPPCHECK=OFF -DSQLITECPP_RUN_CPPLINT=OFF ..
- name: build
run: cmake --build build --config ${{matrix.config.build_type}}
- name: test
run: |
cd build
ctest --verbose --output-on-failure

View File

@ -147,6 +147,7 @@ source_group(doc FILES ${SQLITECPP_DOC})
# list of script files of the library
set(SQLITECPP_SCRIPT
.github/workflows/actions.yml
.travis.yml
appveyor.yml
build.bat

View File

@ -5,6 +5,7 @@ SQLiteC++
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/SRombauts/SQLiteCpp/blob/master/LICENSE.txt)
[![Travis CI Linux Build Status](https://travis-ci.org/SRombauts/SQLiteCpp.svg)](https://travis-ci.org/SRombauts/SQLiteCpp "Travis CI Linux Build Status")
[![AppVeyor Windows Build status](https://ci.appveyor.com/api/projects/status/github/SRombauts/SQLiteCpp?svg=true)](https://ci.appveyor.com/project/SbastienRombauts/SQLiteCpp "AppVeyor Windows Build status")
[![GitHub Actions Build status](https://github.com/SRombauts/SQLiteCpp/workflows/build/badge.svg)](https://github.com/SRombauts/SQLiteCpp/actions "GitHhub Actions Build status")
[![Coveralls](https://img.shields.io/coveralls/SRombauts/SQLiteCpp.svg)](https://coveralls.io/github/SRombauts/SQLiteCpp "Coveralls test coverage")
[![Coverity](https://img.shields.io/coverity/scan/14508.svg)](https://scan.coverity.com/projects/srombauts-sqlitecpp "Coverity Scan Build Status")
[![Join the chat at https://gitter.im/SRombauts/SQLiteCpp](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/SRombauts/SQLiteCpp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)