-
-
Notifications
You must be signed in to change notification settings - Fork 276
93 lines (80 loc) · 2.78 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Ripes Tests
on:
push:
branches:
- '**'
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest, ubuntu-20.04]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
# Container preparation
# Ubuntu
- if: contains( matrix.os, 'ubuntu')
name: Prepare ubuntu container for build
run: |
sudo apt-get update
sudo apt-get upgrade -y
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y -q --force-yes \
automake cmake git wget libfuse2 desktop-file-utils tree xvfb \
build-essential libgl1-mesa-dev libxkbcommon-x11-0 libpulse-dev \
libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 \
libxcb-xinerama0 libxcb-composite0 libxcb-cursor0 libxcb-damage0 \
libxcb-dpms0 libxcb-dri2-0 libxcb-dri3-0 libxcb-ewmh2 libxcb-glx0 \
libxcb-present0 libxcb-randr0 libxcb-record0 libxcb-render0 libxcb-res0 \
libxcb-screensaver0 libxcb-shape0 libxcb-shm0 libxcb-sync1 libxcb-util1 \
echo "CC=gcc-9" >> $GITHUB_ENV
echo "CXX=g++-9" >> $GITHUB_ENV
# Dummy display server for CI tests
Xvfb :99 &
echo "DISPLAY=:99" >> $GITHUB_ENV
# MacOS
- if: contains( matrix.os, 'macos')
name: Prepare macos container for build
run: brew install autoconf automake libtool xz pkg-config libgit2 libjpg libpng libmtp
# Windows
- if: contains( matrix.os, 'windows')
name: Prepare windows container for build
uses: ilammy/msvc-dev-cmd@v1
- if: contains( matrix.os, 'windows')
uses: seanmiddleditch/gha-setup-ninja@master
# Qt installation
- if: "!contains(matrix.os, 'windows')"
name: install Qt
uses: jurplel/install-qt-action@v3
with:
version: '6.5.0'
modules: 'qtcharts'
install-deps: false
- if: contains( matrix.os, 'windows')
name: install Qt (Windows)
uses: jurplel/install-qt-action@v3
with:
version: '6.5.0'
modules: 'qtcharts'
install-deps: false
arch: win64_msvc2019_64
# Build ripes
- if: "!contains(matrix.os, 'windows')"
name: build Ripes
run: |
cmake -DRIPES_BUILD_TESTS=ON -DVSRTL_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release .
make -j $(nproc)
- if: contains(matrix.os, 'windows')
name: build Ripes (Windows)
shell: bash
run: |
cmake -GNinja -DRIPES_BUILD_TESTS=ON -DVSRTL_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl
cmake --build .
# Go test
- name: Execute tests
shell: bash
run: |
bash .github/workflows/scripts/run_tests.sh