Skip to content

Commit

Permalink
Added GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
cboulay committed Aug 11, 2020
1 parent 3091ba9 commit fc72c25
Show file tree
Hide file tree
Showing 4 changed files with 117 additions and 11 deletions.
13 changes: 7 additions & 6 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
version: 1.13.0.{build}
version: 1.13.1.{build}
pull_requests:
do_not_increment_build_number: true
shallow_clone: true
environment:
lsltag: 1.13.0
lslversion: 1.13.0
lsltag: 1.13.1
lslversion: 1.13.1
LSLDIST_URL: "https://github.com/sccn/liblsl/releases/download"
CMakeArgs: ""
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
QTCOMPILER: msvc2017_64
QTVER: 5.13
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu1804
DEPLOYNAME: Linux64-bionic
QTVER: 5.13.2
# - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu1804 # Now handled by GitHub Actions
# DEPLOYNAME: Linux64-bionic
install:
- cmd: appveyor DownloadFile %LSLDIST_URL%/%lsltag%/liblsl-%lslversion%-Win64.zip -FileName liblsl_x64.zip
- cmd: 7z x liblsl_x64.zip -oLSL
Expand All @@ -27,6 +27,7 @@ artifacts:
- path: 'build/*.deb'
- path: 'build/*.tar.*'
- path: 'build/*.7z'
- path: 'build/*.zip'
deploy:
provider: GitHub
auth_token:
Expand Down
105 changes: 105 additions & 0 deletions .github/workflows/cppcmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: C/C++ CI

on:
push:
tags:
- v*.*
pull_request:
branches:
- master

env:
LSL_URL: 'https://github.com/sccn/liblsl/releases/download'
LSL_RELEASE_PREFIX: ''
LSL_RELEASE: '1.13.1'


jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macOS-latest
fail-fast: false

steps:
- uses: actions/checkout@v2

- name: CMake version
run: cmake --version

- name: Install Qt (Windows)
if: matrix.os == 'windows-latest'
uses: jurplel/install-qt-action@v2
with:
version: 5.14.0

- name: Get liblsl (Windows)
if: matrix.os == 'windows-latest'
run: |
Invoke-WebRequest -Uri $Env:LSL_URL/$Env:LSL_RELEASE_PREFIX$Env:LSL_RELEASE/liblsl-$Env:LSL_RELEASE-Win64.zip -o liblsl.7z
7z x liblsl.7z -oLSL
- name: Get liblsl and Qt (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
echo ${{ github.ref }}
curl -L ${LSL_URL}/${LSL_RELEASE_PREFIX}${LSL_RELEASE}/liblsl-${LSL_RELEASE}-Linux64-bionic.deb -o liblsl.deb
sudo dpkg -i liblsl.deb
sudo apt install -y qtbase5-dev
- name: Get liblsl and Qt (macOS)
if: matrix.os == 'macOS-latest'
# curl -L ${LSL_URL}/${LSL_RELEASE_PREFIX}${LSL_RELEASE}/liblsl-${LSL_RELEASE}-MacOS10.13.tar.bz2 -o liblsl.tar.bz2
run: |
curl -L ${LSL_URL}/v1.14.0b3/liblsl-1.14.0-MacOS10.13.tar.bz2 -o liblsl.tar.bz2
mkdir LSL
tar -xvf liblsl.tar.bz2 -C LSL
brew install qt
echo '::set-env name=CMAKE_PREFIX_PATH::/usr/local/opt/qt'
- name: Configure CMake
shell: bash
run: |
cmake -S . -B build -DLSL_INSTALL_ROOT=$PWD/LSL/ -DCPACK_DEBIAN_PACKAGE_SHLIBDEPS=ON -DCPACK_DEBIAN_PACKAGE_DEPENDS=1
- name: Make & Install
run: cmake --build build --config Release -j --target install

- name: Package
run: cmake --build build --config Release -j --target package

- name: Upload Artifacts
uses: actions/upload-artifact@v2-preview
with:
name: pkg-${{ matrix.os }}
path: build/*.[dbz][ezi][b2p] # Hack to get deb, bz2, zip. Will also get e.g. de2, dep, dzb, dz2, dzp, etc...

release:
needs: build
runs-on: ubuntu-latest
steps:

- name: Download Artifacts
if: startsWith(github.ref, 'refs/tags/')
uses: actions/download-artifact@v2-preview
# By not specifying with: name:, it defaults to downloading all artifacts.

# Official GitHub Upload-Asset action does not allow for uploading multiple files.
# There are many community alternatives. Below is one that combines release and upload, with globbing.
# See also: svenstaro/upload-release-action shogo82148/actions-upload-release-asset meeDamian/github-release csexton/release-asset-action
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# tag_name: ${{ github.ref }} # ${{ github.ref }} is default
name: Release ${{ github.ref }}
draft: false
prerelease: false
# body_path: CHANGELOG.txt
files: pkg-*/*
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: cpp
compiler: clang
env:
LSL_VERSION="1.13.0"
APP_VERSION="1.13.1"
matrix:
include:
- os: osx
Expand All @@ -23,16 +23,16 @@ script:
- cmake --build build --config Release --target install
- cd build/install/Labrecorder
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then for app in *.app; do /usr/local/opt/qt/bin/macdeployqt
${app} -dmg; mv "${app%.app}.dmg" "${app%.app}-${LSL_VERSION}-${TRAVIS_OSX_IMAGE}.dmg";
${app} -dmg; mv "${app%.app}.dmg" "${app%.app}-${APP_VERSION}-${TRAVIS_OSX_IMAGE}.dmg";
done; fi
deploy:
provider: releases
skip_cleanup: true
api_key:
secure: FQ+xqPuImk2ie4KeoDrP1u+6TB2qIoLPTk0wr7EEv+7oBfLodExVSyC67TEUVKUVnAYv2E1FFfHLZPUzMeiuFT6o40jkwekHEte3dbgWTgmW9iqiDw4eK5X0obZbDoYLJBbOiQfUsgH8nKpE/U5MprTpQ3KKQr2CjbcqGZnDY6k2yNope70bMe//4zBgv+qjvR1CDeI8sSrSUkBgDgVhujqNzS8I0FPoLAmJuBuFiA5Y7f/uwO17M1Nfso9WnNiWA8XhgJ1mgoA8BYrIx9hP2niK4gkFJ3p/iV0IK51KNxEELIQ7IKw/U12CLYD7+hKFBpyrZGcgCwXCHXR/G3/kNsxJrk395u+78gTLdiE3AuksWQZ+f+6br2pBG3UBTu/Qm3cVcVQRtNArKXDgiCaMc0qECL51o6qNTzPhLAHvGVGZCOjp34vW44MMWtKh584LqShojN/DH1OBUR3PjaHHiuxQMuaUXHto8SDfl0ZRSaeyElI+6kmU3XfTJfqFq2DpTX5LMYoiZUXwMKKQtWTGp8I2axL1LCnUsX/nlY63AoCY7CJTwX+DE1//YBwOsfafQ/VOMIpzQCXJNuHR3EAFVk+qcFt0wTVu/aa2oTkBaGN67LE22/pkwT4kxpI3kaXDo94CE0diEZWu4hHHNoQF1C/WuH/DH4HErJW8tPGrEm8=
file:
- LabRecorder-${LSL_VERSION}-${TRAVIS_OSX_IMAGE}.dmg
- LabRecorderCLI-${LSL_VERSION}-${TRAVIS_OSX_IMAGE}.dmg
- LabRecorder-${APP_VERSION}-${TRAVIS_OSX_IMAGE}.dmg
- LabRecorderCLI-${APP_VERSION}-${TRAVIS_OSX_IMAGE}.dmg
on:
repo: labstreaminglayer/App-LabRecorder
tags: true
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.5)

project(LabRecorder
LANGUAGES CXX
VERSION 1.13.0)
VERSION 1.13.1)

find_package(LSL REQUIRED
HINTS ${LSL_INSTALL_ROOT}
Expand Down

0 comments on commit fc72c25

Please sign in to comment.