Skip to content

Commit d7faed9

Browse files
committed
Actions - use Qt action for all platforms
1 parent a566ea9 commit d7faed9

1 file changed

Lines changed: 16 additions & 27 deletions

File tree

.github/workflows/cppcmake.yml

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -27,55 +27,42 @@ jobs:
2727
fail-fast: false
2828
matrix:
2929
config:
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"}
30+
- {name: "ubuntu-20.04", os: "ubuntu-20.04"}
31+
# - {name: "ubuntu-18.04", os: "ubuntu-18.04"} # Awaiting liblsl deploy fix.
32+
# - {name: "ubuntu-16.04", os: "ubuntu-16.04"} # Awaiting https://github.com/miurahr/aqtinstall/issues/183
33+
- {name: "windows-x64", os: "windows-latest"}
34+
- {name: "macOS-latest", os: "macOS-latest"}
3535
steps:
3636
- uses: actions/checkout@v2
37-
- name: Install liblsl and Qt (Ubuntu)
37+
38+
- name: Install Qt
39+
uses: jurplel/install-qt-action@v2
40+
with:
41+
aqtversion: '>=0.9.8'
42+
py7zrversion: '>=0.11'
43+
44+
- name: Install liblsl (Ubuntu)
3845
if: startsWith(matrix.config.os, 'ubuntu-')
3946
run: |
4047
curl -L ${LSL_RELEASE_URL}/liblsl-${LSL_RELEASE}-$(lsb_release -sc)_amd64.deb -o liblsl.deb
4148
sudo dpkg -i liblsl.deb
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
4949
5050
- name: Download liblsl (Windows)
5151
if: matrix.config.os == 'windows-latest'
5252
run: |
5353
curl -L ${LSL_RELEASE_URL}/liblsl-${LSL_RELEASE}-Win_amd64.zip -o liblsl.zip
5454
7z x liblsl.zip -oLSL
5555
56-
- name: Install liblsl and Qt (macOS)
56+
- name: Download liblsl (macOS)
5757
if: matrix.config.os == 'macOS-latest'
5858
run: |
5959
curl -L ${LSL_RELEASE_URL}/liblsl-${LSL_RELEASE}-OSX_amd64.tar.bz2 -o liblsl.tar.bz2
6060
mkdir LSL
6161
tar -xvf liblsl.tar.bz2 -C LSL
62-
brew install qt
63-
64-
- name: Install Qt (Windows)
65-
if: matrix.config.os == 'windows-latest'
66-
uses: jurplel/install-qt-action@v2
67-
with:
68-
version: 5.15.2
6962
7063
- name: Configure CMake
7164
run: |
7265
cmake --version
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
7966
cmake -S . -B build \
8067
-DCMAKE_BUILD_TYPE=Release \
8168
-DCMAKE_INSTALL_PREFIX=${PWD}/install \
@@ -89,6 +76,7 @@ jobs:
8976

9077
- name: package
9178
run: |
79+
export LD_LIBRARY_PATH=$Qt5_Dir/lib:$LD_LIBRARY_PATH
9280
cmake --build build --config Release -j --target package
9381
cmake -E remove_directory package/_CPack_Packages
9482
@@ -97,6 +85,7 @@ jobs:
9785
with:
9886
name: pkg-${{ matrix.config.name }}
9987
path: package
88+
10089
- name: upload to release page
10190
if: github.event_name == 'release'
10291
env:

0 commit comments

Comments
 (0)