Skip to content

Commit a566ea9

Browse files
committed
GH Actions - Select Qt Version on Linux
1 parent 2501dd1 commit a566ea9

2 files changed

Lines changed: 30 additions & 12 deletions

File tree

.github/workflows/cppcmake.yml

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,44 +27,55 @@ jobs:
2727
fail-fast: false
2828
matrix:
2929
config:
30-
- {name: "ubuntu-20.04", os: "ubuntu-20.04"}
31-
# - {name: "ubuntu-18.04", os: "ubuntu-18.04"}
32-
- {name: "ubuntu-16.04", os: "ubuntu-16.04"}
33-
- {name: "windows-x64", os: "windows-latest"}
34-
- {name: "macOS-latest", os: "macOS-latest"}
30+
- {name: "ubuntu-20.04", os: "ubuntu-20.04", qtver: 5.15.2}
31+
# - {name: "ubuntu-18.04", os: "ubuntu-18.04", qtver: 5.15.2} # Awaiting liblsl deploy fix.
32+
- {name: "ubuntu-16.04", os: "ubuntu-16.04", qtver: 5.12.10}
33+
- {name: "windows-x64", os: "windows-latest", qtver: "specified below"}
34+
- {name: "macOS-latest", os: "macOS-latest", qtver: "not used"}
3535
steps:
3636
- uses: actions/checkout@v2
37-
- name: download liblsl (Ubuntu)
37+
- name: Install liblsl and Qt (Ubuntu)
3838
if: startsWith(matrix.config.os, 'ubuntu-')
3939
run: |
4040
curl -L ${LSL_RELEASE_URL}/liblsl-${LSL_RELEASE}-$(lsb_release -sc)_amd64.deb -o liblsl.deb
4141
sudo dpkg -i liblsl.deb
42-
sudo apt-get install -y qtbase5-dev
42+
sudo apt install mesa-common-dev libglu1-mesa-dev
43+
wget https://code.qt.io/cgit/qbs/qbs.git/plain/scripts/install-qt.sh
44+
sudo chmod +x install-qt.sh
45+
sudo ./install-qt.sh --version ${{ matrix.config.qtver }} qtbase icu
46+
sudo ldconfig /opt/Qt/${{ matrix.config.qtver }}/gcc_64/lib
47+
# use with -DQt5_DIR=/opt/Qt/${{ matrix.config.qtver }}/gcc_64/lib/cmake/Qt5
48+
# or -DCMAKE_PREFIX_PATH=/opt/Qt/${{ matrix.config.qtver }}/gcc_64
4349
44-
- name: download liblsl (Windows)
50+
- name: Download liblsl (Windows)
4551
if: matrix.config.os == 'windows-latest'
4652
run: |
4753
curl -L ${LSL_RELEASE_URL}/liblsl-${LSL_RELEASE}-Win_amd64.zip -o liblsl.zip
4854
7z x liblsl.zip -oLSL
4955
50-
- name: download liblsl (macOS)
56+
- name: Install liblsl and Qt (macOS)
5157
if: matrix.config.os == 'macOS-latest'
5258
run: |
5359
curl -L ${LSL_RELEASE_URL}/liblsl-${LSL_RELEASE}-OSX_amd64.tar.bz2 -o liblsl.tar.bz2
5460
mkdir LSL
5561
tar -xvf liblsl.tar.bz2 -C LSL
5662
brew install qt
5763
58-
- name: Install Qt
64+
- name: Install Qt (Windows)
5965
if: matrix.config.os == 'windows-latest'
6066
uses: jurplel/install-qt-action@v2
6167
with:
62-
version: 5.15.1
68+
version: 5.15.2
6369

6470
- name: Configure CMake
6571
run: |
6672
cmake --version
67-
test "${{ runner.os }}" == "macOS" && export CMAKE_PREFIX_PATH=/usr/local/opt/qt
73+
if [ "$RUNNER_OS" == "macOS" ]; then
74+
export CMAKE_PREFIX_PATH=/usr/local/opt/qt
75+
elif [ "$RUNNER_OS" == "Linux" ]; then
76+
export CMAKE_PREFIX_PATH=/opt/Qt/${{ matrix.config.qtver }}/gcc_64
77+
fi
78+
echo $CMAKE_PREFIX_PATH
6879
cmake -S . -B build \
6980
-DCMAKE_BUILD_TYPE=Release \
7081
-DCMAKE_INSTALL_PREFIX=${PWD}/install \

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,10 @@ ui_*.h
66
/.vs/
77
/out/
88
/CMakeSettings.json
9+
# CLion
10+
.idea/
11+
cmake-build-debug/
12+
cmake-build-release/
13+
# Generated by CI scripts - or maintainers debugging CI scripts:
14+
liblsl.deb
15+
install-qt.sh

0 commit comments

Comments
 (0)