Skip to content
Draft
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
27 changes: 0 additions & 27 deletions .classpath

This file was deleted.

16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
# Two trailing spaces are a Markdown line break
trim_trailing_whitespace = false

[*.{cmd,bat}]
end_of_line = crlf
7 changes: 0 additions & 7 deletions .externalToolBuilders/org.eclipse.jdt.core.javabuilder.launch

This file was deleted.

This file was deleted.

3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* text=auto
*.cmd text eol=crlf
*.svg text eol=lf
33 changes: 33 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
version: 2
updates:
- package-ecosystem: maven
directory: /
schedule:
interval: weekly
groups:
maven:
patterns:
- "*"

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
groups:
github-actions:
patterns:
- "*"

- package-ecosystem: npm
directory: /
schedule:
interval: weekly
groups:
npm:
patterns:
- "*"

- package-ecosystem: docker
directory: /docker
schedule:
interval: weekly
83 changes: 83 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Build

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
build:
name: Render HTML and PDF
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
show-progress: false

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1

- name: Build the build-environment image
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: docker
load: true
tags: oft-arch-builder:latest
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Cache Maven repository and wrapper distribution
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.m2
key: maven-${{ hashFiles('pom.xml', '.mvn/wrapper/maven-wrapper.properties') }}
restore-keys: |
maven-

- name: Render HTML and package archives
run: >
docker run --rm
-v "$PWD:/workspace"
-v "$HOME/.m2:/root/.m2"
oft-arch-builder
./mvnw -B -ntp clean package

- name: Render PDF
run: >
docker run --rm
-v "$PWD:/workspace"
-v "$HOME/.m2:/root/.m2"
oft-arch-builder
./mvnw -B -ntp compile -P render-pdf

- name: Check that the committed diagrams are up to date
# The build renders the PlantUML sources to src/doc/uml.
# If anything changed, the SVGs in git are stale: re-run "./mvnw generate-resources" and commit the result.
run: |
if [ -n "$(git status --porcelain -- src/doc/uml)" ]; then
echo "::error::The rendered diagrams in src/doc/uml are out of date. Run './mvnw generate-resources' and commit the changes."
git status --porcelain -- src/doc/uml
git diff --stat -- src/doc/uml
exit 1
fi

- name: Upload rendered documents
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: documents
path: |
target/*.html
target/*.pdf
target/*.zip
target/*.tar.gz
if-no-files-found: error
40 changes: 40 additions & 0 deletions .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Check links

on:
push:
branches:
- main
pull_request:
schedule:
# Once a month, to notice external links that died
- cron: "0 9 1 * *"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
linkspector:
name: linkspector
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
show-progress: false
- name: Set up Node.js
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24
- name: Allow the Chromium sandbox
# linkspector uses a headless Chromium via Puppeteer. Ubuntu 24.04 restricts unprivileged user
# namespaces via AppArmor, which makes Chromium fail with "No usable sandbox".
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
- name: Run linkspector
# Runs the CLI directly instead of umbrelladocs/action-linkspector, because the organization's Actions policy
# only allows actions from GitHub and verified creators
run: npx --yes @umbrelladocs/linkspector@0.5.6 check -c .linkspector.yml
99 changes: 99 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Lint

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
markdownlint:
name: markdownlint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
show-progress: false
- name: Set up Node.js
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24
cache: npm
- name: Install dependencies
run: npm ci
- name: Run markdownlint
run: npm run markdownlint

changelog:
name: CHANGELOG.md (heylogs)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
show-progress: false
- name: Set up Java
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
with:
distribution: temurin
java-version: 21
- name: Cache JBang
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.jbang
key: jbang-heylogs-${{ hashFiles('.github/workflows/lint.yml') }}
restore-keys: |
jbang-heylogs-
- name: Install JBang
# The jbangdev/jbang-action is not allowed by the organization's Actions policy, so install JBang directly
run: curl -Ls https://sh.jbang.dev | bash -s - app setup
- name: Check CHANGELOG.md
run: ~/.jbang/bin/jbang com.github.nbbrd.heylogs:heylogs-cli:0.19.1:bin check --format github-actions CHANGELOG.md

textlint:
name: textlint
runs-on: ubuntu-latest
# Spelling hints only, do not block the build
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
show-progress: false
- name: Set up Node.js
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24
cache: npm
- name: Install dependencies
run: npm ci
- name: Run textlint
run: npm run textlint

vale:
name: Vale
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
show-progress: false
- name: Run Vale
uses: vale-cli/vale-action@518a9136acc6e6668ce7c00d367051e0941e87ff # v3.0.0
# Style hints only, do not block the build
continue-on-error: true
with:
fail_on_error: false
18 changes: 17 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
# Maven build output
/target/
**/*.md.html

# Local Markdown previews
**/*.md.html

# Node.js (textlint)
/node_modules/

# Vale downloads its style packages here (see .vale.ini)
/.github/styles/

# IDEs
/.idea/
/.vscode/
/.project
/.classpath
/.settings/
25 changes: 25 additions & 0 deletions .linkspector.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Configuration for linkspector (https://github.com/UmbrellaDocs/linkspector)
dirs:
- .
excludedDirs:
- ./node_modules
- ./target
- ./.github/styles
useGitIgnore: true
modifiedFilesOnly: false
ignorePatterns:
# gnu.org throttles automated requests, which leads to timeouts
- pattern: "^https?://(www\\.)?gnu\\.org"
# Example domains used in the specification
- pattern: "^https?://(www\\.)?example\\.(com|org|net)"
# localhost links
- pattern: "^https?://localhost"
aliveStatusCodes:
- 200
- 204
- 301
- 302
- 307
- 308
- 403
- 429
5 changes: 5 additions & 0 deletions .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Options for markdownlint-cli2, the rule configuration is in .markdownlint.yml
ignores:
- "node_modules/**"
# Vale style packages downloaded by "vale sync"
- ".github/styles/**"
19 changes: 19 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Configuration for markdownlint (https://github.com/DavidAnson/markdownlint)
default: true

# Long lines are fine: the specification is written one sentence per line
MD013: false

# Consecutive "> OFT:" hints are intentionally separate blockquotes
MD028: false

# Pandoc needs a little inline HTML (e.g., <div> wrappers for figures)
MD033:
allowed_elements: ['a', 'div', 'figure', 'figcaption', 'img', 'kbd', 'p', 'span']

# Specification files start with a license header comment, and sub-chapters start with h2
MD041: false

# CHANGELOG.md repeats "Added", "Changed", "Fixed" under each release (Keep a Changelog)
MD024:
siblings_only: true
Loading
Loading