Krolyxon
Commit e356add

Branches

Refs →

nsxiv.githubworkflowsbuild.yml

50 lines · 1.8 KB · YAML

1name: Build
2
3on:
4 push:
5 branches: [ master ]
6
7# NOTE: "stable" tcc is too old and fails at linking. instead fetching a recent known working commit.
8jobs:
9 build:
10 runs-on: ubuntu-latest
11 steps:
12 - uses: actions/checkout@v2
13 - name: dep
14 run: |
15 sudo apt-get update
16 sudo apt-get install libimlib2 libimlib2-dev xserver-xorg-core xserver-xorg-dev \
17 libxft2 libxft-dev libexif12 libexif-dev \
18 gcc clang git
19 TCC_SHA="027b8fb9b88fe137447fb8bb1b61079be9702472"
20 wget "https://github.com/TinyCC/tinycc/archive/${TCC_SHA}.tar.gz" && tar xzf "${TCC_SHA}.tar.gz"
21 ( cd "tinycc-$TCC_SHA" && ./configure && make && sudo make install; )
22 - name: build
23 run: |
24 CFLAGS="$(sed '/^#/d' etc/woodpecker/CFLAGS | paste -d ' ' -s)"
25 build () {
26 for cc in "gcc" "clang" "tcc"; do
27 echo "### $cc - $2 build ###"
28 make clean && make -s -j"$(nproc)" CC="$cc" CFLAGS="$CFLAGS" LDFLAGS="$CFLAGS" OPT_DEP_DEFAULT="$1"
29 done
30 }
31 # full-build #
32 build "1" "full"
33 # ensure minimal-build works without opt deps installed
34 sudo apt-get remove libxft2 libxft-dev libexif12 libexif-dev >/dev/null
35 build "0" "minimal"
36 macOS-build:
37 runs-on: macOS-latest
38 steps:
39 - uses: actions/checkout@v2
40 - name: dep
41 run: |
42 brew update
43 brew install imlib2 libx11 libxft libexif giflib webp
44 - name: build
45 run: |
46 # libinotify-kqueue isn't available on homebrew
47 make clean && make -s CC=gcc OPT_DEP_DEFAULT=1 HAVE_INOTIFY=0
48 # force uninstallation with --ignore-dependencies
49 brew uninstall --ignore-dependencies libxft libexif giflib webp
50 make clean && make -s CC=gcc OPT_DEP_DEFAULT=0