-
Notifications
You must be signed in to change notification settings - Fork 21
169 lines (166 loc) · 5.27 KB
/
tests.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
name: non-regression tests
on: [pull_request]
jobs:
mac:
runs-on: macos-latest
strategy:
matrix:
ui: [cli, gui]
printf: [fmtdbg, normal]
include:
- ui: cli
clionly: --with-gui=no
- printf: fmtdbg
debugprintf: --with-debug-printf-format
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: install prerequisites
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1
run: brew install ghostscript
- name: install prerequisites (GUI)
if: matrix.ui == 'gui'
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1
run: brew install gtk+
- name: configure
run: |
set +x
./configure ${{ matrix.clionly }} ${{ matrix.debugprintf }} --with-werror
- name: make
run: make -j$(sysctl -n hw.ncpu || 2)
- name: check executability
run: ./dvdisaster --version
- name: check executable (GUI)
if: matrix.ui == 'gui'
run: |
./dvdisaster --version
if ./dvdisaster --version | grep NOGUI; then exit 1; fi
- name: check executable (CLI)
if: matrix.ui == 'cli'
run: |
./dvdisaster --version
./dvdisaster --version | grep NOGUI
- name: prepare dist
run: ./.github/workflows/make-dist.sh ${{ github.ref }}
- name: regression tests
if: matrix.printf == 'normal'
env:
REGTEST_NO_UTF8: 1
run: mkdir /var/tmp/regtest && ./regtest/runtests.sh
win:
runs-on: windows-latest
strategy:
matrix:
arch: [x86_64, i686]
ui: [cli, gui]
printf: [fmtdbg, normal]
include:
- arch: x86_64
msystem: MINGW64
grep: x86-64
- arch: i686
msystem: MINGW32
grep: 386
- ui: cli
clionly: --with-gui=no
- printf: fmtdbg
debugprintf: --with-debug-printf-format
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
update: false
install: git diffutils make pkg-config mingw-w64-${{ matrix.arch }}-glib2 mingw-w64-${{ matrix.arch }}-gcc mingw-w64-${{ matrix.arch }}-ghostscript mingw-w64-${{ matrix.arch }}-ntldd-git man zip
- name: install GUI prereqs
if: matrix.ui == 'gui'
run: pacman -S --noconfirm mingw-w64-${{ matrix.arch }}-gtk2
- name: git config
run: git config --global core.autocrlf input
shell: bash
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: configure
run: |
echo running ./configure ${{ matrix.clionly }} ${{ matrix.debugprintf }} --with-werror
./configure ${{ matrix.clionly }} ${{ matrix.debugprintf }} --with-werror
- name: make
run: nproc && make -j$(nproc)
- name: check executable
run: |
./dvdisaster.exe --version
file dvdisaster.exe
if ./dvdisaster.exe --version | grep dirty; then exit 1; fi
file dvdisaster.exe | grep -q '${{ matrix.grep }}, for MS Windows'
- name: check executable (GUI)
if: matrix.ui == 'gui'
run: |
./dvdisaster.exe --version
if ./dvdisaster.exe --version | grep NOGUI; then exit 1; fi
- name: check executable (CLI)
if: matrix.ui == 'cli'
run: |
./dvdisaster.exe --version
./dvdisaster.exe --version | grep NOGUI
- name: try to prepare dist
run: ./.github/workflows/make-dist.sh ${{ github.ref }}
- name: run regression tests
if: matrix.printf == 'normal'
env:
REGTEST_NO_UTF8: 1
run: mkdir /var/tmp/regtest && ./regtest/runtests.sh
linux:
runs-on: ubuntu-latest
strategy:
matrix:
ui: [cli, gui]
printf: [fmtdbg, normal]
include:
- ui: cli
clionly: --with-gui=no
- printf: fmtdbg
debugprintf: --with-debug-printf-format
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: install prerequisites
env:
DEBIAN_FRONTEND: noninteractive
run: sudo apt-get update && sudo apt-get install -y libglib2.0-dev ghostscript man jq
- name: install prerequisites (GUI)
if: matrix.ui == 'gui'
env:
DEBIAN_FRONTEND: noninteractive
run: sudo apt-get install -y libgtk2.0-dev
- name: configure
run: |
echo ./configure ${{ matrix.clionly }} ${{ matrix.debugprintf }} --with-werror
./configure ${{ matrix.clionly }} ${{ matrix.debugprintf }} --with-werror
- name: make
run: nproc && make -j$(nproc)
- name: check executability
run: ./dvdisaster --version
- name: check executable (GUI)
if: matrix.ui == 'gui'
run: |
./dvdisaster --version
if ./dvdisaster --version | grep NOGUI; then exit 1; fi
- name: check executable (CLI)
if: matrix.ui == 'cli'
run: |
./dvdisaster --version
./dvdisaster --version | grep NOGUI
- name: prepare dist
run: ./.github/workflows/make-dist.sh ${{ github.ref }}
- name: regression tests
if: matrix.printf == 'normal'
env:
REGTEST_NO_UTF8: 1
run: mkdir /var/tmp/regtest && ./regtest/runtests.sh