Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
167 commits
Select commit Hold shift + click to select a range
93b9a29
c library
azahnen Oct 11, 2024
bb8b6aa
c library
azahnen Oct 11, 2024
00bd7d9
js lib
azahnen Oct 11, 2024
326f248
fix c header
azahnen Oct 11, 2024
79c2aae
fix build
azahnen Oct 11, 2024
d273774
fix build
azahnen Oct 11, 2024
7dbfb45
fix build
azahnen Oct 11, 2024
77ef61d
fix build
azahnen Oct 12, 2024
d41b764
fix build
azahnen Oct 12, 2024
20f1073
fix build
azahnen Oct 12, 2024
b39c984
fix build
azahnen Oct 12, 2024
ec7f125
fix build
azahnen Oct 12, 2024
0f928cd
refactor go
azahnen Oct 12, 2024
4d2c268
refactor java
azahnen Oct 12, 2024
906c215
refactor go
azahnen Oct 13, 2024
76e64a5
fix build
azahnen Oct 13, 2024
7f71317
fix build
azahnen Oct 13, 2024
d06c044
fix build
azahnen Oct 13, 2024
0e80f69
fix build
azahnen Oct 13, 2024
fcddab7
fix build
azahnen Oct 13, 2024
8eb6bea
fix build
azahnen Oct 13, 2024
49466f5
refactor build
azahnen Oct 13, 2024
442b945
refactor build
azahnen Oct 13, 2024
0b27459
refactor build
azahnen Oct 13, 2024
2ac8c93
refactor build
azahnen Oct 13, 2024
f79ea7e
refactor build
azahnen Oct 13, 2024
c235abc
refactor build
azahnen Oct 14, 2024
432a1e5
refactor build
azahnen Oct 14, 2024
6cf7c2c
refactor build
azahnen Oct 14, 2024
13b9759
refactor build
azahnen Oct 14, 2024
41ed9b1
refactor build
azahnen Oct 14, 2024
991e67a
fix build
azahnen Oct 14, 2024
e01a0b7
fix build
azahnen Oct 14, 2024
701a9b4
fix build
azahnen Oct 14, 2024
2d9b574
refactor build
azahnen Oct 14, 2024
879a01b
fix build
azahnen Oct 14, 2024
5cb571a
fix build
azahnen Oct 14, 2024
3d26a59
fix build
azahnen Oct 14, 2024
7653614
fix build
azahnen Oct 14, 2024
ee5157b
xtracfg wrapped as node.js-addon
PZahnen Oct 14, 2024
aad402d
fix build
azahnen Oct 14, 2024
33415e7
fix build
azahnen Oct 14, 2024
e58918e
fix build
azahnen Oct 14, 2024
3298a51
fix build
azahnen Oct 14, 2024
66252a9
fix build
azahnen Oct 14, 2024
3965c75
fix build
azahnen Oct 14, 2024
bc40c1c
correction
PZahnen Oct 15, 2024
3a3e081
refactor js
azahnen Oct 16, 2024
d10ce7d
refactor js
azahnen Oct 16, 2024
a1ac744
fix node files
azahnen Oct 16, 2024
888c613
handler parameter subscribe function
PZahnen Oct 16, 2024
cd27782
fix websocket
azahnen Oct 16, 2024
e7b416d
fix websocket
azahnen Oct 16, 2024
0879075
js build
azahnen Oct 16, 2024
a7b14d0
fix build
azahnen Oct 16, 2024
f2a1264
js build
azahnen Oct 16, 2024
7907415
fix build
azahnen Oct 16, 2024
e8681fe
fix build
azahnen Oct 16, 2024
6f0bd29
fix build
azahnen Oct 17, 2024
fce0288
fix build
azahnen Oct 17, 2024
d04d1ff
fix build
azahnen Oct 17, 2024
266939f
fix build
azahnen Oct 17, 2024
98062b7
publish js
azahnen Oct 17, 2024
3911d79
fix build
azahnen Oct 17, 2024
6526590
fix build
azahnen Oct 17, 2024
43ae799
fix build
azahnen Oct 17, 2024
e8d4d25
fix build
azahnen Oct 17, 2024
b0c71d0
fix build
azahnen Oct 17, 2024
3a038f2
fix build
azahnen Oct 17, 2024
52c1d97
fix build
azahnen Oct 17, 2024
ac3f8ea
fix build
azahnen Oct 17, 2024
99cabf4
websocket for browsers
azahnen Oct 18, 2024
01e4f38
debug build
azahnen Oct 18, 2024
840196b
debug build
azahnen Oct 18, 2024
fac35ab
fix build
azahnen Oct 18, 2024
59262a5
fix build
azahnen Oct 18, 2024
1535995
fix build
azahnen Oct 18, 2024
e86e027
fix build
azahnen Oct 18, 2024
e80f6a8
fix build
azahnen Oct 18, 2024
1e63e3a
fix build
azahnen Oct 18, 2024
6889edf
debug build
azahnen Oct 18, 2024
5db2bec
debug build
azahnen Oct 18, 2024
c78dd10
debug build
azahnen Oct 18, 2024
ed02f5b
debug build
azahnen Oct 19, 2024
262b89e
debug build
azahnen Oct 19, 2024
11c2671
debug build
azahnen Oct 19, 2024
4e62cf1
debug build
azahnen Oct 19, 2024
a30e9ff
fix build
azahnen Oct 19, 2024
22a5345
publish js
azahnen Oct 21, 2024
7a5ef2f
publish js
azahnen Oct 21, 2024
d26dc2a
fix bundling
azahnen Oct 21, 2024
c2d9a3e
fix transports
azahnen Oct 21, 2024
be889e7
register functions for runtime reflection
PZahnen Oct 30, 2024
ceebee7
register functions for runtime reflection 2
PZahnen Oct 30, 2024
6bff6e7
register functions for runtime reflection 3
PZahnen Oct 30, 2024
a55c17c
register functions for runtime reflection 4
PZahnen Oct 30, 2024
56e6ff9
reactivate docker build
azahnen Oct 30, 2024
4719563
fix docker build
azahnen Oct 31, 2024
589ffa9
fix progress messages
azahnen Oct 31, 2024
ee67410
upgrade dev websockets for java 21
azahnen Nov 6, 2024
2d533a0
improve error messages
azahnen Nov 6, 2024
e09fcb8
fix issues with defaults validation
azahnen Nov 8, 2024
c203cb1
js implement disconnect
azahnen Nov 19, 2024
858b0fe
js implement disconnect
azahnen Nov 19, 2024
ae57f74
fix json schema validation
azahnen Dec 31, 2024
5908dc8
code generation
azahnen Dec 31, 2024
f93a9db
default values
azahnen Jan 1, 2025
13f94a0
refactor
azahnen Jan 2, 2025
6569161
records
azahnen Jan 2, 2025
7dbe734
records
azahnen Jan 2, 2025
1d593e4
records
azahnen Jan 2, 2025
4d906ca
records
azahnen Jan 2, 2025
fd83a2a
records
azahnen Jan 2, 2025
8876251
records
azahnen Jan 2, 2025
545d609
go
azahnen Jan 7, 2025
a05579e
refactor
azahnen Jan 7, 2025
2566256
refactor
azahnen Jan 7, 2025
148ae60
refactor
azahnen Jan 7, 2025
98a3151
fix native transport
azahnen Jan 8, 2025
0ea574d
trigger build
azahnen Jan 10, 2025
5cc6e40
trigger build
azahnen Jan 15, 2025
966cc01
trigger build
azahnen Jan 16, 2025
4215088
windows build
azahnen Feb 25, 2025
7db49a9
windows build
azahnen Feb 25, 2025
c0585ce
windows build
azahnen Feb 25, 2025
805f42c
windows build
azahnen Feb 25, 2025
6062615
adjust to json schema validator upgrade
azahnen Feb 25, 2025
d68e62f
adjust to json schema validator upgrade
azahnen Feb 25, 2025
5be6cfc
fix arm build
azahnen Feb 26, 2025
1d4777b
temp disable windows
azahnen Feb 26, 2025
d3efc01
pass location to websocket
azahnen Mar 4, 2025
0651f18
pass location to websocket
azahnen Mar 4, 2025
9dfa9a7
fix validation
azahnen Mar 10, 2025
a2720a2
fix validation
azahnen Mar 11, 2025
3b07486
fix linux build
azahnen Mar 14, 2025
303f291
fix linux build
azahnen Mar 14, 2025
e26e7dd
fix linux build
azahnen Mar 14, 2025
840314e
fix linux build
azahnen Mar 14, 2025
e72a6e4
fix linux build
azahnen Mar 15, 2025
49f77f9
fix linux build
azahnen Mar 15, 2025
7d53d16
fix linux build
azahnen Mar 15, 2025
0fbbd13
fix linux build
azahnen Mar 15, 2025
5c64a20
fix linux build
azahnen Mar 15, 2025
2a80c2f
fix linux build
azahnen Mar 17, 2025
e5bfdc9
fix linux build
azahnen Mar 17, 2025
a71ce4c
fix linux build
azahnen Mar 17, 2025
bfc6a99
fix linux build
azahnen Mar 17, 2025
aab3dae
fix linux build
azahnen Mar 17, 2025
5f00cee
fix linux build
azahnen Mar 17, 2025
a9a1dff
fix linux build
azahnen Mar 17, 2025
3c53c00
fix linux build
azahnen Mar 17, 2025
5f19f5b
fix linux build
azahnen Mar 17, 2025
80825fe
fix linux build
azahnen Mar 17, 2025
cf4ed12
fix linux build
azahnen Mar 17, 2025
e41913a
upgrade ldproxy-cfg
azahnen Mar 22, 2025
0090b2d
release builds
azahnen Mar 22, 2025
873d956
release builds
azahnen Mar 22, 2025
46e3acf
release builds
azahnen Mar 23, 2025
772cdf3
release build
azahnen Mar 23, 2025
959895e
release build
azahnen Mar 23, 2025
7e1834c
release build
azahnen Mar 23, 2025
bef286b
release build
azahnen Mar 23, 2025
57ab38b
release build
azahnen Mar 23, 2025
5a8f9f3
release build
azahnen Mar 23, 2025
a0a18f6
release build
azahnen Mar 23, 2025
36f0697
release build
azahnen Mar 23, 2025
b7f4f95
release build
azahnen Mar 23, 2025
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
258 changes: 221 additions & 37 deletions .github/workflows/xtracfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,60 +3,154 @@ name: xtracfg
on: [push]

jobs:
build:
build_libraries:
runs-on: ${{ matrix.os.runner }}
strategy:
matrix:
os:
- runner: ubuntu-latest
- runner: ubuntu-24.04
type: linux
platform: linux-amd64
#- runner: buildjet-2vcpu-ubuntu-2204-arm
# type: linux
# platform: linux-arm64
- runner: macos-latest
- runner: ubuntu-24.04-arm #buildjet-2vcpu-ubuntu-2204-arm
type: linux
platform: linux-arm64
- runner: macos-14
type: macos
platform: darwin-arm64
runs-on: ${{ matrix.os.runner }}
defaults:
run:
working-directory: ./xtracfg
#- runner: windows-2022
# type: windows
# platform: windows-amd64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions/setup-go@v5
with:
go-version: "1.21.13"
go-version: "1.23.2"
cache-dependency-path: xtracfg/go.sum
- uses: graalvm/setup-graalvm@v1
with:
java-version: "17"
distribution: "liberica"
java-version: "21"
distribution: "graalvm"
native-image-job-reports: true
cache: gradle
cache-dependency-path: |
xtracfg/*.gradle*
xtracfg/**/gradle-wrapper.properties
- name: build go
#cache-dependency-path: |
# xtracfg/*.gradle*
# xtracfg/**/gradle-wrapper.properties
- name: zlib
if: ${{ matrix.os.type == 'linux' }}
working-directory: /tmp
env:
CI_COMMIT_BRANCH: ${{ github.ref_name }}
CI_COMMIT_SHA: ${{ github.sha }}
CI_COMMIT_TAG: ${{ github.ref_type == 'tag' && github.ref_name || '' }}
JAVA_INCLUDE: ${{ matrix.os.type == 'macos' && 'darwin' || 'linux' }}
ZLIB_VERSION: 1.2.11
run: |
wget https://zlib.net/fossils/zlib-${ZLIB_VERSION}.tar.gz
tar xzvf zlib-${ZLIB_VERSION}.tar.gz
mv zlib-${ZLIB_VERSION} zlib
cd zlib
CFLAGS="-fPIC" ./configure --static
make
- name: java
working-directory: ./libxtracfg/java
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
CGO_CFLAGS="-I$JAVA_HOME/include -I$JAVA_HOME/include/${JAVA_INCLUDE}" go build -buildmode c-archive -o dist/libxtracfg.a -ldflags="-s -w '-extldflags=-z noexecstack' -X github.com/interactive-instruments/xtraplatform-cli/xtracfg/cmd.gitTag=${CI_COMMIT_TAG} -X github.com/interactive-instruments/xtraplatform-cli/xtracfg/cmd.gitSha=${CI_COMMIT_SHA} -X github.com/interactive-instruments/xtraplatform-cli/xtracfg/cmd.gitBranch=${CI_COMMIT_BRANCH}"
./gradlew nativeCompile -PLIB=true
- name: log1
run: |
ls -lR ./dist
- name: build java
ls -l ./libxtracfg/c/build
# TODO: windows
- name: c
working-directory: ./libxtracfg/c
run: |
./gradlew nativeCompile ${{ matrix.os.type == 'linux' && '-PSTATIC=true' || '' }}
./build.sh
./test.sh
- name: log2
run: |
ls -lR ./build/native/nativeCompile
ls -l ./libxtracfg/c/build
- name: js
working-directory: ./libxtracfg/js/xtracfg-native-binding
run: |
npm --loglevel verbose ci
npm --loglevel verbose run prebuildify
npm --loglevel verbose run test
- name: log3
run: |
ls -lR ./libxtracfg/js/xtracfg-native-binding/prebuilds
# TODO: run tests for java, c, go
- uses: actions/upload-artifact@v4
with:
name: libxtracfg-c-${{ matrix.os.platform }}
path: ./libxtracfg/c/build/libxtracfg.a
retention-days: 1
- uses: actions/upload-artifact@v4
with:
name: libxtracfg-c-hash-${{ matrix.os.platform }}
path: ./libxtracfg/go/xtracfg/libxtracfg.sha1sum
retention-days: 1
- uses: actions/upload-artifact@v4
with:
name: libxtracfg-js-${{ matrix.os.platform }}
path: ./libxtracfg/js/xtracfg-native-binding/prebuilds
retention-days: 1

build_binaries:
runs-on: ${{ matrix.os.runner }}
needs: build_libraries
strategy:
matrix:
os:
- runner: ubuntu-24.04
type: linux
platform: linux-amd64
- runner: ubuntu-24.04-arm #buildjet-2vcpu-ubuntu-2204-arm
type: linux
platform: linux-arm64
- runner: macos-14
type: macos
platform: darwin-arm64
#- runner: windows-2022
# type: windows
# platform: windows-amd64
defaults:
run:
working-directory: ./xtracfg
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.23.2"
cache-dependency-path: xtracfg/go.sum
- uses: actions/download-artifact@v4
with:
name: libxtracfg-c-${{ matrix.os.platform }}
path: ./libxtracfg/c/build/
- uses: actions/download-artifact@v4
with:
name: libxtracfg-c-hash-${{ matrix.os.platform }}
path: ./libxtracfg/go/xtracfg/
- uses: bhowell2/github-substring-action@1.0.2
id: short-sha
with:
value: ${{ github.sha }}
length_from_start: 7
- name: build
env:
CMD_GIT_BRANCH: github.com/interactive-instruments/xtraplatform-cli/xtracfg/cmd.gitBranch=${{ github.ref_name }}
CMD_GIT_SHA: github.com/interactive-instruments/xtraplatform-cli/xtracfg/cmd.gitSha=${{ steps.short-sha.outputs.substring }}
CMD_GIT_TAG: github.com/interactive-instruments/xtraplatform-cli/xtracfg/cmd.gitTag=${{ github.ref_type == 'tag' && github.ref_name || '' }}
EXT_LDFLAGS: ${{ matrix.os.type == 'macos' && '-framework CoreServices -framework Foundation' || '-z noexecstack' }}
run: |
go build -o build/xtracfg -ldflags="-s -w -X ${CMD_GIT_TAG} -X ${CMD_GIT_SHA} -X ${CMD_GIT_BRANCH} '-extldflags=${EXT_LDFLAGS}'"
- name: log1
run: |
ls -lR ./build
- name: test
run: |
./build/xtracfg --version
./build/xtracfg info
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os.platform }}
path: ./xtracfg/build/native/nativeCompile
name: xtracfg-${{ matrix.os.platform }}
path: ./xtracfg/build/xtracfg
retention-days: 1
- uses: actions/upload-artifact@v4
if: ${{ matrix.os.platform == 'linux-amd64' }}
Expand All @@ -65,20 +159,93 @@ jobs:
path: ./xtracfg/Dockerfile
retention-days: 1

docker:
publish_npm:
runs-on: ubuntu-latest
needs: build_libraries
defaults:
run:
working-directory: ./libxtracfg/js
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # need full history for snapshot version
- uses: actions/download-artifact@v4
with:
pattern: "libxtracfg-js-*"
path: ./libxtracfg/js/xtracfg-native-binding/prebuilds
merge-multiple: true
- name: log1
run: |
ls -lR ./xtracfg-native-binding/prebuilds
- name: publish-branch
if: ${{ github.ref_type == 'branch' }}
env:
DIST_TAG: ${{ github.ref_name == 'main' && 'next' || github.ref_name }}
NPM_TOKEN: ${{ secrets.npm_rw_token }}
run: |
set -x
#npm run bump -- prerelease --build-metadata ${DIST_TAG} --preid ${DIST_TAG}
npm ci --ignore-scripts
npm run build
npm run publish -- --canary preminor --preid ${DIST_TAG} --dist-tag ${DIST_TAG}
- name: publish-tag
if: ${{ github.ref_type == 'tag' }}
env:
NPM_TOKEN: ${{ secrets.npm_rw_token }}
run: |
set -x
npm ci --ignore-scripts
npm run build
npm run publish -- from-package
- name: log2
run: |
ls -lR ./**/build

publish_docker:
runs-on: ubuntu-latest
needs: build
needs: build_binaries
steps:
- name: load
uses: actions/download-artifact@v4
with:
pattern: "{common,xtracfg-}*"
- name: chmod
run: |
chmod +x ./xtracfg-*/xtracfg
- name: log1
run: |
ls -lR
- uses: mmatheson/ghaction-upx@v1.0.2
with:
version: v4.2.4
files: |
./xtracfg-*/xtracfg
args: --best --force-macos
- name: log2
run: |
ls -lR
- name: release-github
if: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tar -czvf xtracfg_${{ github.ref_name }}_linux_amd64.tar.gz -C ./xtracfg-linux-amd64 xtracfg
tar -czvf xtracfg_${{ github.ref_name }}_linux_arm64.tar.gz -C ./xtracfg-linux-arm64 xtracfg
tar -czvf xtracfg_${{ github.ref_name }}_macos_arm64.tar.gz -C ./xtracfg-darwin-arm64 xtracfg
gh release upload ${{ github.ref_name }} xtracfg_${{ github.ref_name }}_linux_amd64.tar.gz --repo ldproxy/xtraplatform-cli
gh release upload ${{ github.ref_name }} xtracfg_${{ github.ref_name }}_linux_arm64.tar.gz --repo ldproxy/xtraplatform-cli
gh release upload ${{ github.ref_name }} xtracfg_${{ github.ref_name }}_macos_arm64.tar.gz --repo ldproxy/xtraplatform-cli
- uses: bhowell2/github-substring-action@1.0.2
id: short-sha
with:
value: ${{ github.sha }}
length_from_start: 7
- uses: bhowell2/github-substring-action@1.0.2
if: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
id: short-tag
with:
value: ${{ github.ref_name }}
index_of_str: "v"
- name: login
uses: docker/login-action@v3
with:
Expand All @@ -87,8 +254,8 @@ jobs:
password: ${{ secrets.ghcr_rw_token }}
- name: buildx
uses: docker/setup-buildx-action@v3
- name: push
if: ${{ github.ref_name == 'main' }}
- name: publish-main
if: ${{ github.ref_type == 'branch' && github.ref_name == 'main' }}
uses: docker/build-push-action@v6
with:
context: .
Expand All @@ -100,17 +267,34 @@ jobs:
ghcr.io/ldproxy/xtracfg:next-${{steps.short-sha.outputs.substring}}
platforms: |
linux/amd64
# linux/arm64
- name: push-branch
if: ${{ github.ref_name != 'main' }}
linux/arm64
- name: publish-branch
if: ${{ github.ref_type == 'branch' && github.ref_name != 'main' }}
uses: docker/build-push-action@v6
with:
context: .
file: ./common/Dockerfile
push: true
pull: true
tags: |
ghcr.io/ldproxy/xtracfg:${{ github.ref_name }}
ghcr.io/ldproxy/xtracfg:${{ github.ref_name }}-${{steps.short-sha.outputs.substring}}
platforms: |
linux/amd64
# linux/arm64
linux/arm64
- name: publish-tag
if: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
uses: docker/build-push-action@v6
with:
context: .
file: ./common/Dockerfile
push: true
pull: true
tags: |
ghcr.io/ldproxy/xtracfg:${{ steps.short-tag.outputs.substring }}
ghcr.io/ldproxy/xtracfg:latest
platforms: |
linux/amd64
linux/arm64

# TODO: validate binaries and docker images
Loading