Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
a175447
#561: Add requirements & design for native image
Nov 25, 2026
091dbc4
#561: Build native image
Nov 25, 2026
1e5286c
Fix self-tracing integration test
Nov 25, 2026
93fb6f2
Fix requirement tracing
Nov 25, 2026
84279c7
Fix CI build with javadoc
Nov 25, 2026
8eb8b76
Fix ossindex build
Nov 25, 2026
e3e9eb8
Fix native image for Windows by adding charsets.
Nov 25, 2026
4c6d3bb
Skip ossindex for native image build
Nov 25, 2026
c4b1fc3
Fix deprecation warnings in setup-java action
Nov 25, 2026
43474ce
Fix zizmor linter warnings
Nov 25, 2026
da62dc0
Use bld artifact type for build scripts
Nov 25, 2026
1decd3b
Pin graalvm action version in CI build
Nov 25, 2026
758cb69
Fix selftrace-test
Nov 25, 2026
8743e0c
Configure formatter for native-image module
Nov 25, 2026
4bf68ab
Simplify native image integration test
Nov 25, 2026
fb43133
Remove unnecessary JDK 17 from CI
Nov 25, 2026
88c04b2
Combine native image build into a single mvn call
Nov 25, 2026
f27891f
Upgrade to latest GraalVM
Nov 25, 2026
92b5888
Apply batched suggestions from code review
kaklakariada Nov 25, 2026
a3434b3
Apply batched suggestions from code review
kaklakariada Nov 25, 2026
6942af0
Add comment to release script
Nov 25, 2026
1a0431d
Merge branch 'feature/#561_native-images' of https://github.com/itsal…
Nov 25, 2026
0b96d9c
Fix release precondition job name
Nov 25, 2026
46658f4
Implement review findings in developer guide
Nov 25, 2026
85a389b
Prepare release
Nov 25, 2026
b529b0f
Implement review findings
Nov 25, 2026
01aff48
Configure GraalVM as Java Toolchain
Nov 25, 2026
38c8376
Add GC option for native image
Nov 25, 2026
9103661
Fix unit test under macOS
Nov 25, 2026
f5c04fb
Fix windows native image build
Nov 25, 2026
d38337e
Revert "Fix unit test under macOS"
Nov 25, 2026
53c8ed2
Upgrade macos runner
Nov 25, 2026
ce93501
Fix sonar warnings
Nov 25, 2026
e22b103
Fix graalvm compiler options
Nov 25, 2026
a0d6541
Adapt macos tests
Nov 25, 2026
cac43e0
Cancel in-progress concurrent builds
Nov 25, 2026
e38d7ae
Upgrade github runners
Nov 26, 2026
a29a537
Update release date
Nov 26, 2026
dc39e45
Use assertAll in integration tests
Nov 26, 2026
85576a1
Cleanup native image pom
Nov 26, 2026
cb3806b
Implement review finding: add final
Nov 26, 2026
a53bf34
Correct OpenFastTrace Language Server links and credits
redcatbear Nov 26, 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
81 changes: 79 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ jobs:
distribution: temurin
java-version: 17
server-id: ossindex
server-username: OSSINDEX_USERNAME
server-password: OSSINDEX_TOKEN
server-username-env-var: OSSINDEX_USERNAME
server-password-env-var: OSSINDEX_TOKEN
- name: Ossindex
run: |
mvn -T 1C --errors --batch-mode test-compile \
Expand All @@ -139,12 +139,89 @@ jobs:
OSSINDEX_USERNAME: ${{ secrets.OSSINDEX_USERNAME }}
OSSINDEX_TOKEN: ${{ secrets.OSSINDEX_TOKEN }}

native-image:
# [bld->dsn~cli.native-executable~1]
# [bld->dsn~cli.native-executable.support-built-in-plugins~1]
permissions:
contents: read
strategy:
fail-fast: false
matrix:
include:
- target: linux-x64
runner: ubuntu-26.04
output: openfasttrace-linux-x64
- target: linux-arm64
runner: ubuntu-26.04-arm
output: openfasttrace-linux-arm64
- target: macos-arm64
runner: macos-26
output: openfasttrace-macos-arm64
- target: windows-x64
runner: windows-2025
output: openfasttrace-windows-x64
runs-on: ${{ matrix.runner }}
defaults:
run:
shell: bash
name: Native image ${{ matrix.target }}
concurrency:
group: ${{ github.workflow }}-native-${{ github.ref }}-${{ matrix.target }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: false

- uses: graalvm/setup-graalvm@60e76998d25690099182b796e99b8804da582d90 # v1.6.10
name: Set up GraalVM 25
with:
version: '25.6'
distribution: graalvm
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: maven

- name: Configure GraalVM 25 Maven toolchain
run: |
mkdir -p "$HOME/.m2"
cat > "$HOME/.m2/toolchains.xml" <<EOF
<toolchains xmlns="http://maven.apache.org/TOOLCHAINS/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/TOOLCHAINS/1.1.0 https://maven.apache.org/xsd/toolchains-1.1.0.xsd">
<toolchain>
<type>jdk</type>
<provides>
<version>25</version>
</provides>
<configuration>
<jdkHome>${JAVA_HOME}</jdkHome>
</configuration>
</toolchain>
</toolchains>
EOF

- name: Build and test native image with Maven
run: >-
mvn --batch-mode -T 1C -Pnative-image -pl native-image -am verify
-Dossindex.skip=true
-Djava.version=25
-Dnative.image.name=${{ matrix.output }}

- name: Upload native image
uses: actions/upload-artifact@v7
with:
name: openfasttrace-native-${{ matrix.target }}
path: native-image/target/${{ matrix.output }}*
if-no-files-found: error

build:
permissions:
contents: read
needs:
- matrix-build
- ossindex
- native-image
runs-on: ubuntu-slim
steps:
- run: echo "Build successful"
17 changes: 16 additions & 1 deletion .github/workflows/github_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@ readonly artifact_checksum_path="${artifact_path}.sha256"
calculate_checksum "$sbom_path"
readonly sbom_checksum_path="${sbom_path}.sha256"

shopt -s nullglob
native_assets=("$base_dir"/native-image/target/openfasttrace-*)
# Expect binaries for Linux x86 + ARM, macOS ARM, Windows x86
if [[ "${#native_assets[@]}" -ne 4 ]]; then
Comment thread
kaklakariada marked this conversation as resolved.
Resolved
echo "Expected 4 native images in native-image/target, found ${#native_assets[@]}" >&2
exit 1
fi
native_release_assets=()
for native_asset in "${native_assets[@]}"; do
calculate_checksum "$native_asset"
native_release_assets+=("$native_asset" "${native_asset}.sha256")
done


# Create GitHub release
readonly changes_file="$base_dir/doc/changes/changes_${project_version}.md"
Expand All @@ -45,8 +58,10 @@ echo "Artifact file: $artifact_path"
echo "Artifact checksum: $artifact_checksum_path"
echo "SBOM file : $sbom_path"
echo "SBOM checksum: $sbom_checksum_path"
printf 'Native asset : %s\n' "${native_assets[@]}"

release_url=$(gh release create --latest --title "$title" --notes "$notes" --target main "$tag" \
"$artifact_path" "$artifact_checksum_path" "$sbom_path" "$sbom_checksum_path")
"$artifact_path" "$artifact_checksum_path" "$sbom_path" "$sbom_checksum_path" \
"${native_release_assets[@]}")
readonly release_url
echo "Release URL: $release_url"
99 changes: 97 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,95 @@ on:
default: true

jobs:
validate-release-preconditions:
runs-on: ubuntu-slim
permissions:
contents: read
steps:
- name: Fail if not running on main branch
if: ${{ github.ref != 'refs/heads/main' }}
run: |
echo "Not running on main branch, github.ref is ${GITHUB_REF}. Please start this workflow only on main."
exit 1
env:
GITHUB_REF: ${{ github.ref }}

native-images:
needs: validate-release-preconditions
permissions:
contents: read
strategy:
fail-fast: false
matrix:
include:
- target: linux-x64
runner: ubuntu-26.04
output: openfasttrace-linux-x64
- target: linux-arm64
runner: ubuntu-26.04-arm
output: openfasttrace-linux-arm64
- target: macos-arm64
runner: macos-26
output: openfasttrace-macos-arm64
- target: windows-x64
runner: windows-2025
output: openfasttrace-windows-x64
runs-on: ${{ matrix.runner }}
defaults:
run:
shell: bash
name: Native image ${{ matrix.target }}
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: false

- uses: graalvm/setup-graalvm@60e76998d25690099182b796e99b8804da582d90 # v1.6.10
name: Set up GraalVM 25
with:
version: '25.6'
distribution: graalvm
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: maven

- name: Configure GraalVM 25 Maven toolchain
run: |
mkdir -p "$HOME/.m2"
cat > "$HOME/.m2/toolchains.xml" <<EOF
<toolchains xmlns="http://maven.apache.org/TOOLCHAINS/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/TOOLCHAINS/1.1.0 https://maven.apache.org/xsd/toolchains-1.1.0.xsd">
<toolchain>
<type>jdk</type>
<provides>
<version>25</version>
</provides>
<configuration>
<jdkHome>${JAVA_HOME}</jdkHome>
</configuration>
</toolchain>
</toolchains>
EOF

- name: Build and test native image with Maven
run: >-
mvn --batch-mode -T 1C -Pnative-image -pl native-image -am verify
-Dossindex.skip=true
-Djava.version=25
-Dnative.image.name=${{ matrix.output }}

- name: Upload native image
uses: actions/upload-artifact@v7
with:
name: openfasttrace-native-${{ matrix.target }}
path: native-image/target/${{ matrix.output }}*
if-no-files-found: error

release:
needs:
- validate-release-preconditions
- native-images
runs-on: ubuntu-latest
defaults:
run:
Expand Down Expand Up @@ -46,14 +134,21 @@ jobs:
java-version: 17
cache: "maven"
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
server-username-env-var: MAVEN_USERNAME
server-password-env-var: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Build
run: mvn --batch-mode -T 1C clean install -Dossindex.skip=true

- name: Download native images
uses: actions/download-artifact@v7
with:
pattern: openfasttrace-native-*
path: native-image/target
merge-multiple: true

- name: List secret GPG keys
run: gpg --list-secret-keys

Expand Down
3 changes: 2 additions & 1 deletion doc/changes/changes_4.12.0.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OpenFastTrace 4.12.0, released 2026-10-??
# OpenFastTrace 4.12.0, released 2026-11-26

Code name: Syntax usability and JSX and TSX tag importer

Expand All @@ -12,3 +12,4 @@ The source tag importer now supports JSX (`.jsx`) and TSX (`.tsx`) source files,

* #638: Allow hash mark in addition to tilde as revision separator
* #647: Add support for JSX and TSX in the source tag importer
* #561: Build and publish native binaries for Linux (x64 and arm64), Windows (x64) and macOS (arm64)
20 changes: 17 additions & 3 deletions doc/developer_guide/developer_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,20 @@ Specify test class via system property `it.test` and module via command line opt
mvn -Dit.test=CliStarterIT failsafe:integration-test -projects product
```

### Build and Test a Native Executable

Native builds use GraalVM Native Image 25. Set `GRAALVM_HOME` to a GraalVM 25 installation that includes `native-image`:

```sh
export GRAALVM_HOME=/path/to/graalvm-jdk-25
export PATH="$GRAALVM_HOME/bin:$PATH"
mvn --batch-mode -T 1C -Pnative-image -pl native-image -am verify
```

The Maven build selects the `native-image` module and builds the executable in `native-image/target/openfasttrace`, then runs JUnit smoke tests against it. To set a platform-specific name, pass `-Dnative.image.name=openfasttrace-linux-x64` to the command.

Build and test on the target operating system and architecture. Native executables include plugins from the main OpenFastTrace project.

### Check for Dependency Updates

```sh
Expand Down Expand Up @@ -365,9 +379,9 @@ Legend:

### Why Two Parent POMs?

As you can see in the table above, not all modules are intended to be deployed on Maven Central. The distinction is made by using two parent POMs.
As you can see in the table above, not all modules are intended to be deployed on Maven Central. The distinction is made by using two parent POMs.

The base POM is `openfasttrace-parent`, it mainly contains common dependencies and build configuration. On top of that, `openfasttrace-mc-deployable-parent` adds signing and Maven central deployment.
The base POM is `openfasttrace-parent`, it mainly contains common dependencies and build configuration. On top of that, `openfasttrace-mc-deployable-parent` adds signing and Maven central deployment.

This structure ensures that only user-facing components are published to Maven Central while keeping internal development tools and build infrastructure private.

Expand All @@ -387,7 +401,7 @@ Ensure that neither `testutil` nor any parent module is included.

### Verify Deployment Preconditions

Configure Maven Central credentials in `~/.m2/settings.xml`:
Configure Maven Central credentials in `~/.m2/settings.xml`:

```xml
<settings>
Expand Down
37 changes: 37 additions & 0 deletions doc/spec/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -1472,6 +1472,30 @@ Covers:

Needs: impl

### Native Command Line Executables
`dsn~cli.native-executable~1`

The `native-image` Maven module builds native command line executables from the product JAR using the GraalVM Native Build Tools Maven plugin. The `native-image` Maven profile enables native compilation and smoke tests. Each executable is built and tested on a runner matching its target operating system and architecture. Native Image reachability metadata preserves the CLI's reflective argument setters.

Native executables support built-in providers only.

Covers:

* [`req~cli.native-executable~1`](system_requirements.md#native-command-line-executables)

Needs: itest, bld

#### Native Binaries Include Plugins
`dsn~cli.native-executable.support-built-in-plugins~1`

Native Binaries preserves the service-provider metadata to support all built-in importers, exporters, and reporters.

Covers:

* [`req~cli.native-executable~1`](system_requirements.md#native-command-line-executables)

Needs: itest, bld

# Quality Requirements

See [Quality Requirements](design/quality_requirements.md).
Expand Down Expand Up @@ -1523,6 +1547,19 @@ Authors of importers need to be able to rely on these cleanups being done centra

Cleanup in every importer individually. That was the case up to and including OFT 3.7.1, which turned out to make the importer more complex than necessary.

## Should Native Binaries Load Plugins at Runtime?
`dsn~cli.native-executable.does-not-support-loading-plugins-at-runtime~1`

OFT allows loading third party plugins from JAR files in `~/.oft/plugins`.

### Decision

No. This would require a separate JVM or native plugins. This is out-of-scope for now.

Comment:

This is a negative requirement that does not need to be tested and we terminate it here.

# Bibliography

The following documents or are referenced in this specification.
Expand Down
11 changes: 11 additions & 0 deletions doc/spec/system_requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -1135,6 +1135,17 @@ Covers:

Needs: dsn

#### Native Command Line Executables
`req~cli.native-executable~1`

OpenFastTrace provides native command line executables for supported Linux, macOS, and Windows architectures. The native executables include all built-in importers, exporters, and reporters.

Covers:

* [feat~command-line-interface~1](#command-line-interface)

Needs: dsn

### Third Party Plugins

#### Loading Plugins
Expand Down
11 changes: 11 additions & 0 deletions doc/user_guide/installation/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ nav_order: 1

There are several ways to install OpenFastTrace on Linux, depending on your distribution and preference.

### Native Executable

Download `openfasttrace-linux-x64` or `openfasttrace-linux-arm64` from the [GitHub Releases](https://github.com/itsallcode/openfasttrace/releases) page. The native executable does not require Java. Make it executable and run it:

```bash
chmod +x openfasttrace-linux-x64
./openfasttrace-linux-x64 --help
```

Use the executable JAR below when you need third-party Java plugin JARs.

### Package Manager (APT - Debian, Ubuntu, etc.)

For Debian-based systems, we provide an APT repository. This is the recommended way to keep OFT up to date.
Expand Down
Loading
Loading