-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
117 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-*/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters