Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
e664578
Update TclX for Tcl 9 API compatibility
zolk3ri May 3, 2026
5688d88
Update CI to build against Tcl 9.1a1
zolk3ri May 4, 2026
dc0902c
Remove obsolete Ubuntu toolchain PPA
zolk3ri May 4, 2026
85bdb78
Tighten Tcl version checks in CI
zolk3ri May 4, 2026
5950760
Use checked-in configure on macOS
zolk3ri May 5, 2026
af72278
Remove unused Tcl 9 compatibility helpers
zolk3ri May 5, 2026
0bf3a5a
Use Tcl_Size for Tcl string lengths
zolk3ri May 5, 2026
2c21be2
Add strict CI smoke test for built TclX library
zolk3ri May 5, 2026
8ab171a
Avoid internal int object conversion in dup
zolk3ri May 5, 2026
d5cd6b1
Support Tcl 9 profile command dispatch
zolk3ri May 7, 2026
291737a
Detect profiled Tcl procedures by delete hook
zolk3ri May 7, 2026
320bb19
Update profile stack expectations for Tcl 9
zolk3ri May 7, 2026
82bb4be
Use Tcl package version checks in profile tests
zolk3ri May 7, 2026
6bbadd8
Add Tcl_Size compatibility for Tcl 8.6 builds
zolk3ri May 7, 2026
550daa6
Handle Tcl 8.6 regexp error text in lmatch test
zolk3ri May 7, 2026
b7bf3bd
Require Tclx matching Tcl version in tests
zolk3ri May 9, 2026
4664c0c
Track build Tcl version in TclX package version
zolk3ri May 9, 2026
3b64714
Avoid redefining Autoconf package version macros
zolk3ri May 9, 2026
7418f4d
Use TclX package version for runtime initialization
zolk3ri May 9, 2026
b2dd2d2
Remove redundant zero flag from lvar assignment
zolk3ri May 12, 2026
7a3fb78
Stop tracking Tcl version in TclX package version
zolk3ri Sep 3, 2026
66a61a0
Report both TclX and Tcl version in infox version
zolk3ri Sep 3, 2026
49a77c4
Add a regression test for the fixed TclX package version
zolk3ri Sep 3, 2026
cd551c7
Use TCL_SIZE_MODIFIER for the call frame level in cmdtrace
zolk3ri Sep 3, 2026
248ef05
Look up the TclX script library by its install directory version
zolk3ri Sep 3, 2026
e553160
Use switch in place of the removed case command
zolk3ri Sep 3, 2026
844317e
Drop the case compatibility command
zolk3ri Sep 3, 2026
ae448ac
Take the expected regexp error text from the interpreter
zolk3ri Sep 3, 2026
6f46979
Keep a usable copy of auto_reset in the library tests
zolk3ri Sep 3, 2026
b04eb2a
Mark the failing library index tests as known bugs
zolk3ri Sep 3, 2026
6f13caf
Report a test file that stops early as a failure
zolk3ri Sep 3, 2026
eff3816
Release the result of the index expression
zolk3ri Sep 4, 2026
903a5b0
Match the profile tests to the Tcl 9.0 and 9.1 releases
zolk3ri Oct 10, 2026
ac9900a
Indent the cmdtrace test traces by their level numbers
zolk3ri Oct 10, 2026
a939088
Qualify the globals used when setting up the TclX library
zolk3ri Oct 10, 2026
4a6ab06
Build CI against the released Tcl 8.6, 9.0 and 9.1
zolk3ri Oct 10, 2026
bc4050a
Run CI for pull requests into any branch
zolk3ri Oct 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
168 changes: 143 additions & 25 deletions .github/workflows/linux-ci.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,152 @@
name: Linux CI

on:
workflow_dispatch:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]

jobs:
build:

name: Tcl ${{ matrix.tcl }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- tcl: 8.6.18
ref: core-8-6-18
- tcl: 9.0.4
ref: core-9-0-4
- tcl: 9.1.0
ref: core-9-1-0
env:
EXPECTED_TCL_VERSION: ${{ matrix.tcl }}
TCL_REPO: https://github.com/tcltk/tcl.git
TCL_REF: ${{ matrix.ref }}
TCL_PREFIX: /usr/local
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update -qq
sudo apt-get install -y gcc-11 g++-11
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 110 --slave /usr/bin/g++ g++ /usr/bin/g++-11 --slave /usr/bin/gcov gcov /usr/bin/gcov-11
sudo apt-get install -y tcl8.6-dev
- name: configure
run: |
autoreconf -vi
./configure --with-tcl=/usr/lib/tcl8.6
- name: make
run: make
- name: check unit tests
continue-on-error: true
run: make test
- name: install
run: sudo make install
- uses: actions/checkout@v4
- name: Install dependencies
run: |
set -eux

sudo apt-get update -qq
sudo apt-get install -y \
gcc-11 \
g++-11 \
build-essential \
git \
ca-certificates \
autoconf \
automake \
libtool \
make

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 110 \
--slave /usr/bin/g++ g++ /usr/bin/g++-11 \
--slave /usr/bin/gcov gcov /usr/bin/gcov-11
- name: Build Tcl ${{ matrix.tcl }}
run: |
set -eux

git clone --depth 1 --branch "$TCL_REF" "$TCL_REPO" tcl-src

cd tcl-src/unix
./configure --prefix="$TCL_PREFIX"
make -j"$(nproc)"
sudo make install
sudo ldconfig
- name: Locate Tcl installation
run: |
set -eux

echo "Installed Tcl-related files:"
find "$TCL_PREFIX" \
\( -name 'tclConfig.sh' -o -name 'tclsh*' -o -name 'libtcl*' -o -name 'tclInt.h' \) \
-print

TCL_CONFIG="$(find "$TCL_PREFIX/lib" -name 'tclConfig.sh' -print -quit)"

if [ -z "$TCL_CONFIG" ]; then
echo "Could not find tclConfig.sh under $TCL_PREFIX/lib"
exit 1
fi

TCL_CONFIG_DIR="$(dirname "$TCL_CONFIG")"

# shellcheck source=/dev/null
. "$TCL_CONFIG"

TCL_CONFIG_VERSION="${TCL_VERSION:-}${TCL_PATCH_LEVEL:-}"

if [ "$TCL_CONFIG_VERSION" != "$EXPECTED_TCL_VERSION" ]; then
echo "Expected tclConfig.sh version $EXPECTED_TCL_VERSION, got ${TCL_CONFIG_VERSION:-unset}"
exit 1
fi

if [ -x "$TCL_PREFIX/bin/tclsh$TCL_VERSION" ]; then
TCLSH="$TCL_PREFIX/bin/tclsh$TCL_VERSION"
elif [ -x "$TCL_PREFIX/bin/tclsh" ]; then
TCLSH="$TCL_PREFIX/bin/tclsh"
else
echo "Could not find installed Tcl shell under $TCL_PREFIX/bin"
exit 1
fi

{
echo "TCL_CONFIG=$TCL_CONFIG"
echo "TCL_CONFIG_DIR=$TCL_CONFIG_DIR"
echo "TCLSH=$TCLSH"
} >> "$GITHUB_ENV"

"$TCLSH" <<'EOF'
puts [info patchlevel]
EOF

"$TCLSH" <<EOF | grep "^$EXPECTED_TCL_VERSION$"
puts [info patchlevel]
EOF
- name: configure
run: |
set -eux

autoreconf -vi
./configure --with-tcl="$TCL_CONFIG_DIR"
- name: make
run: |
set -eux
make
- name: smoke test built TclX library
run: |
set -eux

TCLLIBPATH="$PWD" TCLX_LIBRARY="$PWD/library" "$TCLSH" <<'EOF'
proc assert_equal {name actual expected} {
if {$actual ne $expected} {
error "$name: expected <$expected>, got <$actual>"
}
}

puts "Tcl: [info patchlevel]"
puts "TclX package: [package require Tclx]"
puts "TclX runtime: [infox version]"
puts "Loaded:"
puts [join [info loaded] "\n"]

assert_equal cindex [cindex "abcdef" 2] c
assert_equal clength [clength "h\u00e9llo"] 5
assert_equal csubstr [csubstr "abcdef" 1 3] bcd
assert_equal replicate [replicate "xy" 3] xyxyxy
assert_equal translit [translit "abc" "ABC" "aabbcc"] AABBCC
assert_equal ctype [ctype digit "12345"] 1

puts "OK"
EOF
- name: check unit tests
continue-on-error: true
run: |
set -eux
make test
- name: install
run: |
set -eux
sudo make install
162 changes: 127 additions & 35 deletions .github/workflows/mac-ci.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,136 @@
name: Mac CI

on:
workflow_dispatch:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]

jobs:
build:

name: Tcl ${{ matrix.tcl }}
runs-on: macos-latest

strategy:
fail-fast: false
matrix:
include:
- tcl: 8.6.18
ref: core-8-6-18
- tcl: 9.0.4
ref: core-9-0-4
- tcl: 9.1.0
ref: core-9-1-0
env:
EXPECTED_TCL_VERSION: ${{ matrix.tcl }}
TCL_REPO: https://github.com/tcltk/tcl.git
TCL_REF: ${{ matrix.ref }}
TCL_PREFIX: /usr/local
steps:
- uses: actions/checkout@v2
- name: Build dependencies
# Building tcl to make sure we get tclInt.h
run: |
sudo mkdir -p /usr/local/src/git
sudo chown `id -un` /usr/local/src/git
cd /usr/local/src/git
git clone https://github.com/tcltk/tcl.git
cd tcl
git checkout core-8-6-branch
cd unix
./configure
make
sudo make install
- name: configure
run: |
autoreconf -vi
./configure --with-tcl=/usr/local/lib --prefix=/usr/local
- name: make
run: make
- name: test
# These tests fail on Mac *only* in the Github Actions containers, and this
# cannot be reproduced in a workable test environment. It may be related to
# the general signal handling issues with multithreaded TclX. Try re-enabling
# when on Tcl(x) 8.7 where the problem should be fixed.
continue-on-error: true
run: SKIPFILES="pipe.test process.test signal.test" make test
- name: install
run: sudo make install
- uses: actions/checkout@v4
- name: Build Tcl ${{ matrix.tcl }}
# Building Tcl to make sure we get tclInt.h
run: |
set -eux

cd "$RUNNER_TEMP"
git clone --depth 1 --branch "$TCL_REF" "$TCL_REPO" tcl-src

cd tcl-src/unix
./configure --prefix="$TCL_PREFIX"
make -j"$(sysctl -n hw.ncpu)"
sudo make install
- name: Locate Tcl installation
run: |
set -eux

echo "Installed Tcl-related files:"
find "$TCL_PREFIX" \
\( -name 'tclConfig.sh' -o -name 'tclsh*' -o -name 'libtcl*' -o -name 'tclInt.h' \) \
-print

TCL_CONFIG="$(find "$TCL_PREFIX/lib" -name 'tclConfig.sh' -print -quit)"

if [ -z "$TCL_CONFIG" ]; then
echo "Could not find tclConfig.sh under $TCL_PREFIX/lib"
exit 1
fi

TCL_CONFIG_DIR="$(dirname "$TCL_CONFIG")"

# shellcheck source=/dev/null
. "$TCL_CONFIG"

TCL_CONFIG_VERSION="${TCL_VERSION:-}${TCL_PATCH_LEVEL:-}"

if [ "$TCL_CONFIG_VERSION" != "$EXPECTED_TCL_VERSION" ]; then
echo "Expected tclConfig.sh version $EXPECTED_TCL_VERSION, got ${TCL_CONFIG_VERSION:-unset}"
exit 1
fi

if [ -x "$TCL_PREFIX/bin/tclsh$TCL_VERSION" ]; then
TCLSH="$TCL_PREFIX/bin/tclsh$TCL_VERSION"
elif [ -x "$TCL_PREFIX/bin/tclsh" ]; then
TCLSH="$TCL_PREFIX/bin/tclsh"
else
echo "Could not find installed Tcl shell under $TCL_PREFIX/bin"
exit 1
fi

{
echo "TCL_CONFIG=$TCL_CONFIG"
echo "TCL_CONFIG_DIR=$TCL_CONFIG_DIR"
echo "TCLSH=$TCLSH"
} >> "$GITHUB_ENV"

"$TCLSH" <<'EOF'
puts [info patchlevel]
EOF

"$TCLSH" <<EOF | grep "^$EXPECTED_TCL_VERSION$"
puts [info patchlevel]
EOF
- name: configure
run: |
set -eux

./configure --with-tcl="$TCL_CONFIG_DIR" --prefix=/usr/local
- name: make
run: |
set -eux
make
- name: smoke test built TclX library
run: |
set -eux

TCLLIBPATH="$PWD" TCLX_LIBRARY="$PWD/library" "$TCLSH" <<'EOF'
proc assert_equal {name actual expected} {
if {$actual ne $expected} {
error "$name: expected <$expected>, got <$actual>"
}
}

puts "Tcl: [info patchlevel]"
puts "TclX package: [package require Tclx]"
puts "TclX runtime: [infox version]"
puts "Loaded:"
puts [join [info loaded] "\n"]

assert_equal cindex [cindex "abcdef" 2] c
assert_equal clength [clength "h\u00e9llo"] 5
assert_equal csubstr [csubstr "abcdef" 1 3] bcd
assert_equal replicate [replicate "xy" 3] xyxyxy
assert_equal translit [translit "abc" "ABC" "aabbcc"] AABBCC
assert_equal ctype [ctype digit "12345"] 1

puts "OK"
EOF
- name: test
# These tests fail on Mac *only* in the Github Actions containers, and this
# cannot be reproduced in a workable test environment. It may be related to
# the general signal handling issues with multithreaded TclX.
continue-on-error: true
run: |
set -eux
SKIPFILES="pipe.test process.test signal.test" make test
- name: install
run: |
set -eux
sudo make install
3 changes: 2 additions & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@

PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
TCLX_PACKAGE_VERSION = @TCLX_PACKAGE_VERSION@
CC = @CC@
CFLAGS_DEFAULT = @CFLAGS_DEFAULT@
CFLAGS_WARNING = @CFLAGS_WARNING@
Expand Down Expand Up @@ -263,7 +264,7 @@ $(PKG_LIB_FILE): $(PKG_OBJECTS)
$(RANLIB) $(PKG_LIB_FILE)

pkgIndex.tcl:
(echo 'package ifneeded Tclx $(PACKAGE_VERSION) \
(echo 'package ifneeded Tclx $(TCLX_PACKAGE_VERSION) \
[list load [file join $$dir $(PKG_LIB_FILE)] Tclx]'\
) > pkgIndex.tcl

Expand Down
Loading