-
Notifications
You must be signed in to change notification settings - Fork 207
120 lines (102 loc) · 3.1 KB
/
linux-ci.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: linux-ci
on:
- push
- pull_request
jobs:
ubuntu-ci:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler:
- clang
- gcc
strictness:
- "normal"
- "strict"
steps:
- name: Configure environment
shell: bash
run: |
echo "Nothing to do for Linux"
- name: Install packages
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
sudo apt-get install -qq \
valgrind \
libncurses-dev \
libslang2-dev \
libx11-dev \
libgpm-dev \
liballegro4.2-dev \
libcairo2-dev \
libcups2-dev \
libcurl4-openssl-dev \
firebird-dev \
libgd-dev \
libgs-dev \
libmagic-dev \
libmysqlclient-dev \
unixodbc-dev \
libpq-dev \
qtbase5-dev
# Dependencies for disabled contribs:
# libfreeimage-dev \
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.client_payload.branch }}
- run: pwd
- run: ls
- name: Prepare ccache using action
uses: hendrikmuhs/ccache-action@v1.2.10
with:
key: linux-${{ matrix.compiler }}-${{ matrix.strictness }}-ci
max-size: "32M"
- name: Configure build shell
run: |
set -ex
HB_USER_CFLAGS=""
HB_USER_LDFLAGS=""
case ${{matrix.strictness}} in
normal) ;;
strict) case ${{matrix.compiler}} in
(gcc) HB_USER_CFLAGS="$HB_USER_CFLAGS -Werror -Wno-error=deprecated-declarations -Wno-error=array-bounds" ;;
(*) HB_USER_CFLAGS="$HB_USER_CFLAGS -Werror -Wno-error=deprecated-declarations" ;;
esac ;;
esac
tee ./.bashrc <<EOENV
# These contribs do not build on any platform
export HB_BUILD_CONTRIBS="no hbfimage" # incompatible with freeimage 3.18+
export HB_BUILD_VERBOSE="yes"
export HBMK_WITH_SQLITE3="local"
export HB_USER_CFLAGS="$HB_USER_CFLAGS"
export HB_USER_LDFLAGS="$HB_USER_LDFLAGS"
export HB_CCACHE=ccache
EOENV
- name: Build Harbour
run: |
echo ::group::Build Harbour
set -ex
. ./.bashrc
make -j$(nproc) \
HB_BUILD_CONTRIBS=no \
HB_COMPILER=${{matrix.compiler}}
- name: Build contribs
run: |
echo ::group::Build contribs
set -ex
. ./.bashrc
make -j$(nproc) \
-C contrib \
HB_COMPILER=${{matrix.compiler}}
- name: Run tests
run: |
echo ::group::Run tests
set -ex
VALGRIND="valgrind --error-exitcode=1"
$VALGRIND bin/linux/${{matrix.compiler}}/hbtest
cd contrib/hbsqlit3/tests
../../../bin/linux/${{matrix.compiler}}/hbmk2 backup.prg
$VALGRIND ./backup