Krolyxon
Commit 598f4c7

Branches

Refs →

nsxiv.githubworkflowsbuild.yml

59 lines · 2.5 KB · YAML

1name: Build
2
3on:
4 push:
5 branches: [ master ]
6 pull_request:
7 branches: [ master ]
8
9# NOTE: "stable" tcc is too old and fails at linking. instead using git version.
10jobs:
11 full-build:
12 runs-on: ubuntu-latest
13 steps:
14 - uses: actions/checkout@v2
15 - name: make
16 run: |
17 sudo apt-get install libimlib2 libimlib2-dev xserver-xorg-core xserver-xorg-dev \
18 libxft2 libxft-dev libexif12 libexif-dev \
19 gcc clang >/dev/null
20 git clone --quiet --depth 1 'https://github.com/TinyCC/tinycc.git'
21 ( cd tinycc && ./configure && make && sudo make install; ) >/dev/null
22 # vanilla flags
23 CFLAGS="-std=c99 -Wall -pedantic"
24 # extra flags
25 CFLAGS+=" -Werror -Wextra -Wshadow -Wvla -Wpointer-arith -Wstrict-prototypes"
26 CFLAGS+=" -Wundef -Wstrict-overflow=4 -Wwrite-strings -Wunreachable-code"
27 CFLAGS+=" -Wbad-function-cast -Wdeclaration-after-statement"
28 # silence
29 CFLAGS+=" -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers"
30 export CFLAGS
31 export OPT_DEP_DEFAULT=1
32 echo "### GCC BUILD ###" && make clean && CC=gcc make -s
33 echo "### CLANG BUILD ###" && make clean && CC=clang make -s
34 echo "### TCC BUILD ###" && make clean && CC=tcc make -s
35
36 minimal-build:
37 runs-on: ubuntu-latest
38 steps:
39 - uses: actions/checkout@v2
40 - name: make
41 run: |
42 sudo apt-get install libimlib2 libimlib2-dev xserver-xorg-core xserver-xorg-dev \
43 gcc clang >/dev/null
44 sudo apt-get remove libxft2 libxft-dev libexif12 libexif-dev >/dev/null
45 git clone --quiet --depth 1 'https://github.com/TinyCC/tinycc.git'
46 ( cd tinycc && ./configure && make && sudo make install; ) >/dev/null
47 # vanilla flags
48 CFLAGS="-std=c99 -Wall -pedantic"
49 # extra flags
50 CFLAGS+=" -Werror -Wextra -Wshadow -Wvla -Wpointer-arith -Wstrict-prototypes"
51 CFLAGS+=" -Wundef -Wstrict-overflow=4 -Wwrite-strings -Wunreachable-code"
52 CFLAGS+=" -Wbad-function-cast -Wdeclaration-after-statement"
53 # silence
54 CFLAGS+=" -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers"
55 export CFLAGS
56 export OPT_DEP_DEFAULT=0
57 echo "### GCC BUILD ###" && make clean && CC=gcc make -s
58 echo "### CLANG BUILD ###" && make clean && CC=clang make -s
59 echo "### TCC BUILD ###" && make clean && CC=tcc make -s