Krolyxon
Commit a9c6cbc

Branches

Refs →

nsxiv.githubworkflowsbuild.yml

65 lines · 2.7 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 fetching a recent known working commit.
10jobs:
11 full-build:
12 runs-on: ubuntu-latest
13 steps:
14 - uses: actions/checkout@v2
15 - name: dep
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
20 TCC_SHA="027b8fb9b88fe137447fb8bb1b61079be9702472"
21 wget "https://github.com/TinyCC/tinycc/archive/${TCC_SHA}.tar.gz" && tar xzf "${TCC_SHA}.tar.gz"
22 ( cd "tinycc-$TCC_SHA" && ./configure && make && sudo make install; )
23 - name: build
24 run: |
25 # vanilla flags
26 CFLAGS="-std=c99 -Wall -pedantic"
27 # extra flags
28 CFLAGS+=" -Werror -Wextra -Wshadow -Wvla -Wpointer-arith -Wstrict-prototypes"
29 CFLAGS+=" -Wundef -Wstrict-overflow=4 -Wwrite-strings -Wunreachable-code"
30 CFLAGS+=" -Wbad-function-cast -Wdeclaration-after-statement"
31 # silence
32 CFLAGS+=" -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers"
33 export CFLAGS
34 export OPT_DEP_DEFAULT=1
35 echo "### GCC BUILD ###" && make clean && CC=gcc make -s
36 echo "### CLANG BUILD ###" && make clean && CC=clang make -s
37 echo "### TCC BUILD ###" && make clean && CC=tcc make -s
38
39 minimal-build:
40 runs-on: ubuntu-latest
41 steps:
42 - uses: actions/checkout@v2
43 - name: dep
44 run: |
45 sudo apt-get install libimlib2 libimlib2-dev xserver-xorg-core xserver-xorg-dev \
46 gcc clang
47 sudo apt-get remove libxft2 libxft-dev libexif12 libexif-dev
48 TCC_SHA="027b8fb9b88fe137447fb8bb1b61079be9702472"
49 wget "https://github.com/TinyCC/tinycc/archive/${TCC_SHA}.tar.gz" && tar xzf "${TCC_SHA}.tar.gz"
50 ( cd "tinycc-$TCC_SHA" && ./configure && make && sudo make install; )
51 - name: build
52 run: |
53 # vanilla flags
54 CFLAGS="-std=c99 -Wall -pedantic"
55 # extra flags
56 CFLAGS+=" -Werror -Wextra -Wshadow -Wvla -Wpointer-arith -Wstrict-prototypes"
57 CFLAGS+=" -Wundef -Wstrict-overflow=4 -Wwrite-strings -Wunreachable-code"
58 CFLAGS+=" -Wbad-function-cast -Wdeclaration-after-statement"
59 # silence
60 CFLAGS+=" -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers"
61 export CFLAGS
62 export OPT_DEP_DEFAULT=0
63 echo "### GCC BUILD ###" && make clean && CC=gcc make -s
64 echo "### CLANG BUILD ###" && make clean && CC=clang make -s
65 echo "### TCC BUILD ###" && make clean && CC=tcc make -s