CI: Switch to Github Actions (#108)

This commit is contained in:
Frank Dana
2020-12-14 04:02:28 -05:00
committed by GitHub
parent b243937e26
commit beec0d1582
2 changed files with 55 additions and 41 deletions

55
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,55 @@
name: CI Build
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2
if: ${{ runner.os == 'Windows' }}
with:
update: true
install: >-
mingw-w64-x86_64-toolchain
base-devel
- uses: haya14busa/action-cond@v1
id: generator
with:
cond: ${{ runner.os == 'Windows' }}
if_true: "MinGW Makefiles"
if_false: "Unix Makefiles"
- name: Install Linux dependencies
if: ${{ runner.os == 'Linux' }}
shell: bash
run: |
sudo apt update
sudo apt install cmake doxygen graphviz
sudo apt install libasound2-dev
- name: Build libopenshot-audio
run: |
mkdir build
pushd build
cmake -B . -S .. -G "${{ steps.generator.outputs.value }}" -DCMAKE_INSTALL_PREFIX:PATH="dist" -DCMAKE_BUILD_TYPE="Debug"
cmake --build . -- VERBOSE=1
popd
- name: Generate API documentation
if: ${{ runner.os == 'Linux' }}
shell: bash
run: |
pushd build
cmake --build . --target doc
popd
- name: Install libopenshot-audio
run: |
pushd build
cmake --build . --target install -- VERBOSE=1
popd

View File

@@ -1,41 +0,0 @@
language: cpp
jobs:
include:
- os: linux
dist: focal
name: "Ubuntu 20.04 Focal"
- os: osx
osx_image: xcode11.3
name: "Apple macOS (XCode 11.3)"
- os: linux
dist: bionic
name: "Ubuntu 18.04 Bionic"
- os: osx
name: "Apple macOS"
- os: linux
dist: xenial
name: "Ubuntu 16.04 Xenial"
addons:
apt:
packages:
- cmake
- libasound2-dev
- doxygen
- graphviz
script:
- mkdir -p build; cd build;
- cmake -DCMAKE_INSTALL_PREFIX:PATH="$TRAVIS_OS_NAME-x64" -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_CXX_FLAGS_DEBUG="-Wall -Wpedantic" ../
- make VERBOSE=1
- if [ $TRAVIS_OS_NAME = linux ]; then make doc; fi
- make install
notifications:
email: true
env:
global:
- TRAVIS_LIBOPENSHOT=TEST
- LANG="en_US.UTF-8"