Skip to content

Commit 25f1d9c

Browse files
author
jan.nijtmans
committed
Add linux-with-tcl9-build.yml
1 parent a946af3 commit 25f1d9c

File tree

1 file changed

+177
-0
lines changed

1 file changed

+177
-0
lines changed
+177
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
name: Linux (with Tcl 9.0)
2+
on:
3+
push:
4+
branches:
5+
- "main"
6+
- "core-9-0-branch"
7+
tags:
8+
- "core-**"
9+
permissions:
10+
contents: read
11+
defaults:
12+
run:
13+
shell: bash
14+
working-directory: tk/unix
15+
env:
16+
ERROR_ON_FAILURES: 1
17+
jobs:
18+
build:
19+
runs-on: ubuntu-22.04
20+
strategy:
21+
matrix:
22+
compiler:
23+
- "gcc"
24+
- "clang"
25+
config:
26+
- ""
27+
- "CFLAGS=-DTK_NO_DEPRECATED=1"
28+
- "--disable-shared"
29+
- "--disable-xft"
30+
- "--disable-xss"
31+
- "--enable-symbols"
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v4
35+
with:
36+
path: tk
37+
- name: Checkout Tcl 9.0
38+
uses: actions/checkout@v4
39+
with:
40+
repository: tcltk/tcl
41+
ref: core-9-0-branch
42+
path: tcl
43+
- name: Setup Environment (compiler=${{ matrix.compiler }})
44+
run: |
45+
sudo apt-get install libxss-dev libxft-dev
46+
mkdir "$HOME/install dir"
47+
touch tk/doc/man.macros tk/generic/tkStubInit.c
48+
echo "CFGOPT=$CFGOPT" >> $GITHUB_ENV
49+
echo "CC=$COMPILER" >> $GITHUB_ENV
50+
echo "TOOL_DIR=$(cd tcl/tools;pwd)" >> $GITHUB_ENV
51+
echo "BUILD_CONFIG_ID=$OPTS" >> $GITHUB_ENV
52+
working-directory: "."
53+
env:
54+
CFGOPT: ${{ matrix.config }}
55+
COMPILER: ${{ matrix.compiler }}
56+
OPTS: ${{ matrix.compiler }}${{ matrix.config }}
57+
- name: Configure and Build Tcl
58+
run: |
59+
./configure $CFGOPT "--prefix=$HOME/install dir" || {
60+
cat config.log
61+
echo "::warning::Failure during Tcl Configure"
62+
exit 1
63+
}
64+
make all install || {
65+
echo "::warning::Failure during Tcl Build"
66+
exit 1
67+
}
68+
echo "TCL_CONFIG_PATH=`pwd`" >> $GITHUB_ENV
69+
working-directory: tcl/unix
70+
- name: Configure (opts=${{ matrix.config }})
71+
run: |
72+
./configure $CFGOPT --with-tcl=$TCL_CONFIG_PATH "--prefix=$HOME/install dir" || {
73+
cat config.log
74+
echo "::error::Failure during Configure"
75+
exit 1
76+
}
77+
- name: Build
78+
run: |
79+
make binaries libraries || {
80+
echo "::error::Failure during Build"
81+
exit 1
82+
}
83+
- name: Build Test Harness
84+
run: |
85+
make tktest || {
86+
echo "::error::Failure during Build"
87+
exit 1
88+
}
89+
- name: Test-Drive Installation
90+
run: |
91+
make install || {
92+
echo "::error::Failure during Install"
93+
exit 1
94+
}
95+
- name: Create Distribution Package
96+
run: |
97+
make dist || {
98+
echo "::error::Failure during Distribute"
99+
exit 1
100+
}
101+
- name: Convert Documentation to HTML
102+
run: |
103+
make html-tk TOOL_DIR=$TOOL_DIR || {
104+
echo "::error::Failure during Distribute"
105+
exit 1
106+
}
107+
test:
108+
runs-on: ubuntu-22.04
109+
strategy:
110+
matrix:
111+
compiler:
112+
- "gcc"
113+
config:
114+
- ""
115+
- "--disable-xft"
116+
- "--enable-symbols"
117+
steps:
118+
- name: Checkout
119+
uses: actions/checkout@v4
120+
with:
121+
path: tk
122+
- name: Checkout Tcl 9.0
123+
uses: actions/checkout@v4
124+
with:
125+
repository: tcltk/tcl
126+
ref: core-9-0-branch
127+
path: tcl
128+
- name: Setup Environment (compiler=${{ matrix.compiler }})
129+
run: |
130+
sudo apt-get install libxss-dev libxft-dev xvfb libicu-dev xfonts-75dpi xfonts-100dpi xfonts-scalable libxfont2 unifont
131+
mkdir "$HOME/install dir"
132+
touch tk/doc/man.macros tk/generic/tkStubInit.c
133+
echo "CFGOPT=$CFGOPT" >> $GITHUB_ENV
134+
echo "CC=$COMPILER" >> $GITHUB_ENV
135+
working-directory: "."
136+
env:
137+
CFGOPT: ${{ matrix.config }}
138+
COMPILER: ${{ matrix.compiler }}
139+
- name: Configure and Build Tcl
140+
run: |
141+
./configure $CFGOPT "--prefix=$HOME/install dir" || {
142+
cat config.log
143+
echo "::warning::Failure during Tcl Configure"
144+
exit 1
145+
}
146+
make all install || {
147+
echo "::warning::Failure during Tcl Build"
148+
exit 1
149+
}
150+
echo "TCL_CONFIG_PATH=`pwd`" >> $GITHUB_ENV
151+
working-directory: tcl/unix
152+
- name: Configure ${{ matrix.config }}
153+
run: |
154+
./configure $CFGOPT --with-tcl=$TCL_CONFIG_PATH "--prefix=$HOME/install dir" || {
155+
cat config.log
156+
echo "::error::Failure during Configure"
157+
exit 1
158+
}
159+
- name: Build
160+
run: |
161+
make binaries libraries tktest || {
162+
echo "::error::Failure during Build"
163+
exit 1
164+
}
165+
- name: Run Tests
166+
run: |
167+
xvfb-run --auto-servernum make test-classic | tee out-classic.txt
168+
xvfb-run --auto-servernum make test-ttk | tee out-ttk.txt
169+
grep -q "Failed 0" out-classic.txt || {
170+
echo "::error::Failure during Test"
171+
exit 1
172+
}
173+
grep -q "Failed 0" out-ttk.txt || {
174+
echo "::error::Failure during Test"
175+
exit 1
176+
}
177+
timeout-minutes: 15

0 commit comments

Comments
 (0)