9 Commits
Author SHA1 Message Date
Daniel SamsonandClaude Opus 4.5 461ebe44ab fix(native): add -march=compatibility for broader CPU support
Windows binary was crashing with STATUS_ILLEGAL_INSTRUCTION on x64
emulated environments (like Parallels on ARM Macs). GraalVM native-image
by default uses CPU features detected at build time.

Adding -march=compatibility ensures the binary uses only baseline
x86-64 instructions that work across all x64 CPUs and emulators.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 00:10:28 +00:00
Daniel SamsonandClaude Opus 4.5 116f1fbb59 fix(native): add Job and Config classes to reflection config
Jackson deserialization in native binary fails when processing job
status responses. Added missing classes to reflect-config.json:
- Job, JobManifest, JobState, ResourceUsage
- Config, ServiceConfig, StorageConfig, JobsConfig, CleanupConfig
- Collection types for IPC payloads

Tested locally with native binary:
- barn run, status, describe, usage, kill, clean
- barn service status, config show, autocompletion

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 00:04:03 +00:00
Daniel SamsonandClaude Opus 4.5 53f0991f6f fix: add Jackson reflection config for native-image
IPC communication was failing in native binary because Jackson
couldn't deserialize IpcMessage and related classes without
reflection configuration.

Added reflect-config.json with all IPC classes.

Bumped version to 0.1.2.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 23:46:34 +00:00
Daniel SamsonandClaude Opus 4.5 05fb4c412b test: fix version tests to accept any semver
Changed hardcoded version checks to regex pattern matching
so tests don't break on version bumps.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 23:34:41 +00:00
Daniel SamsonandClaude Opus 4.5 d6a27aab3b fix: add picocli-codegen for GraalVM native-image support
The native binary was crashing on startup because picocli's reflection
metadata wasn't being generated for GraalVM native-image.

Added picocli-codegen annotation processor to generate the required
reflect-config.json at compile time.

Bumped version to 0.1.1.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 23:28:36 +00:00
Daniel SamsonandClaude Opus 4.5 13655f5a54 docs: fix Windows install path
Use %LOCALAPPDATA%\Programs\barn instead of System32.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 23:26:07 +00:00
Daniel SamsonandClaude Opus 4.5 165e363084 docs: add installation instructions to README
Added installation instructions for:
- macOS (Homebrew and manual download)
- Linux (x64 and ARM64)
- Windows (PowerShell download)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 23:22:32 +00:00
Daniel SamsonandClaude Opus 4.5 167292165a ci: simplify build workflow
Build workflow now:
- Triggers on PRs and pushes to main
- Runs on single OS (ubuntu-latest)
- Just verifies code compiles and tests pass

Release workflow (on tags) still builds for all platforms.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 23:16:42 +00:00
Daniel SamsonandClaude Opus 4.5 436d8ee840 ci: simplify build workflow to PRs only
- Build workflow now only triggers on pull requests
- Removed native image builds from build workflow
- Native builds are only done in release workflow on tag push

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 23:14:03 +00:00
8 changed files with 273 additions and 83 deletions

No files matched your search

+2 -79
View File
@@ -7,7 +7,7 @@ on:
branches: [main] branches: [main]
jobs: jobs:
test: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -19,82 +19,5 @@ jobs:
distribution: 'temurin' distribution: 'temurin'
cache: 'maven' cache: 'maven'
- name: Run tests - name: Build and test
run: mvn verify -Dspotbugs.skip=true -Dpmd.skip=true run: mvn verify -Dspotbugs.skip=true -Dpmd.skip=true
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: target/surefire-reports/
build-jar:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: 'maven'
- name: Build JAR
run: mvn package -DskipTests -Dspotbugs.skip=true -Dpmd.skip=true
- name: Upload JAR
uses: actions/upload-artifact@v4
with:
name: barn-jar
path: target/barn-*.jar
retention-days: 7
build-native:
needs: test
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
artifact: barn-linux-x64
- os: ubuntu-24.04-arm
artifact: barn-linux-arm64
- os: macos-latest
artifact: barn-macos-arm64
- os: windows-latest
artifact: barn-windows-x64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up GraalVM
uses: graalvm/setup-graalvm@v1
with:
java-version: '21'
distribution: 'graalvm'
cache: 'maven'
- name: Build native image (Unix)
if: runner.os != 'Windows'
run: |
mvn package -Pnative -DskipTests -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true
mv target/barn target/${{ matrix.artifact }}
- name: Build native image (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
mvn package -Pnative -DskipTests "-Dspotbugs.skip=true" "-Dpmd.skip=true" "-Dcheckstyle.skip=true"
Move-Item -Path "target\barn.exe" -Destination "target\${{ matrix.artifact }}.exe" -Force
Get-ChildItem target\*.exe
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: target/${{ matrix.artifact }}*
retention-days: 7
+12
View File
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/), The format is based on [Keep a Changelog](https://keepachangelog.com/),
and this project adheres to [Semantic Versioning](https://semver.org/). and this project adheres to [Semantic Versioning](https://semver.org/).
## [0.1.2] - 2026-01-21
### Fixed
- IPC communication fails in native binary due to missing Jackson reflection config
## [0.1.1] - 2026-01-21
### Fixed
- Native binary crashes on startup due to missing picocli reflection config
## [0.1.0] - 2026-01-21 ## [0.1.0] - 2026-01-21
### Added ### Added
@@ -22,4 +32,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
- Jobs that fail to start now properly transition to FAILED state - Jobs that fail to start now properly transition to FAILED state
- Startup errors are written to stderr.log for visibility - Startup errors are written to stderr.log for visibility
[0.1.2]: https://github.com/samson-media/barn/releases/tag/v0.1.2
[0.1.1]: https://github.com/samson-media/barn/releases/tag/v0.1.1
[0.1.0]: https://github.com/samson-media/barn/releases/tag/v0.1.0 [0.1.0]: https://github.com/samson-media/barn/releases/tag/v0.1.0
+57
View File
@@ -40,6 +40,63 @@ This project treats FFmpeg jobs as **first-class managed units of work**, not sh
--- ---
## Installation
### macOS
**Homebrew (recommended):**
```bash
brew install samson-media/tap/barn
```
**Manual download:**
```bash
curl -L -o barn https://github.com/samson-media/barn/releases/latest/download/barn-macos-arm64
chmod +x barn
sudo mv barn /usr/local/bin/
```
### Linux
**Download the binary:**
```bash
# For x64
curl -L -o barn https://github.com/samson-media/barn/releases/latest/download/barn-linux-x64
# For ARM64
curl -L -o barn https://github.com/samson-media/barn/releases/latest/download/barn-linux-arm64
chmod +x barn
sudo mv barn /usr/local/bin/
```
### Windows
**PowerShell (recommended):**
```powershell
# Create install directory
New-Item -ItemType Directory -Force -Path "$env:LOCALAPPDATA\Programs\barn"
# Download
Invoke-WebRequest -Uri "https://github.com/samson-media/barn/releases/latest/download/barn-windows-x64.exe" -OutFile "$env:LOCALAPPDATA\Programs\barn\barn.exe"
# Add to PATH (current user)
$path = [Environment]::GetEnvironmentVariable("Path", "User")
if ($path -notlike "*$env:LOCALAPPDATA\Programs\barn*") {
[Environment]::SetEnvironmentVariable("Path", "$path;$env:LOCALAPPDATA\Programs\barn", "User")
}
```
Restart your terminal after installation.
### Verify Installation
```bash
barn --version
```
---
## Barn command ## Barn command
This project creates a simple CLI commandlet with sub-comands. This project creates a simple CLI commandlet with sub-comands.
+12 -1
View File
@@ -6,7 +6,7 @@
<groupId>com.samsonmedia</groupId> <groupId>com.samsonmedia</groupId>
<artifactId>barn</artifactId> <artifactId>barn</artifactId>
<version>0.1.0</version> <version>0.1.2</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>Barn</name> <name>Barn</name>
@@ -135,6 +135,16 @@
<arg>-Xlint:-processing</arg> <arg>-Xlint:-processing</arg>
<arg>-Werror</arg> <arg>-Werror</arg>
</compilerArgs> </compilerArgs>
<annotationProcessorPaths>
<path>
<groupId>info.picocli</groupId>
<artifactId>picocli-codegen</artifactId>
<version>${picocli.version}</version>
</path>
</annotationProcessorPaths>
<compilerArgs combine.children="append">
<arg>-Aproject=${project.groupId}/${project.artifactId}</arg>
</compilerArgs>
</configuration> </configuration>
</plugin> </plugin>
@@ -383,6 +393,7 @@
<buildArg>--no-fallback</buildArg> <buildArg>--no-fallback</buildArg>
<buildArg>-H:+ReportExceptionStackTraces</buildArg> <buildArg>-H:+ReportExceptionStackTraces</buildArg>
<buildArg>--enable-url-protocols=https</buildArg> <buildArg>--enable-url-protocols=https</buildArg>
<buildArg>-march=compatibility</buildArg>
</buildArgs> </buildArgs>
</configuration> </configuration>
</plugin> </plugin>
@@ -13,7 +13,7 @@ import picocli.CommandLine.Spec;
@Command( @Command(
name = "barn", name = "barn",
mixinStandardHelpOptions = true, mixinStandardHelpOptions = true,
version = "barn 0.1.0-SNAPSHOT", version = "barn 0.1.2",
description = "Cross-platform job daemon for media processing", description = "Cross-platform job daemon for media processing",
subcommands = { subcommands = {
RunCommand.class, RunCommand.class,
@@ -0,0 +1,187 @@
[
{
"name": "com.samsonmedia.barn.ipc.IpcMessage",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "com.samsonmedia.barn.ipc.IpcRequest$RunJob",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "com.samsonmedia.barn.ipc.IpcRequest$GetStatus",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "com.samsonmedia.barn.ipc.IpcRequest$GetJob",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "com.samsonmedia.barn.ipc.IpcRequest$KillJob",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "com.samsonmedia.barn.ipc.IpcRequest$CleanJobs",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "com.samsonmedia.barn.ipc.IpcRequest$GetServiceStatus",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "com.samsonmedia.barn.ipc.IpcRequest$Shutdown",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "com.samsonmedia.barn.ipc.IpcRequest$Reload",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "com.samsonmedia.barn.ipc.IpcResponse$Ok",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "com.samsonmedia.barn.ipc.IpcResponse$Error",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "com.samsonmedia.barn.jobs.Job",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "com.samsonmedia.barn.jobs.JobManifest",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "com.samsonmedia.barn.state.JobState",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "com.samsonmedia.barn.execution.ResourceUsage",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "com.samsonmedia.barn.config.Config",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "com.samsonmedia.barn.config.ServiceConfig",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "com.samsonmedia.barn.config.StorageConfig",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "com.samsonmedia.barn.config.JobsConfig",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "com.samsonmedia.barn.config.CleanupConfig",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "java.util.LinkedHashMap",
"allDeclaredConstructors": true,
"allPublicConstructors": true
},
{
"name": "java.util.HashMap",
"allDeclaredConstructors": true,
"allPublicConstructors": true
},
{
"name": "java.util.ArrayList",
"allDeclaredConstructors": true,
"allPublicConstructors": true
},
{
"name": "java.util.ImmutableCollections$ListN",
"allDeclaredConstructors": true,
"allPublicConstructors": true
},
{
"name": "java.util.ImmutableCollections$List12",
"allDeclaredConstructors": true,
"allPublicConstructors": true
}
]
@@ -86,6 +86,6 @@ class MainTest {
// Assert // Assert
String output = outContent.toString(); String output = outContent.toString();
assertThat(output).contains("barn"); assertThat(output).contains("barn");
assertThat(output).contains("0.1.0"); assertThat(output).containsPattern("\\d+\\.\\d+\\.\\d+");
} }
} }
@@ -81,7 +81,7 @@ class BarnCommandTest {
// Assert // Assert
String output = outWriter.toString(); String output = outWriter.toString();
assertThat(output).contains("0.1.0"); assertThat(output).containsPattern("\\d+\\.\\d+\\.\\d+");
} }
@Test @Test