Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
01f0070
feat: refactor, added documentation
Mqxx Jan 21, 2026
012a18d
fix: refactor build and publish workflows
Mqxx Jan 21, 2026
2df8bee
Update publish_jsr.yml
Mqxx Jan 22, 2026
e0f10fc
fix: renamed worflow files
Mqxx Jan 22, 2026
33c2765
fix: publish on separate branch
Mqxx Jan 22, 2026
af332b7
feat: Also publish jsr.json
Mqxx Jan 22, 2026
59810ec
feat: Refactor
Mqxx Jan 22, 2026
f2c0c36
Update build_binary.yml
Mqxx Jan 22, 2026
09d971e
Update build_binary.yml
Mqxx Jan 22, 2026
e43bf63
Update build_binary.yml
Mqxx Jan 22, 2026
e0c3d52
Update jsr.json.in
Mqxx Jan 22, 2026
25972c3
Update build_binary.yml
Mqxx Jan 22, 2026
4be407f
Update jsr.json.in
Mqxx Jan 22, 2026
df84c17
Update build_binary.yml
Mqxx Jan 22, 2026
b2d24cf
Update embed_binary.sh
Mqxx Jan 22, 2026
ad68ba2
Update embed_binary.sh
Mqxx Jan 22, 2026
ac43fe2
Update publish_jsr.yml
Mqxx Jan 22, 2026
d002eac
Update embed_binary.sh
Mqxx Jan 22, 2026
6a2c112
fix: use sh instead of txt and source it
Mqxx Jan 22, 2026
a089bc0
fix: env
Mqxx Jan 22, 2026
a298763
Update publish_jsr.yml
Mqxx Jan 22, 2026
0d82a0d
Update build_binary.yml
Mqxx Jan 22, 2026
59f8213
fix: renamed
Mqxx Jan 22, 2026
3712b9b
Update publish_jsr.yml
Mqxx Jan 22, 2026
2fcc0f6
fix: refactor varaible naming
Mqxx Jan 22, 2026
0e3be99
fix: Permissions
Mqxx Jan 22, 2026
7f3405c
fix: Permissions
Mqxx Jan 22, 2026
e4c0e89
feat: Changed version generation
Mqxx Jan 22, 2026
94007b2
Update build_binary.yml
Mqxx Jan 22, 2026
7a543cb
Update build_binary.yml
Mqxx Jan 22, 2026
18611ae
Update build_binary.yml
Mqxx Jan 22, 2026
a88b9c2
Update build_binary.yml
Mqxx Jan 22, 2026
0b6ab38
Update build_binary.yml
Mqxx Jan 22, 2026
9c5a34c
Update CMakeLists.txt
Mqxx Jan 22, 2026
2e600e6
Update build_binary.yml
Mqxx Jan 22, 2026
dc7575c
Update build_binary.yml
Mqxx Jan 22, 2026
c2ea7a8
Update build_binary.yml
Mqxx Jan 22, 2026
796eb21
Update build_binary.yml
Mqxx Jan 22, 2026
48a4cdf
Update CMakeLists.txt
Mqxx Jan 22, 2026
20a1ee7
Update build_binary.yml
Mqxx Jan 22, 2026
57e78a6
Update build_binary.yml
Mqxx Jan 22, 2026
503fe12
Update publish_jsr.yml
Mqxx Jan 22, 2026
27a8407
Update publish_jsr.yml
Mqxx Jan 22, 2026
328b1cf
Update jsr.json
Mqxx Jan 22, 2026
d3a1f1b
Update CMakeLists.txt
Mqxx Jan 24, 2026
bf4c1a3
feat: Refactor file copy and fixed BINARY_FILE_NAME
Mqxx Jan 24, 2026
20e40ae
fix: added executable flag
Mqxx Jan 24, 2026
e1ba112
Update .github/workflows/build_binary.yml
Mqxx Jan 26, 2026
07e56b2
Update .github/workflows/build_binary.yml
Mqxx Jan 26, 2026
159c6de
Update jsr/jsr.json
Mqxx Jan 26, 2026
e6724eb
fix: changes from review
Mqxx Jan 26, 2026
7046b40
Update CMakeLists.txt
Mqxx Jan 26, 2026
013586a
Update README.md
Mqxx Jan 26, 2026
532733e
Update README.md
Mqxx Jan 26, 2026
432e6cc
Update build_binary.yml
Mqxx Jan 26, 2026
1028ec9
Update build_binary.yml
Mqxx Jan 26, 2026
4794ca7
Update publish_jsr.yml
Mqxx Jan 26, 2026
7c99ef3
Update README.md
Mqxx Jan 26, 2026
7a5a53a
Update build_binary.yml
Mqxx Jan 27, 2026
4d77426
Update build_binary.yml
Mqxx Jan 27, 2026
6f5e40c
Update build_binary.yml
Mqxx Jan 27, 2026
b026f9d
Update build_binary.yml
Mqxx Jan 27, 2026
b47c88e
Update build_binary.yml
Mqxx Jan 27, 2026
bfccf83
Update build_binary.yml
Mqxx Jan 27, 2026
65d6ff4
Update build_binary.yml
Mqxx Jan 27, 2026
3863380
Update build_binary.yml
Mqxx Jan 27, 2026
6df27b6
Update build_binary.yml
Mqxx Jan 27, 2026
c615997
Update build_binary.yml
Mqxx Jan 27, 2026
b547908
fix: quotes
Mqxx Jan 27, 2026
125211c
Update build_binary.yml
Mqxx Jan 27, 2026
4a2977e
Update README.md
Mqxx Jan 27, 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
55 changes: 0 additions & 55 deletions .github/workflows/build-deno-so.yml

This file was deleted.

85 changes: 85 additions & 0 deletions .github/workflows/build_binary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: 'Build Binary'
description: |
This workflow builds the binary files for Linux. The build binaries are stored as artifact
and may be reused by other workflows.

on:
push:
branches: [ 'main' ]
tags: [ '*' ]

pull_request:
branches: [ '*' ]

jobs:
build-binary:
name: 'Build binary'
runs-on: ubuntu-latest
steps:
- name: 'Checkout repository'
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: 'Setup GCC'
uses: egor-tensin/setup-gcc@v2
with:
version: '14'
platform: 'x64'

- name: 'Setup CMake'
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.31.x'

- name: 'Configure CMake'
env:
CXX: g++

run: |
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release

- name: 'Build'
id: 'build'
run: |
cmake --build build --config Release

. build/env.sh
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_OUTPUT

- name: 'Upload artifacts'
uses: actions/upload-artifact@v4
with:
name: libcpp_bindings_linux_x86_64
path: build/libcpp_bindings_linux.so*

- name: 'Check tag'
id: 'check-tag'
env:
PACKAGE_VERSION: ${{ steps.build.outputs.PACKAGE_VERSION }}

run: |
if [[ "$PACKAGE_VERSION" =~ ^(0|[1-9][[:digit:]]*)\.(0|[1-9][[:digit:]]*)\.(0|[1-9][[:digit:]]*)(-(alpha|rc|beta|experimental)\.[1-9][[:digit:]]*)?$ ]]; then
echo "Version \"$PACKAGE_VERSION\" is a valid package version."
echo "IS_VALID_PACKAGE_VERSION=true" >> $GITHUB_OUTPUT
else
echo "Version \"$PACKAGE_VERSION\" is not a valid package version."
echo "IS_VALID_PACKAGE_VERSION=false" >> $GITHUB_OUTPUT
fi

outputs:
package_version: ${{ steps.build.outputs.PACKAGE_VERSION }}
is_valid_package_version: ${{ steps.check-tag.outputs.IS_VALID_PACKAGE_VERSION }}

trigger-publish:
name: 'Trigger Publish'
needs: ['build-binary']
uses: ./.github/workflows/publish_jsr.yml
with:
publish: ${{ needs.build-binary.outputs.is_valid_package_version == 'true' }}
version: ${{ needs.build-binary.outputs.package_version }}
artifact-name: libcpp_bindings_linux_x86_64

permissions:
contents: read
id-token: write
File renamed without changes.
File renamed without changes.
73 changes: 0 additions & 73 deletions .github/workflows/publish-jsr.yml

This file was deleted.

75 changes: 75 additions & 0 deletions .github/workflows/publish_jsr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: 'Publish JSR'
description: |
This workflow serializes the build binary to Base64 and generates a JSON file with meta data about the file.
The file then gets published to JSR (@serial/cpp-bindings-linux).

on:
workflow_call:
inputs:
publish:
description: 'Whether to actually publish'
required: true
type: boolean

version:
description: 'Package version'
required: true
type: string

artifact-name:
description: 'Name of the artifact'
required: true
type: string

permissions:
contents: read
id-token: write

jobs:
publish-jsr:
runs-on: ubuntu-latest

steps:
- name: 'Checkout repository'
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: 'Setup Deno'
uses: denoland/setup-deno@v2
with:
deno-version: '2.x'

- name: 'Download artifact'
uses: actions/download-artifact@v4
with:
name: ${{ inputs.artifact-name }}
path: 'artifacts'

- name: 'Prepare files for JSR'
run: |
./jsr/scripts/copy_binary.sh \
./artifacts/libcpp_bindings_linux.so \
./jsr/bin/x86_64.so

./jsr/scripts/binary_to_json.sh \
./artifacts/libcpp_bindings_linux.so \
./jsr/bin/x86_64.json \
linux-x86_64

./jsr/scripts/set_version.sh \
jsr/jsr.json \
"${{ inputs.version }}"

- name: 'Publish package to JSR (normal)'
if: inputs.publish
working-directory: jsr
run: |
deno publish --allow-dirty

- name: 'Publish package to JSR (dry-run)'
if: ${{ !inputs.publish }}
working-directory: jsr
run: |
deno publish --allow-dirty --dry-run

10 changes: 2 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ include(cmake/CPM.cmake)
CPMAddPackage(
NAME cmake_git_versioning
GITHUB_REPOSITORY Katze719/cmake-git-versioning
GIT_TAG v1.0.1
GIT_TAG v1.1.0
)

# Include cmake-git-versioning module
Expand All @@ -23,13 +23,7 @@ project(
LANGUAGES CXX
)

# Generate JSR package metadata from the same git-derived version as the library.
# We generate into the build directory to avoid touching tracked files during normal local builds.
configure_file(
"${CMAKE_SOURCE_DIR}/jsr/package/jsr.json.in"
"${CMAKE_SOURCE_DIR}/jsr/package/jsr.json"
@ONLY
)
file(WRITE "${CMAKE_BINARY_DIR}/env.sh" "PACKAGE_VERSION=${GIT_DESCRIBE_NO_V}")

# Set C++ standard
set(CMAKE_CXX_STANDARD 23)
Expand Down
2 changes: 2 additions & 0 deletions jsr/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin/
!src/bin/
Loading