Krolyxon
Commit 657080a

Branches

Refs →

nsxiv.githubworkflowsbuild.yml

53 lines · 2.0 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 bc
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 -j"$(nproc)" && 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"; 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 # try all combination with tcc #
32 etc/woodpecker/try-all-builds.sh
33 # full-build with gcc and clang #
34 build "1" "full"
35 # ensure minimal-build works without opt deps installed
36 sudo apt-get remove libxft2 libxft-dev libexif12 libexif-dev >/dev/null
37 build "0" "minimal"
38 macOS-build:
39 runs-on: macOS-latest
40 steps:
41 - uses: actions/checkout@v2
42 - name: dep
43 run: |
44 brew update
45 # see: https://github.com/actions/setup-python/issues/577
46 brew install imlib2 libx11 libxft libexif giflib webp || true
47 - name: build
48 run: |
49 # libinotify-kqueue isn't available on homebrew
50 make clean && make -s CC=gcc OPT_DEP_DEFAULT=1 HAVE_INOTIFY=0
51 # force uninstallation with --ignore-dependencies
52 brew uninstall --ignore-dependencies libxft libexif giflib webp
53 make clean && make -s CC=gcc OPT_DEP_DEFAULT=0