-
Notifications
You must be signed in to change notification settings - Fork 6
47 lines (45 loc) · 1.13 KB
/
ci.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
name: CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
env:
CI_CXXFLAGS: -O2 -Wall -Wextra -Werror -pedantic
WSHADOW_GCC: -Wshadow=local
WSHADOW_CLANG: -Wshadow-uncaptured-local
steps:
- uses: actions/checkout@v3
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: |
clang
libavcodec-dev
libavformat-dev
libavutil-dev
libpng-dev
libquazip5-dev
libsdl2-dev
libsdl2-image-dev
libswresample-dev
libswscale-dev
qtbase5-dev
qttools5-dev-tools
version: 1.0
- name: build-gcc
run: |
mkdir build-gcc
cd build-gcc
qmake .. PREFIX=/usr/local QMAKE_CXX=g++ \
QMAKE_CXXFLAGS="${CI_CXXFLAGS} ${WSHADOW_GCC}"
make -j4
- name: build-clang
run: |
mkdir build-clang
cd build-clang
qmake .. PREFIX=/usr/local QMAKE_CXX=clang++ \
QMAKE_CXXFLAGS="${CI_CXXFLAGS} ${WSHADOW_CLANG}"
make -j4