2020-12-26 23:40:47 +01:00
|
|
|
---
|
|
|
|
name: Test
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- 'docs/**'
|
|
|
|
- '*.md'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-20.04]
|
|
|
|
fail-fast: false
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2.3.4
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Cache Qt
|
|
|
|
id: cache-qt
|
2021-02-11 16:36:38 +01:00
|
|
|
uses: actions/cache@v2.1.4
|
2020-12-26 23:40:47 +01:00
|
|
|
with:
|
|
|
|
path: ../Qt
|
|
|
|
key: ${{ runner.os }}-QtCache-20201005
|
|
|
|
|
2021-02-13 13:07:08 +01:00
|
|
|
- name: Cache conan
|
|
|
|
uses: actions/cache@v2.1.4
|
|
|
|
with:
|
|
|
|
key: ${{ runner.os }}-conan-root-${{ hashFiles('**/conanfile.txt') }}
|
|
|
|
path: ~/.conan
|
|
|
|
|
2020-12-26 23:40:47 +01:00
|
|
|
# LINUX
|
|
|
|
- name: Install p7zip (Ubuntu)
|
|
|
|
if: startsWith(matrix.os, 'ubuntu')
|
|
|
|
run: sudo apt-get update && sudo apt-get -y install p7zip-full
|
|
|
|
|
|
|
|
- name: Install Qt
|
|
|
|
uses: jurplel/install-qt-action@v2
|
|
|
|
with:
|
2021-02-13 12:20:37 +01:00
|
|
|
aqtversion: '==1.1.1'
|
2020-12-26 23:40:47 +01:00
|
|
|
cached: ${{ steps.cache-qt.outputs.cache-hit }}
|
|
|
|
extra: --external 7z
|
|
|
|
|
|
|
|
# LINUX
|
|
|
|
- name: Install dependencies (Ubuntu)
|
|
|
|
if: startsWith(matrix.os, 'ubuntu')
|
|
|
|
run: |
|
2021-02-13 13:07:08 +01:00
|
|
|
curl "https://raw.githubusercontent.com/AnotherFoxGuy/ci-scripts/main/install-conan.sh" | sudo bash
|
2020-12-26 23:40:47 +01:00
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get -y install \
|
|
|
|
cmake \
|
|
|
|
rapidjson-dev \
|
|
|
|
libssl-dev \
|
|
|
|
libboost-dev \
|
|
|
|
libboost-system-dev \
|
|
|
|
libboost-filesystem-dev \
|
|
|
|
libpulse-dev \
|
|
|
|
libxkbcommon-x11-0 \
|
|
|
|
libgstreamer-plugins-base1.0-0 \
|
|
|
|
build-essential \
|
|
|
|
libgl1-mesa-dev \
|
|
|
|
libxcb-icccm4 \
|
|
|
|
libxcb-image0 \
|
|
|
|
libxcb-keysyms1 \
|
|
|
|
libxcb-render-util0 \
|
|
|
|
libxcb-xinerama0 \
|
|
|
|
libgtest-dev
|
|
|
|
|
|
|
|
- name: Create build directory (Ubuntu)
|
|
|
|
if: startsWith(matrix.os, 'ubuntu')
|
2021-02-13 13:07:08 +01:00
|
|
|
run: mkdir build-test
|
2020-12-26 23:40:47 +01:00
|
|
|
shell: bash
|
|
|
|
|
2021-02-13 13:07:08 +01:00
|
|
|
- name: Add conan pkgs
|
|
|
|
run: cmake -P conan-pkgs/add_conan_pkgs.cmake
|
|
|
|
|
2020-12-26 23:40:47 +01:00
|
|
|
- name: Build (Ubuntu)
|
|
|
|
if: startsWith(matrix.os, 'ubuntu')
|
|
|
|
run: |
|
2021-02-13 13:07:08 +01:00
|
|
|
cmake -DUSE_PACKAGE_MANAGER=ON -DBUILD_TESTS=ON -DBUILD_APP=OFF ..
|
|
|
|
make -j
|
2020-12-26 23:40:47 +01:00
|
|
|
working-directory: build-test
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Test (Ubuntu)
|
|
|
|
if: startsWith(matrix.os, 'ubuntu')
|
|
|
|
run: |
|
2021-02-13 17:22:21 +01:00
|
|
|
./chatterino-test --platform minimal
|
2020-12-26 23:40:47 +01:00
|
|
|
working-directory: build-test
|
|
|
|
shell: bash
|