Skip to content

Import Tk 8.6.14 #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
164 changes: 164 additions & 0 deletions .github/workflows/linux-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
name: Linux
on:
push:
branches:
- "main"
- "core-8-branch"
- "core-8-6-branch"
tags:
- "core-**"
permissions:
contents: read
defaults:
run:
shell: bash
working-directory: tk/unix
env:
ERROR_ON_FAILURES: 1
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
compiler:
- "gcc"
- "clang"
config:
- ""
- "--disable-shared"
- "--disable-xft"
- "--disable-xss"
- "--enable-symbols"
steps:
- name: Checkout Tk
uses: actions/checkout@v4
with:
path: tk
- name: Checkout Tcl 8.6
uses: actions/checkout@v4
with:
repository: tcltk/tcl
ref: core-8-6-branch
path: tcl
- name: Setup Environment (compiler=${{ matrix.compiler }})
run: |
sudo apt-get install tcl8.6-dev libxss-dev libxft-dev
mkdir "$HOME/install dir"
touch tk/doc/man.macros tk/generic/tkStubInit.c
echo "CFGOPT=$CFGOPT --with-tcl=/usr/lib/tcl8.6" >> $GITHUB_ENV
echo "CC=$COMPILER" >> $GITHUB_ENV
echo "TOOL_DIR=$(cd tcl/tools;pwd)" >> $GITHUB_ENV
echo "BUILD_CONFIG_ID=$OPTS" >> $GITHUB_ENV
working-directory: "."
env:
CFGOPT: ${{ matrix.config }}
COMPILER: ${{ matrix.compiler }}
OPTS: ${{ matrix.compiler }}${{ matrix.config }}
- name: Configure (opts=${{ matrix.config }})
run: |
./configure $CFGOPT "--prefix=$HOME/install dir" || {
cat config.log
echo "::error::Failure during Configure"
exit 1
}
- name: Build
run: |
make binaries libraries || {
echo "::error::Failure during Build"
exit 1
}
- name: Build Test Harness
run: |
make tktest || {
echo "::error::Failure during Build"
exit 1
}
- name: Test-Drive Installation
run: |
make install || {
echo "::error::Failure during Install"
exit 1
}
- name: Create Distribution Package
run: |
make dist || {
echo "::error::Failure during Distribute"
exit 1
}
- name: Convert Documentation to HTML
run: |
make html-tk TOOL_DIR=$TOOL_DIR || {
echo "::error::Failure during Distribute"
exit 1
}
- name: Discover Version ID
if: ${{ env.BUILD_CONFIG_ID == 'gcc' }}
run: |
cd /tmp/dist
echo "VERSION=`ls -d tk* | sed 's/tk//'`" >> $GITHUB_ENV
- name: Upload Source Distribution
if: ${{ env.BUILD_CONFIG_ID == 'gcc' }}
uses: actions/upload-artifact@v4
with:
name: Tk ${{ env.VERSION }} Source distribution (snapshot)
path: |
/tmp/dist/tk*
!/tmp/dist/tk*/html/**
- name: Upload Documentation Distribution
if: ${{ env.BUILD_CONFIG_ID == 'gcc' }}
uses: actions/upload-artifact@v4
with:
name: Tk ${{ env.VERSION }} HTML documentation (snapshot)
path: /tmp/dist/tk*/html
test:
runs-on: ubuntu-20.04
strategy:
matrix:
compiler:
- "gcc"
config:
- ""
- "--disable-xft"
- "--enable-symbols"
steps:
- name: Checkout Tk
uses: actions/checkout@v4
with:
path: tk
- name: Setup Environment (compiler=${{ matrix.compiler }})
run: |
sudo apt-get install tcl8.6-dev libxss-dev libxft-dev xvfb
mkdir "$HOME/install dir"
touch tk/doc/man.macros tk/generic/tkStubInit.c
echo "CFGOPT=$CFGOPT --with-tcl=/usr/lib/tcl8.6" >> $GITHUB_ENV
echo "CC=$COMPILER" >> $GITHUB_ENV
working-directory: "."
env:
CFGOPT: ${{ matrix.config }}
COMPILER: ${{ matrix.compiler }}
- name: Configure ${{ matrix.config }}
run: |
./configure $CFGOPT "--prefix=$HOME/install dir" || {
cat config.log
echo "::error::Failure during Configure"
exit 1
}
- name: Build
run: |
make binaries libraries tktest || {
echo "::error::Failure during Build"
exit 1
}
- name: Run Tests
run: |
xvfb-run --auto-servernum make test-classic | tee out-classic.txt
xvfb-run --auto-servernum 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
172 changes: 172 additions & 0 deletions .github/workflows/mac-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
name: macOS
on:
push:
branches:
- "main"
- "core-8-branch"
- "core-8-6-branch"
tags:
- "core-**"
permissions:
contents: read
env:
ERROR_ON_FAILURES: 1
jobs:
xcode:
runs-on: macos-11
defaults:
run:
shell: bash
working-directory: tk/macosx
steps:
- name: Checkout Tk
uses: actions/checkout@v4
with:
path: tk
- name: Checkout Tcl
uses: actions/checkout@v4
with:
repository: tcltk/tcl
ref: core-8-6-branch
path: tcl
- name: Prepare checked out repositories
run: |
touch tk/generic/tkStubInit.c
mkdir build
echo "BUILD_DIR=`cd build && pwd`" >> $GITHUB_ENV
echo "DESTDIR=`cd build && pwd`" >> $GITHUB_ENV
working-directory: .
- name: Build Tcl
run: |
make all
working-directory: tcl/macosx
- name: Build
run: |
make all install || {
echo "::error::Failure during Build"
exit 1
}
- name: Run Tests
run: |
make test | tee out.txt
nmatches=$( grep -c "Failed 0" out.txt )
if [ $nmatches -lt 4 ]
then
echo "::error::Failure during Test"
exit 1
fi
timeout-minutes: 30
clang:
runs-on: macos-11
strategy:
matrix:
symbols:
- 'no'
- 'mem'
options:
- '--enable-aqua'
- '--disable-aqua'
defaults:
run:
shell: bash
working-directory: tk/unix
steps:
- name: Checkout Tk
uses: actions/checkout@v4
with:
path: tk
- name: Checkout Tcl
uses: actions/checkout@v4
with:
repository: tcltk/tcl
ref: core-8-6-branch
path: tcl
- name: Prepare checked out repositories
env:
SET_DISPLAY: ${{ contains(matrix.options, '--disable-aqua') }}
run: |
touch ../generic/tkStubInit.c ../doc/man.macros
mkdir "$HOME/install dir"
echo "USE_XVFB=$SET_DISPLAY" >> $GITHUB_ENV
- name: Add X11 (if required)
if: ${{ env.USE_XVFB == 'true' }}
run: |
brew install --cask xquartz
sudo /opt/X11/libexec/privileged_startx || true
working-directory: .
- name: Build Tcl
# Note that macOS is always a 64 bit platform
run: |
./configure --enable-64bit $CFGOPT "--prefix=$HOME/install dir" || {
cat config.log
echo "::error::Failure during Tcl Configure"
exit 1
}
make all || {
echo "::error::Failure during Tcl Build"
exit 1
}
make install || {
echo "::error::Failure during Tcl Install"
exit 1
}
working-directory: tcl/unix
env:
CFGOPT: --enable-symbols=${{ matrix.symbols }}
- name: Configure (symbols=${{ matrix.symbols }} ${{matrix.options }})
# Note that macOS is always a 64 bit platform
run: |
./configure --enable-64bit $CFGOPT "--prefix=$HOME/install dir" --disable-xft || {
cat config.log
echo "::error::Failure during Configure"
exit 1
}
env:
CFGOPT: --enable-symbols=${{ matrix.symbols }} ${{matrix.options }}
- name: Build
run: |
make binaries libraries tktest || {
echo "::error::Failure during Build"
exit 1
}
- name: Run Tests
run: |
if [ $USE_XVFB == true ]; then
function runXvfb {
PATH=$PATH:/opt/X11/bin
Xvfb $1 &
XVFB_PID=$!
echo Launched Xvfb $1 as process $XVFB_PID >&2
trap "echo killing process $XVFB_PID... >&2; kill $XVFB_PID" 0
export DISPLAY=$1
sleep 2
}
else
function runXvfb {
echo Xvfb not used, this is a --enable-aqua build
}
fi
( runXvfb :0; make test-classic; exit $? ) | tee out-classic.txt || {
echo "::error::Failure during Test (classic)"
exit 1
}
( runXvfb :0; make test-ttk; exit $? ) | tee out-ttk.txt || {
echo "::error::Failure during Test (ttk)"
exit 1
}
cat out-classic.txt | grep -q "Failed 0" || {
echo "::error::Failure in classic test results"
exit 1
}
cat out-ttk.txt | grep -q "Failed 0" || {
echo "::error::Failure in ttk test results"
exit 1
}
timeout-minutes: 20
- name: Carry out trial installation
run: |
make install || {
cat config.log
echo "::error::Failure during Install"
exit 1
}
Loading