Skip to content
Merged
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
19 changes: 17 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,28 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Install manual-page linter
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y mandoc
- name: Validate release metadata, manifests, handshakes, and behavior
run: make release-check

core-compatibility:
name: TNT core compatibility
name: TNT ${{ matrix.tier }} (${{ matrix.tnt_ref }})
timeout-minutes: 15
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- tier: minimum
tnt_ref: v1.1.0
- tier: stable
tnt_ref: v1.3.0
- tier: main
tnt_ref: main
steps:
- name: Check out modules
uses: actions/checkout@v6
Expand All @@ -43,7 +58,7 @@ jobs:
uses: actions/checkout@v6
with:
repository: m1ngsama/TNT
ref: main
ref: ${{ matrix.tnt_ref }}
path: TNT
- name: Install TNT dependencies
run: |
Expand Down
126 changes: 0 additions & 126 deletions CHANGELOG.md

This file was deleted.

64 changes: 63 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
.PHONY: test check release-check check-modules core-check core-integration perf perf-load perf-resources perf-check
.PHONY: test check release-check check-modules core-check core-integration \
perf perf-load perf-resources perf-check man-check install install-man \
install-modules uninstall uninstall-man uninstall-modules

PYTHON ?= python3
PERF_ARGS ?=
TNT_ROOT ?= ../TNT
PREFIX ?= /usr/local
MANDIR ?= $(PREFIX)/share/man
LIBEXECDIR ?= $(PREFIX)/libexec
MODULEDIR ?= $(LIBEXECDIR)/tnt/modules
INSTALL ?= install
MANPAGE = tnt-modules.7
MODULES = 8ball-module choose-module flip-module quote-module roll-module

test: check-modules
@tests/test_check_modules.sh
Expand All @@ -12,6 +21,59 @@ test: check-modules
release-check:
@scripts/release_check.sh

man-check:
@set -e; \
markdown=$$(find . -type f -name '*.md' -not -path './.git/*' -print); \
[ -z "$$markdown" ] || { printf '%s\n' "$$markdown" >&2; exit 1; }; \
awk 'length($$0) > 80 { print FNR ":" length($$0); bad = 1 } \
END { exit bad }' $(MANPAGE); \
! grep -n -E '^\.(TS|TE|nf|fi)([[:space:]]|$$)' $(MANPAGE); \
! grep -n -E '([[:alnum:]_./-]+\.md|docs/)' $(MANPAGE); \
if command -v mandoc >/dev/null 2>&1; then \
mandoc -Tlint $(MANPAGE); \
test -n "$$(mandoc -Tascii $(MANPAGE))"; \
elif command -v groff >/dev/null 2>&1; then \
groff -man -z -ww $(MANPAGE); \
test -n "$$(groff -man -Tascii $(MANPAGE))"; \
else \
echo "man-check: mandoc or groff is required" >&2; \
exit 1; \
fi

install: install-modules install-man

install-modules:
@set -e; \
for module in $(MODULES); do \
dir="$(DESTDIR)$(MODULEDIR)/$$module"; \
$(INSTALL) -d "$$dir"; \
$(INSTALL) -m 0644 "modules/$$module/module_json.awk" "$$dir/"; \
$(INSTALL) -m 0644 "modules/$$module/$$module.awk" "$$dir/"; \
$(INSTALL) -m 0644 "modules/$$module/tnt-module.json" "$$dir/"; \
$(INSTALL) -m 0755 "modules/$$module/$$module.sh" "$$dir/"; \
done

install-man: $(MANPAGE)
$(INSTALL) -d "$(DESTDIR)$(MANDIR)/man7"
$(INSTALL) -m 0644 $(MANPAGE) \
"$(DESTDIR)$(MANDIR)/man7/$(MANPAGE)"

uninstall: uninstall-modules uninstall-man

uninstall-modules:
@set -e; \
for module in $(MODULES); do \
dir="$(DESTDIR)$(MODULEDIR)/$$module"; \
$(RM) "$$dir/module_json.awk" "$$dir/$$module.awk"; \
$(RM) "$$dir/tnt-module.json"; \
$(RM) "$$dir/$$module.sh"; \
rmdir "$$dir" 2>/dev/null || true; \
done; \
rmdir "$(DESTDIR)$(MODULEDIR)" 2>/dev/null || true

uninstall-man:
$(RM) "$(DESTDIR)$(MANDIR)/man7/$(MANPAGE)"

check-modules:
@scripts/sync_module_json.sh --check
@scripts/check_modules.sh
Expand Down
108 changes: 0 additions & 108 deletions PERFORMANCE.md

This file was deleted.

Loading