From beec0d158206920afeefa60de87e473eaec609a6 Mon Sep 17 00:00:00 2001 From: Frank Dana Date: Mon, 14 Dec 2020 04:02:28 -0500 Subject: [PATCH] CI: Switch to Github Actions (#108) --- .github/workflows/ci.yml | 55 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 41 ------------------------------ 2 files changed, 55 insertions(+), 41 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..80cd87f --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7da2b19..0000000 --- a/.travis.yml +++ /dev/null @@ -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"