Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 35 additions & 42 deletions .github/workflows/cppcmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ on:
env:
APP_NAME: 'AudioCapture'
LSL_URL: 'https://github.com/sccn/liblsl/releases/download'
LSL_RELEASE: '1.13.0'
LSL_RELEASE_SUFFIX: ''
LSL_RELEASE_PREFIX: 'v'
LSL_RELEASE: '1.14.0'
LSL_RELEASE_SUFFIX: 'b1'


jobs:
Expand All @@ -36,24 +37,25 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: |
echo ${{ github.ref }}
curl -L ${LSL_URL}/${LSL_RELEASE}${LSL_RELEASE_SUFFIX}/liblsl-${LSL_RELEASE}-Linux64-bionic.deb -o liblsl.deb
curl -L ${LSL_URL}/${LSL_RELEASE_PREFIX}${LSL_RELEASE}${LSL_RELEASE_SUFFIX}/liblsl-${LSL_RELEASE}-Linux64-bionic.deb -o liblsl.deb
sudo dpkg -i liblsl.deb
sudo apt install -y qtbase5-dev qtmultimedia5-dev

- name: download liblsl (Windows)
if: matrix.os == 'windows-latest'
run: |
Invoke-WebRequest -Uri $Env:LSL_URL/$Env:LSL_RELEASE$Env:LSL_RELEASE_SUFFIX/liblsl-$Env:LSL_RELEASE-Win64.zip -o liblsl.7z
Invoke-WebRequest -Uri $Env:LSL_URL/$Env:LSL_RELEASE_PREFIX$Env:LSL_RELEASE$Env:LSL_RELEASE_SUFFIX/liblsl-$Env:LSL_RELEASE-Win64.zip -o liblsl.7z
7z x liblsl.7z -oLSL

- name: download liblsl (macOS)
if: matrix.os == 'macOS-latest'
run: |
curl -L ${LSL_URL}/${LSL_RELEASE}${LSL_RELEASE_SUFFIX}/liblsl-${LSL_RELEASE}-OSX64.tar.bz2 -o liblsl.tar.bz2
curl -L ${LSL_URL}/${LSL_RELEASE_PREFIX}${LSL_RELEASE}${LSL_RELEASE_SUFFIX}/liblsl-${LSL_RELEASE}-OSX64.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'
# TODO: Need to fix liblsl CI

- name: Install Qt
if: matrix.os == 'windows-latest'
Expand All @@ -73,40 +75,31 @@ jobs:
- name: Install
run: cmake --build build --config Release -j --target install

- name: Package (ubuntu) # TODO: Should work on Windows too?
if: matrix.os == 'ubuntu-latest'
- name: Package
run: cmake --build build --config Release -j --target package

- name: Package (macOS)
if: matrix.os == 'macOS-latest'
run: |
cd build
for app in *.app; do
/usr/local/opt/qt/bin/macdeployqt ${app} -dmg
mv "${app%.app}.dmg" "${app%.app}-${LSL_RELEASE}-MacOS64.dmg"
done

# TODO: Build artifact paths from variables
- name: Upload Artifacts (ubuntu)
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@master
with:
name: pkg-${{ matrix.os }}
path: build/AudioCapture-0.1-Linux64-bionic.deb # TODO: Build path from variables
path: build/AudioCapture-0.1-Linux64-bionic.deb

- name: Upload Artifacts (macOS)
if: matrix.os == 'macOS-latest'
uses: actions/upload-artifact@master
with:
name: pkg-${{ matrix.os }}
path: build/AudioCapture-1.13.0-MacOS64.dmg # TODO: Build path from variables
path: build/AudioCapture-0.1-OSX64.tar.bz2

#- name: Upload Artifacts (windows)
# if: matrix.os == 'windows-latest'
# uses: actions/upload-artifact@master
# with:
# name: pkg-${{ matrix.os }}
# path: build/*.7z # TODO: Build path from variables
- name: Upload Artifacts (windows)
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@master
with:
name: pkg-${{ matrix.os }}
path: build/AudioCapture-0.1-Win64.zip

release:
needs: build
runs-on: ubuntu-latest
Expand All @@ -129,11 +122,11 @@ jobs:
with:
name: pkg-ubuntu-latest

#- name: Download Artifact (windows)
# if: startsWith(github.ref, 'refs/tags/')
# uses: actions/download-artifact@v1
# with:
# name: pkg-windows-latest
- name: Download Artifact (windows)
if: startsWith(github.ref, 'refs/tags/')
uses: actions/download-artifact@v1
with:
name: pkg-windows-latest

- name: Download Artifact (macOS)
if: startsWith(github.ref, 'refs/tags/')
Expand All @@ -159,17 +152,17 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: pkg-macOS-latest/AudioCapture-1.13.0-MacOS64.dmg
asset_name: AudioCapture-1.13.0-MacOS64.dmg
asset_path: pkg-macOS-latest/AudioCapture-0.1-OSX64.tar.bz2
asset_name: AudioCapture-0.1-OSX64.tar.bz2
asset_content_type: application/octet-stream

#- name: Upload Release Asset (windows)
# if: startsWith(github.ref, 'refs/tags/')
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: pkg-windows-latest/*.7z
# asset_name: *.7z
# asset_content_type: application/x-7z-compressed
- name: Upload Release Asset (windows)
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: pkg-windows-latest/AudioCapture-0.1-Win64.zip
asset_name: AudioCapture-0.1-Win64.zip
asset_content_type: application/x-7z-compressed