-
-
Notifications
You must be signed in to change notification settings - Fork 115
141 lines (128 loc) · 4.62 KB
/
x11.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: Build - X11
on: [push, pull_request, workflow_dispatch]
env:
TOOLS_URL: https://github.com/mmatyas/pegasus-frontend/releases/download/alpha1
QT_TARGET: x11-static
QT_VERSION: qt51512
QT_VERSION_PRETTY: "5.15.12"
SDL_TARGET: x11-bionic
SDL_VERSION: "2.0.20"
jobs:
x11:
strategy:
matrix:
buildgen: [cmake, qmake, qmake-lcov]
runner: ['ubuntu-22.04']
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v3
with: {submodules: 'recursive', fetch-depth: 0, fetch-tags: true}
- uses: actions/cache@v3
with:
path: ~/.ccache
key: ccache-x11-${{ matrix.runner }}-${{ matrix.buildgen }}-${{ hashFiles('.github/workflows/x11.yml') }}
restore-keys: |
ccache-x11-${{ matrix.runner }}-${{ matrix.buildgen }}
ccache-x11-${{ matrix.runner }}-
ccache-x11-
ccache-
- name: APT deps
run: sudo apt-get update && sudo apt-get install -y libunwind-dev && sudo apt-get install -y
ccache
g++
lcov
libasound-dev
libgl1-mesa-dev
libgstreamer-plugins-base1.0-dev
libpulse-dev
libsdl2-dev
libudev-dev
libxcb-glx0-dev
libxcb-icccm4-dev
libxcb-image0-dev
libxcb-keysyms1-dev
libxcb-randr0-dev
libxcb-render-util0-dev
libxcb-shape0-dev
libxcb-sync-dev
libxcb-util-dev
libxcb-xfixes0-dev
libxcb-xinerama0-dev
libxi-dev
libxkbcommon-dev
libxkbcommon-x11-dev
libzstd-dev
ninja-build
ruby
xvfb
- name: Get Qt
run: |
.circleci/prepare.sh
curl -L "${TOOLS_URL}/SDL2-${SDL_VERSION}_${SDL_TARGET}.tar.xz" | tar xJf - -C /opt/
/opt/${QT_VERSION}_${QT_TARGET}/bin/qmake --version
cmake --version
- run: gem install --user-install -N fpm
- run: ccache --show-stats
- name: Lint QML
run: find -name *.qml -exec /opt/${QT_VERSION}_${QT_TARGET}/bin/qmllint {} \;
- name: Configure (cmake)
if: matrix.buildgen == 'cmake'
run: cmake
-B build
-G Ninja
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_PREFIX_PATH="/opt/${QT_VERSION}_${QT_TARGET};/opt/SDL2-${SDL_VERSION}"
-DCMAKE_CXX_FLAGS=-fdiagnostics-color=always
-DCMAKE_INSTALL_PREFIX=/usr/
-DPEGASUS_ENABLE_APNG=ON
-DPEGASUS_STATIC_CXX=ON
- name: Build (cmake)
if: matrix.buildgen == 'cmake'
run: cmake --build build
- name: Test (cmake)
if: matrix.buildgen == 'cmake'
run: xvfb-run -a ctest --test-dir build --rerun-failed --output-on-failure
- name: Build (qmake)
env:
BUILDOPTS:
USE_SDL_GAMEPAD=1
USE_SDL_POWER=1
INSTALL_BINDIR=/usr/bin
INSTALL_ICONDIR=/usr/share/icons/hicolor
INSTALL_DESKTOPDIR=/usr/share/applications
INSTALL_APPSTREAMDIR=/usr/share/metainfo
INSTALL_DOCDIR=/usr/share/doc/pegasus-frontend
SDL_LIBS="-L/opt/SDL2-2.0.20/lib -lSDL2"
SDL_INCLUDES=/opt/SDL2-2.0.20/include/SDL2
CONFIG+=ccache
INSTALL_BINDIR: /usr/bin/
run: .circleci/build.sh && .circleci/objdump_linux.sh '' && .circleci/zip_linux.sh
if: matrix.buildgen == 'qmake'
- run: PATH="$PATH:/home/runner/.local/share/gem/ruby/3.0.0/bin" ../.travis/script__create_deb.sh
working-directory: dist
if: matrix.buildgen == 'qmake'
- name: Measure
if: matrix.buildgen == 'qmake-lcov'
run: xvfb-run -a .travis/script__build_with_lcov.sh
- name: Send to Coveralls
if: matrix.buildgen == 'qmake-lcov'
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.clean
- name: Upload artifact
if: matrix.buildgen == 'qmake'
uses: actions/upload-artifact@v3
with:
name: x11-static
path: dist
- name: Deploy
if: matrix.buildgen == 'qmake' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
external_repository: mmatyas/pegasus-deploy-staging
personal_token: ${{ secrets.PEGASUS_GHACTIONS_TOKEN }}
publish_branch: continuous-x11-static
publish_dir: ./dist
force_orphan: true