2021-01-14 09:19:16 +00:00
|
|
|
name: build
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
|
|
client:
|
|
|
|
runs-on: ubuntu-20.04
|
2021-01-15 23:06:58 +00:00
|
|
|
strategy:
|
2021-07-23 04:31:31 +00:00
|
|
|
fail-fast: false
|
2021-01-15 23:06:58 +00:00
|
|
|
matrix:
|
2021-07-18 00:24:43 +00:00
|
|
|
compiler:
|
|
|
|
- {cc: gcc, cxx: g++}
|
|
|
|
- {cc: clang, cxx: clang++}
|
2021-07-22 01:50:37 +00:00
|
|
|
wayland_shell: [xdg-shell, libdecor]
|
|
|
|
build_type: [Release, Debug]
|
2021-01-14 09:19:16 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
2021-07-22 01:50:37 +00:00
|
|
|
- name: Install libdecor PPA
|
|
|
|
run: sudo add-apt-repository ppa:christianrauch/libdecoration
|
|
|
|
if: ${{ matrix.wayland_shell == 'libdecor' }}
|
2021-12-25 01:52:56 +00:00
|
|
|
- name: Install PipeWire repository
|
|
|
|
run: |
|
|
|
|
echo 'deb [trusted=yes] https://pipewire-ubuntu.quantum5.workers.dev ./' | sudo tee /etc/apt/sources.list.d/pipewire.list
|
2022-02-06 21:39:51 +00:00
|
|
|
- name: Install wayland-protocols repository
|
|
|
|
run: |
|
|
|
|
curl https://quantum5.ca/apt.key | sudo apt-key add -
|
|
|
|
echo 'deb https://apt.quantum2.xyz/sway-utils/ bullseye main' | sudo tee /etc/apt/sources.list.d/wayland-protocols.list
|
2021-01-20 11:51:00 +00:00
|
|
|
- name: Update apt
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2021-01-14 09:19:16 +00:00
|
|
|
- name: Install client dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get install \
|
2021-01-20 11:51:00 +00:00
|
|
|
binutils-dev \
|
|
|
|
libspice-protocol-dev nettle-dev \
|
2021-07-22 01:34:02 +00:00
|
|
|
libgl-dev libgles-dev \
|
2021-08-02 14:03:44 +00:00
|
|
|
libx11-dev libxss-dev libxi-dev libxinerama-dev libxcursor-dev libxpresent-dev \
|
2021-08-14 04:45:28 +00:00
|
|
|
libwayland-dev wayland-protocols libxkbcommon-dev \
|
2022-01-27 07:05:24 +00:00
|
|
|
libsamplerate0-dev libpipewire-0.3-dev libpulse-dev \
|
2022-01-03 23:48:13 +00:00
|
|
|
$([ '${{ matrix.wayland_shell }}' = libdecor ] && echo 'libdecor-0-dev libdbus-1-dev') \
|
2021-09-29 08:51:08 +00:00
|
|
|
$([ '${{ matrix.compiler.cc }}' = clang ] && echo 'clang-tools')
|
2021-09-02 00:02:29 +00:00
|
|
|
sudo pip3 install pyenchant
|
2021-01-14 09:19:16 +00:00
|
|
|
- name: Configure client
|
2021-02-21 19:18:04 +00:00
|
|
|
env:
|
2021-07-18 00:24:43 +00:00
|
|
|
CC: /usr/bin/${{ matrix.compiler.cc }}
|
|
|
|
CXX: /usr/bin/${{ matrix.compiler.cxx }}
|
2021-01-14 09:19:16 +00:00
|
|
|
run: |
|
|
|
|
mkdir client/build
|
|
|
|
cd client/build
|
2021-07-22 00:49:35 +00:00
|
|
|
cmake \
|
|
|
|
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
|
|
|
|
-DCMAKE_LINKER:FILEPATH=/usr/bin/ld \
|
2021-09-29 08:51:08 +00:00
|
|
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
2021-12-24 07:43:20 +00:00
|
|
|
-DENABLE_LIBDECOR=${{ matrix.wayland_shell == 'libdecor' }} \
|
2021-07-22 00:49:35 +00:00
|
|
|
..
|
2021-01-14 09:19:16 +00:00
|
|
|
- name: Build client
|
|
|
|
run: |
|
|
|
|
cd client/build
|
|
|
|
make -j$(nproc)
|
2021-09-02 00:02:29 +00:00
|
|
|
- name: Checking help spelling
|
|
|
|
run: ./client/build/looking-glass-client --help | ./doc/lgspell.py
|
2021-09-29 08:51:08 +00:00
|
|
|
- name: Check GL function calls
|
|
|
|
if: matrix.compiler.cc == 'clang'
|
|
|
|
run: WAYLAND_SHELL='${{ matrix.wayland_shell }}' ./gl-check
|
2021-01-14 09:46:31 +00:00
|
|
|
|
|
|
|
module:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Build kernel module
|
|
|
|
run: |
|
|
|
|
cd module
|
|
|
|
make
|
2021-01-14 09:51:49 +00:00
|
|
|
|
|
|
|
host-linux:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
2021-01-20 11:51:00 +00:00
|
|
|
- name: Update apt
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2021-01-14 09:51:49 +00:00
|
|
|
- name: Install Linux host dependencies
|
|
|
|
run: |
|
2021-03-14 23:57:55 +00:00
|
|
|
sudo apt-get install binutils-dev libgl1-mesa-dev libxcb-xfixes0-dev
|
2021-01-14 09:51:49 +00:00
|
|
|
- name: Configure Linux host
|
|
|
|
run: |
|
|
|
|
mkdir host/build
|
|
|
|
cd host/build
|
|
|
|
cmake ..
|
|
|
|
- name: Build Linux host
|
|
|
|
run: |
|
|
|
|
cd host/build
|
|
|
|
make -j$(nproc)
|
2021-01-14 10:39:03 +00:00
|
|
|
|
2021-01-15 23:55:13 +00:00
|
|
|
host-windows-cross:
|
2021-01-14 10:39:03 +00:00
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
2021-01-20 11:51:00 +00:00
|
|
|
- name: Update apt
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2021-01-15 23:55:13 +00:00
|
|
|
- name: Install Windows host cross-compile dependencies
|
2021-01-14 10:39:03 +00:00
|
|
|
run: |
|
|
|
|
sudo apt-get install gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 nsis
|
2021-01-15 23:55:13 +00:00
|
|
|
- name: Configure Windows host for cross-compile
|
2021-01-14 10:39:03 +00:00
|
|
|
run: |
|
|
|
|
mkdir host/build
|
|
|
|
cd host/build
|
|
|
|
cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain-mingw64.cmake ..
|
2021-01-15 23:55:13 +00:00
|
|
|
- name: Cross-compile Windows host
|
2021-01-14 10:39:03 +00:00
|
|
|
run: |
|
|
|
|
cd host/build
|
|
|
|
make -j$(nproc)
|
|
|
|
- name: Build Windows host installer
|
|
|
|
run: |
|
|
|
|
cd host/build
|
|
|
|
makensis platform/Windows/installer.nsi
|
2021-12-25 08:09:02 +00:00
|
|
|
- name: Build Windows host installer with IVSHMEM drivers
|
|
|
|
run: |
|
|
|
|
cd host/build
|
|
|
|
curl https://dl.quantum2.xyz/ivshmem.tar.gz | tar xz
|
|
|
|
makensis -DIVSHMEM platform/Windows/installer.nsi
|
2021-01-14 21:30:45 +00:00
|
|
|
|
2021-01-15 23:55:13 +00:00
|
|
|
host-windows-native:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Configure Windows host for native MinGW-w64
|
|
|
|
run: |
|
|
|
|
mkdir host\build
|
|
|
|
cd host\build
|
|
|
|
cmake -G "MinGW Makefiles" ..
|
|
|
|
- name: Build Windows host on native MinGW-w64
|
|
|
|
run: |
|
|
|
|
cd host\build
|
|
|
|
mingw32-make "-j$([Environment]::ProcessorCount)"
|
|
|
|
- name: Build Windows host installer
|
|
|
|
run: |
|
|
|
|
cd host\build
|
2021-09-21 11:31:59 +00:00
|
|
|
makensis -DBUILD_32BIT platform\Windows\installer.nsi
|
2021-01-15 23:55:13 +00:00
|
|
|
|
2021-01-14 21:30:45 +00:00
|
|
|
obs:
|
|
|
|
runs-on: ubuntu-latest
|
2021-01-15 23:08:41 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
cc: [gcc, clang]
|
2021-01-14 21:30:45 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
2021-01-20 11:51:00 +00:00
|
|
|
- name: Update apt
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2021-01-14 21:30:45 +00:00
|
|
|
- name: Install obs plugin dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get install binutils-dev libobs-dev libgl1-mesa-dev
|
|
|
|
- name: Configure obs plugin
|
|
|
|
run: |
|
|
|
|
mkdir obs/build
|
|
|
|
cd obs/build
|
2021-01-15 23:08:41 +00:00
|
|
|
CC=/usr/bin/${{ matrix.cc }} cmake ..
|
2021-01-14 21:30:45 +00:00
|
|
|
- name: Build obs plugin
|
|
|
|
run: |
|
|
|
|
cd obs/build
|
|
|
|
make -j$(nproc)
|
2021-09-01 22:29:42 +00:00
|
|
|
|
|
|
|
docs:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Update apt
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
- name: Install docs dependencies
|
|
|
|
run: |
|
2021-12-26 01:40:41 +00:00
|
|
|
sudo apt-get install python3-sphinx python3-sphinx-rtd-theme
|
2021-09-01 23:15:35 +00:00
|
|
|
sudo pip3 install sphinxcontrib-spelling
|
2021-09-01 22:29:42 +00:00
|
|
|
- name: Build docs
|
|
|
|
run: |
|
|
|
|
cd doc
|
2021-09-01 23:15:35 +00:00
|
|
|
make dirhtml SPHINXOPTS='-b spelling -W' -j$(nproc)
|