-
Notifications
You must be signed in to change notification settings - Fork 52
84 lines (81 loc) · 2.94 KB
/
full-check.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
# Copyright 2020 Daniel T. Borelli <daltomi@disroot.org>
# Copyright 2020 Jeroen Roovers <jer@gentoo.org>
# Copyright 2020 Joao Eriberto Mota Filho <eriberto@eriberto.pro.br>
# Copyright 2021-2023 Guilherme Janczak <guilherme.janczak@yandex.com>
# Copyright 2022 Zev Weiss <zev@bewilderbeest.net>
# Copyright 2023 NRK <nrk@disroot.org>
name: full-check
on: [push, pull_request]
jobs:
ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- name: install_dependencies
run: |
sudo apt install tcc libimlib2-dev libxcomposite-dev libxfixes-dev \
autoconf-archive libbsd-dev libxinerama-dev cppcheck
- name: distcheck
run: |
./autogen.sh
./configure SCROT_PRIVATE_FLAGS="-Werror -Wno-error=cpp -Wno-error=pedantic"
make distcheck
- name: run_program
run: |
make
src/scrot -v
- name: tcc
run: |
./configure SCROT_PRIVATE_FLAGS="-Werror -Wno-error=cpp -Wno-error=pedantic" CC=tcc
make clean all
src/scrot -v
- name: bare build
run: |
make -s distclean
c99 -o src/scrot src/*.c $(pkg-config --cflags --libs ./deps.pc)
src/scrot -v
- name: cppcheck
run: |
cppcheck --version
cppcheck --std=c99 -j$(nproc) --quiet --force --error-exitcode=1 \
--suppress=uninitvar \
--enable=portability,performance src/*.c \
$(pkg-config --cflags ./deps.pc)
- name: clang-tidy
run: |
clang-tidy --version
find src -name '*.c' -print | xargs -P$(nproc) -I{} \
clang-tidy --quiet {} -- $(pkg-config --cflags ./deps.pc)
cygwin:
runs-on: windows-latest
env:
CYGWIN_NOWINPATH: 1 # Removes non-Cygwin dirs from PATH.
CHERE_INVOKING: '' # Makes Cygwin's `bash.exe --login` not cd.
defaults:
run:
shell: C:\cygwin\bin\bash.exe --login -o igncr {0}
steps:
- run: git config --global core.autocrlf input
# This is NOT the Cygwin bash, it's the Git for Windows bash from the
# default Github Actions Windows VM. This step tells git to translate Unix
# newlines to DOS newlines.
shell: bash
- uses: actions/checkout@v2.4.0
- uses: cygwin/cygwin-install-action@v1
with:
packages: autoconf autoconf-archive automake gcc-core libImlib2-devel \
libXcomposite-devel libXext-devel libXfixes-devel libXinerama-devel \
make
- name: distcheck
# NOTE: cygwin's imlib2 version is too old, and it's imlib_apply_filter
# lacks `const` qualifier. so use `-Wno-error=discarded-qualifiers`.
run: |
cd ${GITHUB_WORKSPACE}
./autogen.sh
./configure SCROT_PRIVATE_FLAGS="-Werror -Wno-error=cpp -Wno-error=pedantic -Wno-error=discarded-qualifiers"
make distcheck
- name: run_program
run: |
cd ${GITHUB_WORKSPACE}
make
src/scrot -v