Skip to content

Commit 869887b

Browse files
committed
Update README and GH Actions script
1 parent 65f2db4 commit 869887b

File tree

3 files changed

+38
-60
lines changed

3 files changed

+38
-60
lines changed

.github/workflows/cppcmake.yml

Lines changed: 35 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: C/C++ CI
22

33
on:
4+
workflow_dispatch:
45
push:
56
tags:
67
- v*.*
@@ -9,54 +10,53 @@ on:
910
- master
1011

1112
env:
12-
LSL_URL: 'https://github.com/sccn/liblsl/releases/download'
13+
LSL_RELEASE_URL: 'https://github.com/sccn/liblsl/releases/download'
1314
LSL_RELEASE_PREFIX: 'v'
14-
LSL_RELEASE: '1.15.2'
15+
LSL_RELEASE: '1.16.1'
1516
LSL_RELEASE_SUFFIX: ''
1617

18+
defaults:
19+
run:
20+
shell: bash
21+
1722
jobs:
1823
build:
19-
runs-on: ${{ matrix.os }}
24+
name: ${{ matrix.config.name }}
25+
runs-on: ${{ matrix.config.os }}
2026
strategy:
2127
matrix:
22-
os:
23-
- ubuntu-20.04
24-
- windows-latest
25-
- macOS-latest
28+
config:
29+
- { name: "windows-x64", os: "windows-latest", qt_arch: "win64_msvc2019_64", arch: "amd64" }
30+
- { name: "macOS-latest", os: "macOS-latest" }
31+
- { name: "ubuntu-20.04", os: "ubuntu-20.04"}
32+
- { name: "ubuntu-22.04", os: "ubuntu-22.04"}
2633
fail-fast: false
2734

2835
steps:
29-
- uses: actions/checkout@v2
30-
31-
- name: Install Qt (Windows and MacOS)
32-
if: matrix.os == 'windows-latest' || matrix.os == 'macOS-latest'
33-
uses: jurplel/install-qt-action@v2
34-
with:
35-
version: 5.15.0
36+
- uses: actions/checkout@v3
3637

37-
- name: Get liblsl (Windows)
38-
if: matrix.os == 'windows-latest'
38+
- name: Install liblsl (Ubuntu)
39+
if: startsWith(matrix.config.os, 'ubuntu')
3940
run: |
40-
Invoke-WebRequest -Uri $Env:LSL_URL/$Env:LSL_RELEASE_PREFIX$Env:LSL_RELEASE$Env:LSL_RELEASE_SUFFIX/liblsl-$Env:LSL_RELEASE-Win_amd64.zip -o liblsl.7z
41-
7z x liblsl.7z -oLSL
41+
sudo apt install -y libpugixml-dev
42+
curl -L ${LSL_RELEASE_URL}/${LSL_RELEASE_PREFIX}${LSL_RELEASE}/liblsl-${LSL_RELEASE}-$(lsb_release -sc)_amd64.deb -o liblsl.deb
43+
sudo apt install ./liblsl.deb
4244
43-
- name: Get liblsl and Qt (Ubuntu)
44-
if: matrix.os == 'ubuntu-20.04'
45+
- name: Download and extract liblsl (Windows)
46+
if: startsWith(matrix.config.os, 'windows')
4547
run: |
46-
echo ${{ github.ref }}
47-
curl -L ${LSL_URL}/${LSL_RELEASE_PREFIX}${LSL_RELEASE}${LSL_RELEASE_SUFFIX}/liblsl-${LSL_RELEASE}-bionic_amd64.deb -o liblsl.deb
48-
sudo dpkg -i liblsl.deb
49-
sudo apt-get update --fix-missing # Needed for libpulse on azure mirror.
50-
sudo apt install -y libpulse-dev qtbase5-dev qtmultimedia5-dev qtdeclarative5-dev libqt5gamepad5-dev
48+
curl -L ${LSL_RELEASE_URL}/${LSL_RELEASE_PREFIX}${LSL_RELEASE}/liblsl-${LSL_RELEASE}-Win_${{ matrix.config.arch}}.zip -o liblsl.zip
49+
7z x liblsl.zip -oLSL
5150
52-
- name: Get liblsl (macOS)
53-
if: matrix.os == 'macOS-latest'
54-
run: |
55-
curl -L ${LSL_URL}/${LSL_RELEASE_PREFIX}${LSL_RELEASE}${LSL_RELEASE_SUFFIX}/liblsl-${LSL_RELEASE}-OSX_amd64.tar.bz2 -o liblsl.tar.bz2
56-
mkdir LSL
57-
tar -xvf liblsl.tar.bz2 -C LSL
58-
# brew install qt
59-
# echo "CMAKE_PREFIX_PATH=/usr/local/opt/qt" >> $GITHUB_ENV
51+
- name: Install liblsl (macOS)
52+
if: startsWith(matrix.config.os, 'macos')
53+
run: brew install labstreaminglayer/tap/lsl
54+
55+
- name: Install Qt
56+
uses: jurplel/install-qt-action@v3.0.0
57+
with:
58+
version: 5.15.2
59+
arch: ${{ matrix.config.qt_arch }}
6060

6161
- name: Configure CMake
6262
shell: bash
@@ -69,35 +69,13 @@ jobs:
6969
- name: Package
7070
run: cmake --build build --config Release -j --target package
7171

72-
- name: Upload Artifacts
73-
uses: actions/upload-artifact@v2-preview
74-
with:
75-
name: pkg-${{ matrix.os }}
76-
path: build/*.[dbz][ezi][b2p] # Hack to get deb, bz2, zip. Will also get e.g. de2, dep, dzb, dz2, dzp, etc...
77-
78-
release:
79-
needs: build
80-
runs-on: ubuntu-20.04
81-
steps:
82-
83-
- name: Download Artifacts
84-
if: startsWith(github.ref, 'refs/tags/')
85-
uses: actions/download-artifact@v2-preview
86-
# By not specifying with: name:, it defaults to downloading all artifacts.
87-
88-
# Official GitHub Upload-Asset action does not allow for uploading multiple files.
89-
# There are many community alternatives. Below is one that combines release and upload, with globbing.
90-
# See also: svenstaro/upload-release-action shogo82148/actions-upload-release-asset meeDamian/github-release csexton/release-asset-action
9172
- name: Create Release
92-
if: startsWith(github.ref, 'refs/tags/')
93-
id: create_release
73+
if: startsWith(github.ref, 'refs/tags/v')
9474
uses: softprops/action-gh-release@v1
95-
env:
96-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9775
with:
9876
# tag_name: ${{ github.ref }} # ${{ github.ref }} is default
9977
name: Release ${{ github.ref }}
10078
draft: false
10179
prerelease: false
10280
# body_path: CHANGELOG.txt
103-
files: pkg-*/*
81+
files: build/*.[dbz][ezi][b2p]

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ project(GamepadLSL
44
DESCRIPTION "Stream Gamepad (Xbox controller) analog stick positions and button events over LabStreamingLayer"
55
HOMEPAGE_URL "https://github.com/labstreaminglayer/App-Gamepad/"
66
LANGUAGES C CXX
7-
VERSION 1.15.0
7+
VERSION 1.16.1
88
)
99

1010
# also look for CMake modules in the cmake subfolder

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ There's nothing platform-specific here, so it should build in Windows/Mac/Linux.
3939
1. cmake >= 3.15
4040
1. Qt
4141
* version 5.15 used for development typically installed with Qt Maintenance tool.
42-
* Ubuntu, if not using Qt maintenance tool, must be on 20.04 or later, and use `sudo apt install -y qtbase5-dev qtmultimedia5-dev qtdeclarative5-dev libqt5gamepad5-dev`.
42+
* Ubuntu, if not using Qt maintenance tool, must be on 20.04 or later, and use `sudo apt install -y qtbase5-dev qtmultimedia5-dev qtdeclarative5-dev libqt5gamepad5-dev qml-module-qtquick-controls2 qml-module-qtgamepad qml-module-qt-labs-settings`.
4343
* Qt6 not supported.
44-
1. An IDE. QtCreator or Visual Studio both tested to work.
44+
1. An IDE. QtCreator, CLion, or Visual Studio all tested to work.
4545

4646
Then follow the general [LSL Application build instructions](https://labstreaminglayer.readthedocs.io/dev/app_build.html).
4747

0 commit comments

Comments
 (0)