-
Notifications
You must be signed in to change notification settings - Fork 61
179 lines (179 loc) · 5.23 KB
/
win-build.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
170
171
172
173
174
175
176
177
178
179
name: Windows
on:
push:
branches:
- "main"
- "core-8-branch"
- "core-8-6-branch"
tags:
- "core-**"
permissions:
contents: read
env:
ERROR_ON_FAILURES: 1
jobs:
msvc:
runs-on: windows-2022
defaults:
run:
shell: powershell
working-directory: tk/win
# Using powershell means we need to explicitly stop on failure
strategy:
matrix:
config:
- ""
- "OPTS=symbols"
- "OPTS=symbols STATS=compdbg,memdbg"
- "OPTS=static"
steps:
- name: Checkout Tk
uses: actions/checkout@v4
with:
path: tk
- name: Checkout Tcl 8.7
uses: actions/checkout@v4
with:
repository: tcltk/tcl
ref: core-8-branch
path: tcl
- name: Init MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Make Install Location
working-directory: tcl
run: |
echo "TCLDIR=`pwd`" >> $GITHUB_ENV
cd ..
mkdir install
cd install
echo "INSTALLDIR=`pwd`" >> $GITHUB_ENV
- name: Build Tcl (${{ matrix.config }})
run: |
&nmake -f makefile.vc release install ${{ matrix.config }}
if ($lastexitcode -ne 0) {
throw "nmake exit code: $lastexitcode"
}
working-directory: tcl/win
- name: Build Tk (${{ matrix.config }})
run: |
&nmake -f makefile.vc all ${{ matrix.config }}
if ($lastexitcode -ne 0) {
throw "nmake exit code: $lastexitcode"
}
- name: Build Test Harness (${{ matrix.config }})
run: |
&nmake -f makefile.vc tktest ${{ matrix.config }}
if ($lastexitcode -ne 0) {
throw "nmake exit code: $lastexitcode"
}
- name: Run Tk Tests (${{ matrix.config }})
run: |
nmake -f makefile.vc test-classic ${{ matrix.config }} | tee out-classic.txt || {
echo "::error::Failure during Test"
exit 1
}
nmake -f makefile.vc test-ttk ${{ matrix.config }} | tee out-ttk.txt || {
echo "::error::Failure during Test"
exit 1
}
grep -q "Failed 0" out-classic.txt || {
echo "::error::Failure during Test"
exit 1
}
grep -q "Failed 0" out-ttk.txt || {
echo "::error::Failure during Test"
exit 1
}
env:
CI_BUILD_WITH_MSVC: 1
shell: bash
timeout-minutes: 10
- name: Build Help (${{ matrix.config }})
run: |
&nmake -f makefile.vc htmlhelp ${{ matrix.config }}
if ($lastexitcode -ne 0) {
throw "nmake exit code: $lastexitcode"
}
- name: Install (${{ matrix.config }})
run: |
&nmake -f makefile.vc install ${{ matrix.config }}
if ($lastexitcode -ne 0) {
throw "nmake exit code: $lastexitcode"
}
gcc:
runs-on: windows-2019
defaults:
run:
shell: msys2 {0}
working-directory: win
strategy:
matrix:
config:
- ""
- "--enable-symbols=mem"
- "--enable-symbols=all"
- "--disable-shared"
steps:
- name: Install MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
install: git mingw-w64-x86_64-toolchain make zip
- name: Checkout Tk
uses: actions/checkout@v4
- name: Checkout Tcl 8.7
uses: actions/checkout@v4
with:
repository: tcltk/tcl
ref: core-8-branch
path: tcl
- name: Prepare
run: |
touch tkStubInit.c
touch "${HOME}/forWinDialog-5.12.7"
mkdir "${HOME}/install_dir"
echo "INSTALL_DIR=${HOME}/install_dir" >> $GITHUB_ENV
working-directory: generic
- name: Configure and Build Tcl (${{ matrix.config }})
run: |
./configure $CFGOPT "--prefix=$INSTALL_DIR" || {
cat config.log
echo "::warning::Failure during Tcl Configure"
exit 1
}
make all install || {
echo "::warning::Failure during Tcl Build"
exit 1
}
echo "TCL_CONFIG_PATH=`pwd`" >> $GITHUB_ENV
env:
CFGOPT: --enable-64bit ${{ matrix.config }}
working-directory: tcl/win
- name: Configure Tk (${{ matrix.config }})
run: |
./configure $CFGOPT "--prefix=$HOME/INSTALL_DIR" "--with-tcl=$TCL_CONFIG_PATH" || {
cat config.log
echo "::error::Failure during Configure"
exit 1
}
env:
CFGOPT: --enable-64bit ${{ matrix.config }}
- name: Build Tk
run: |
make all tktest || {
echo "::error::Failure during Build"
exit 1
}
- name: Run Tk Tests
run: |
make test-classic | tee out-classic.txt
make test-ttk | tee out-ttk.txt
grep -q "Failed 0" out-classic.txt || {
echo "::error::Failure during Test"
exit 1
}
grep -q "Failed 0" out-ttk.txt || {
echo "::error::Failure during Test"
exit 1
}
timeout-minutes: 10