-
Notifications
You must be signed in to change notification settings - Fork 206
97 lines (87 loc) · 2.72 KB
/
windows-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
name: windows-ci
on:
- push
- pull_request
jobs:
build-windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
os:
- windows
compiler:
- mingw64
cpu:
- x86
- x86_64
strictness:
- "normal"
- "strict"
steps:
- name: Configure environment
shell: bash
run: |
{
HB_USER_CFLAGS=""
HB_USER_LDFLAGS=""
case ${{matrix.strictness}} in
normal) ;;
strict) HB_USER_CFLAGS="$HB_USER_CFLAGS -Werror" ;;
esac
echo HB_BUILD_VERBOSE="yes"
echo HB_USER_CFLAGS="$HB_USER_CFLAGS"
echo HB_USER_LDFLAGS="$HB_USER_LDFLAGS"
case ${{matrix.cpu}} in
(x86) echo MINGWxx="MINGW32"
echo "msys_cpu=i686" ;;
(x86_64) echo MINGWxx="MINGW64"
echo "msys_cpu=${{matrix.cpu}}" ;;
esac
} >> $GITHUB_ENV
tee -a $GITHUB_PATH <<EOPATH
/mingw64/lib/ccache/bin
EOPATH
- name: Install packages
uses: msys2/setup-msys2@v2
with:
msystem: ${{ env.MINGWxx }}
location: d:/
install: >
mingw-w64-${{ env.msys_cpu }}-ccache
mingw-w64-${{ env.msys_cpu }}-gcc
mingw-w64-${{ env.msys_cpu }}-make
mingw-w64-${{ env.msys_cpu }}-allegro
mingw-w64-${{ env.msys_cpu }}-bzip2
mingw-w64-${{ env.msys_cpu }}-cairo
mingw-w64-${{ env.msys_cpu }}-curl
mingw-w64-${{ env.msys_cpu }}-firebird2-git
mingw-w64-${{ env.msys_cpu }}-freeimage
mingw-w64-${{ env.msys_cpu }}-libgd
mingw-w64-${{ env.msys_cpu }}-ghostscript
mingw-w64-${{ env.msys_cpu }}-libmariadbclient
mingw-w64-${{ env.msys_cpu }}-openssl
mingw-w64-${{ env.msys_cpu }}-postgresql
mingw-w64-${{ env.msys_cpu }}-qt5-base
- 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/[email protected]
with:
key: ${{ matrix.os }}-${{ matrix.cpu }}-${{ matrix.compiler }}-${{ matrix.strictness }}-ci
max-size: "32M"
- name: Compile Harbour
shell: msys2 {0}
run: |
mingw32-make.exe \
HB_COMPILER=${{matrix.compiler}} \
HB_CPU=${{matrix.cpu}} \
-j2
- name: Run tests
shell: msys2 {0}
run: |
bin/win/${{matrix.compiler}}/hbtest.exe