Skip to content

Commit

Permalink
feat: port to Tcl 9
Browse files Browse the repository at this point in the history
Replace the build system.
Adopt the TEA build setup from tcl-augeas.
  • Loading branch information
dbohdan committed Sep 29, 2024
1 parent f9af6c8 commit a2b77d3
Show file tree
Hide file tree
Showing 30 changed files with 11,517 additions and 6,673 deletions.
71 changes: 55 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,60 @@
name: CI
on: [push]
on: [push, pull_request]
jobs:
test-autoconf:
runs-on: ubuntu-latest
bsd:
runs-on: ${{ matrix.os.host }}
strategy:
matrix:
os:
- name: freebsd
architecture: x86-64
version: '14.0'
host: ubuntu-latest
- name: netbsd
architecture: x86-64
version: '10.0'
host: ubuntu-latest
- name: openbsd
architecture: x86-64
version: '7.4'
host: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install Tcl
run: sudo apt install tcl-dev
- name: Build and test
run: ./autogen.sh && ./configure && make test
test-committed-configure:
- name: Checkout
uses: actions/checkout@v4
- name: Run CI script on ${{ matrix.os.name }}
uses: cross-platform-actions/[email protected]
with:
operating_system: ${{ matrix.os.name }}
architecture: ${{ matrix.os.architecture }}
version: ${{ matrix.os.version }}
shell: bash
run: |
# doas(1) isn't configured on OpenBSD.
# See https://github.com/cross-platform-actions/action/issues/75
sudo .github/workflows/prepare.sh
.github/workflows/test.sh
linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install Tcl
run: sudo apt install tcl-dev
- name: Build and test
run: ./configure && make test
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo .github/workflows/prepare.sh
- name: Run tests
run: |
.github/workflows/test.sh
mac:
# The tests segfault on `macos-14` (Apple silicon).
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
.github/workflows/prepare.sh
- name: Run tests
run: |
.github/workflows/test.sh
25 changes: 25 additions & 0 deletions .github/workflows/prepare.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#! /bin/sh
set -eu

if [ "$(uname)" = Linux ]; then
apt-get install -y tcl-dev
fi

if [ "$(uname)" = Darwin ]; then
brew install tcl-tk
fi


if [ "$(uname)" = FreeBSD ]; then
pkg install -y tcl86
ln -s /usr/local/bin/tclsh8.6 /usr/local/bin/tclsh
fi

if [ "$(uname)" = NetBSD ]; then
pkgin -y install tcl
fi

if [ "$(uname)" = OpenBSD ]; then
pkg_add -I tcl%8.6
ln -s /usr/local/bin/tclsh8.6 /usr/local/bin/tclsh
fi
10 changes: 10 additions & 0 deletions .github/workflows/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#! /bin/sh
set -eu

if [ "$(uname)" = Darwin ]; then
./configure --with-tcl="$(brew --prefix tcl-tk)"/lib
else
./configure
fi

make test
21 changes: 13 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
*.sublime-*
*.swp
*.vscode/
*~
/attic/
/tcl-duktape.wiki/

# Generated by configure
*.cache
Makefile
config.log
config.status
libtclduktape.syms
pkgIndex.tcl

# Generated by build
tcl-duktape-amalgamation.c
tcl-duktape-amalgamation.o
duktape.o
libtclduktape.so
libtclduktape.dll
libtclduktape.a
libtclduktape.lib
tcl-duktape.o
*.a
*.dll
*.lib
*.o
*.so
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2015-2019, 2020, 2023 D. Bohdan and contributors
Copyright (c) 2015-2019, 2020, 2023-2024 D. Bohdan and contributors
listed in AUTHORS

Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Loading

0 comments on commit a2b77d3

Please sign in to comment.