ylspec 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ylspec-0.1.1/.clang-format +8 -0
- ylspec-0.1.1/.gitattributes +3 -0
- ylspec-0.1.1/.github/action-pins.json +46 -0
- ylspec-0.1.1/.github/workflows/ci.yml +15 -0
- ylspec-0.1.1/.github/workflows/languages.yml +236 -0
- ylspec-0.1.1/.github/workflows/publish-maven.yml +35 -0
- ylspec-0.1.1/.github/workflows/publish-npm.yml +36 -0
- ylspec-0.1.1/.github/workflows/publish-vscode.yml +36 -0
- ylspec-0.1.1/.github/workflows/publish.yml +100 -0
- ylspec-0.1.1/.github/workflows/verify.yml +222 -0
- ylspec-0.1.1/.gitignore +36 -0
- ylspec-0.1.1/AUTHORS.md +12 -0
- ylspec-0.1.1/CHANGELOG.md +26 -0
- ylspec-0.1.1/CMakeLists.txt +115 -0
- ylspec-0.1.1/CONTRIBUTING.md +35 -0
- ylspec-0.1.1/LICENSE +202 -0
- ylspec-0.1.1/NOTICE +10 -0
- ylspec-0.1.1/PKG-INFO +310 -0
- ylspec-0.1.1/README.md +278 -0
- ylspec-0.1.1/SECURITY.md +17 -0
- ylspec-0.1.1/THIRD_PARTY_NOTICES.md +54 -0
- ylspec-0.1.1/bindings/common/bridge.c +293 -0
- ylspec-0.1.1/bindings/common/bridge.h +10 -0
- ylspec-0.1.1/bindings/jni/jni.c +85 -0
- ylspec-0.1.1/bindings/node/addon.c +63 -0
- ylspec-0.1.1/bindings/wasm/web.c +28 -0
- ylspec-0.1.1/cmake/YLSpecConfig.cmake.in +4 -0
- ylspec-0.1.1/docs/architecture.mmd +16 -0
- ylspec-0.1.1/docs/building.md +80 -0
- ylspec-0.1.1/docs/c-api.md +83 -0
- ylspec-0.1.1/docs/cli.md +42 -0
- ylspec-0.1.1/docs/compatibility.md +95 -0
- ylspec-0.1.1/docs/embedding.md +71 -0
- ylspec-0.1.1/docs/profiles.md +63 -0
- ylspec-0.1.1/docs/publishing.md +108 -0
- ylspec-0.1.1/docs/python-api.md +94 -0
- ylspec-0.1.1/docs/registries.md +159 -0
- ylspec-0.1.1/docs/specification.md +104 -0
- ylspec-0.1.1/docs/vscode.md +65 -0
- ylspec-0.1.1/editors/vscode/.vscodeignore +7 -0
- ylspec-0.1.1/editors/vscode/CHANGELOG.md +11 -0
- ylspec-0.1.1/editors/vscode/README.md +122 -0
- ylspec-0.1.1/editors/vscode/images/icon.svg +7 -0
- ylspec-0.1.1/editors/vscode/language-configuration.json +7 -0
- ylspec-0.1.1/editors/vscode/package.json +38 -0
- ylspec-0.1.1/editors/vscode/snippets/ylspec.json +5 -0
- ylspec-0.1.1/editors/vscode/src/extension.cjs +93 -0
- ylspec-0.1.1/editors/vscode/src/metadata.cjs +52 -0
- ylspec-0.1.1/editors/vscode/src/worker.cjs +21 -0
- ylspec-0.1.1/editors/vscode/syntaxes/ylspec.tmLanguage.json +19 -0
- ylspec-0.1.1/editors/vscode/test/run.cjs +5 -0
- ylspec-0.1.1/editors/vscode/test/suite.cjs +40 -0
- ylspec-0.1.1/editors/vscode/test/unit.test.cjs +34 -0
- ylspec-0.1.1/editors/vscode/tools/package.cjs +9 -0
- ylspec-0.1.1/examples/basic.c +31 -0
- ylspec-0.1.1/examples/basic.py +14 -0
- ylspec-0.1.1/examples/config.ylspec +16 -0
- ylspec-0.1.1/examples/manifest.ylspec +12 -0
- ylspec-0.1.1/include/ylspec.h +118 -0
- ylspec-0.1.1/javascript/README.md +184 -0
- ylspec-0.1.1/javascript/package.json +22 -0
- ylspec-0.1.1/javascript/src/index.cjs +3 -0
- ylspec-0.1.1/javascript/src/index.d.cts +5 -0
- ylspec-0.1.1/javascript/src/index.d.ts +43 -0
- ylspec-0.1.1/javascript/src/index.mjs +3 -0
- ylspec-0.1.1/javascript/src/model.mjs +136 -0
- ylspec-0.1.1/javascript/src/node.d.ts +5 -0
- ylspec-0.1.1/javascript/src/node.mjs +14 -0
- ylspec-0.1.1/javascript/src/web.d.mts +3 -0
- ylspec-0.1.1/javascript/src/web.mjs +25 -0
- ylspec-0.1.1/javascript/test/browser.html +1 -0
- ylspec-0.1.1/javascript/test/browser.spec.mjs +13 -0
- ylspec-0.1.1/javascript/test/node.test.mjs +44 -0
- ylspec-0.1.1/javascript/test/playwright.config.mjs +4 -0
- ylspec-0.1.1/javascript/test/react-example.tsx +8 -0
- ylspec-0.1.1/javascript/test/react-main.tsx +4 -0
- ylspec-0.1.1/javascript/test/tsconfig.json +1 -0
- ylspec-0.1.1/javascript/test/usage.cts +4 -0
- ylspec-0.1.1/javascript/test/usage.ts +7 -0
- ylspec-0.1.1/jvm/README.md +80 -0
- ylspec-0.1.1/jvm/android/build.gradle.kts +6 -0
- ylspec-0.1.1/jvm/android/src/main/AndroidManifest.xml +1 -0
- ylspec-0.1.1/jvm/android/src/main/proguard.txt +3 -0
- ylspec-0.1.1/jvm/android-smoke/build.gradle.kts +13 -0
- ylspec-0.1.1/jvm/android-smoke/settings.gradle.kts +4 -0
- ylspec-0.1.1/jvm/android-smoke/src/main/AndroidManifest.xml +1 -0
- ylspec-0.1.1/jvm/android-smoke/src/main/java/io/github/younglionorganization/ylspec/smoke/SmokeInstrumentation.java +21 -0
- ylspec-0.1.1/jvm/build.gradle.kts +43 -0
- ylspec-0.1.1/jvm/docs/index.html +1 -0
- ylspec-0.1.1/jvm/java/build.gradle.kts +8 -0
- ylspec-0.1.1/jvm/java/src/main/java/io/github/younglionorganization/ylspec/Document.java +20 -0
- ylspec-0.1.1/jvm/java/src/main/java/io/github/younglionorganization/ylspec/Limits.java +12 -0
- ylspec-0.1.1/jvm/java/src/main/java/io/github/younglionorganization/ylspec/Native.java +32 -0
- ylspec-0.1.1/jvm/java/src/main/java/io/github/younglionorganization/ylspec/TemporalValue.java +16 -0
- ylspec-0.1.1/jvm/java/src/main/java/io/github/younglionorganization/ylspec/Wire.java +62 -0
- ylspec-0.1.1/jvm/java/src/main/java/io/github/younglionorganization/ylspec/YLSpec.java +46 -0
- ylspec-0.1.1/jvm/java/src/main/java/io/github/younglionorganization/ylspec/YLSpecException.java +11 -0
- ylspec-0.1.1/jvm/java/src/test/java/io/github/younglionorganization/ylspec/SmokeTest.java +22 -0
- ylspec-0.1.1/jvm/kotlin/build.gradle.kts +9 -0
- ylspec-0.1.1/jvm/kotlin/docs/index.html +1 -0
- ylspec-0.1.1/jvm/kotlin/src/main/kotlin/io/github/younglionorganization/ylspec/YLSpecKotlin.kt +24 -0
- ylspec-0.1.1/jvm/kotlin/src/test/kotlin/io/github/younglionorganization/ylspec/KotlinSmoke.kt +8 -0
- ylspec-0.1.1/jvm/natives/build.gradle.kts +6 -0
- ylspec-0.1.1/jvm/settings.gradle.kts +3 -0
- ylspec-0.1.1/pyproject.toml +68 -0
- ylspec-0.1.1/python/ylspec/__init__.py +207 -0
- ylspec-0.1.1/python/ylspec/__init__.pyi +360 -0
- ylspec-0.1.1/python/ylspec/_native.c +318 -0
- ylspec-0.1.1/python/ylspec/_native.pyi +109 -0
- ylspec-0.1.1/python/ylspec/py.typed +0 -0
- ylspec-0.1.1/release/assets.json +7 -0
- ylspec-0.1.1/release/notes/v0.1.0.md +59 -0
- ylspec-0.1.1/release/notes/v0.1.1.md +53 -0
- ylspec-0.1.1/release/release.json +6 -0
- ylspec-0.1.1/scripts/benchmark.py +19 -0
- ylspec-0.1.1/scripts/bindings.py +129 -0
- ylspec-0.1.1/scripts/check_docs.py +69 -0
- ylspec-0.1.1/scripts/collect_bindings.py +26 -0
- ylspec-0.1.1/scripts/package_native.py +27 -0
- ylspec-0.1.1/scripts/pin_actions.py +39 -0
- ylspec-0.1.1/scripts/prepare_editor.py +32 -0
- ylspec-0.1.1/scripts/publish_registry.py +104 -0
- ylspec-0.1.1/scripts/puppeteer.json +1 -0
- ylspec-0.1.1/scripts/release.py +188 -0
- ylspec-0.1.1/scripts/run_doc_examples.py +13 -0
- ylspec-0.1.1/src/cli.c +118 -0
- ylspec-0.1.1/src/ylspec.c +902 -0
- ylspec-0.1.1/tests/__pycache__/test_release.cpython-313-pytest-9.2.0.pyc +0 -0
- ylspec-0.1.1/tests/fuzz.c +26 -0
- ylspec-0.1.1/tests/test_core.c +137 -0
- ylspec-0.1.1/tests/test_python.py +133 -0
- ylspec-0.1.1/tests/test_release.py +63 -0
- ylspec-0.1.1/tests/typing/usage.py +59 -0
- ylspec-0.1.1/vendor/emscripten/AUTHORS +608 -0
- ylspec-0.1.1/vendor/emscripten/LICENSE +102 -0
- ylspec-0.1.1/vendor/emscripten/README.md +23 -0
- ylspec-0.1.1/vendor/emscripten/compiler-rt-LICENSE.TXT +311 -0
- ylspec-0.1.1/vendor/emscripten/musl-COPYRIGHT +193 -0
- ylspec-0.1.1/vendor/tomlc17/LICENSE +21 -0
- ylspec-0.1.1/vendor/tomlc17/conformance.c +278 -0
- ylspec-0.1.1/vendor/tomlc17/tomlc17.c +3308 -0
- ylspec-0.1.1/vendor/tomlc17/tomlc17.h +291 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"actions/checkout": {
|
|
3
|
+
"tag": "v7.0.1",
|
|
4
|
+
"sha": "3d3c42e5aac5ba805825da76410c181273ba90b1"
|
|
5
|
+
},
|
|
6
|
+
"actions/setup-python": {
|
|
7
|
+
"tag": "v7.1.0",
|
|
8
|
+
"sha": "6d4fd22b20465ccc0f7354476588e8df7c9ca0e0"
|
|
9
|
+
},
|
|
10
|
+
"actions/upload-artifact": {
|
|
11
|
+
"tag": "v7.0.2",
|
|
12
|
+
"sha": "cf430e030ddbb5b0abf93d22962f4752f3646cd9"
|
|
13
|
+
},
|
|
14
|
+
"actions/download-artifact": {
|
|
15
|
+
"tag": "v8.0.2",
|
|
16
|
+
"sha": "9000827ccba6bdab643e8b6fd33ac0654aef8333"
|
|
17
|
+
},
|
|
18
|
+
"actions/setup-go": {
|
|
19
|
+
"tag": "v7.0.0",
|
|
20
|
+
"sha": "b7ad1dad31e06c5925ef5d2fc7ad053ef454303e"
|
|
21
|
+
},
|
|
22
|
+
"actions/setup-node": {
|
|
23
|
+
"tag": "v7.1.0",
|
|
24
|
+
"sha": "949feb2413d6458794dcd2491c4babbbce0c15c1"
|
|
25
|
+
},
|
|
26
|
+
"pypa/cibuildwheel": {
|
|
27
|
+
"tag": "v4.3.4",
|
|
28
|
+
"sha": "b9e566a2b284570af229f6c2a33673410d0389a3"
|
|
29
|
+
},
|
|
30
|
+
"actions/setup-java": {
|
|
31
|
+
"tag": "v6.1.0",
|
|
32
|
+
"sha": "b843ebf9b913146b38da2eaa7aeddf76074ae1ad"
|
|
33
|
+
},
|
|
34
|
+
"gradle/actions/setup-gradle": {
|
|
35
|
+
"tag": "v6.4.1",
|
|
36
|
+
"sha": "8da46b539cd8fe6ab27ca75128919a18d757604c"
|
|
37
|
+
},
|
|
38
|
+
"reactivecircus/android-emulator-runner": {
|
|
39
|
+
"tag": "v2",
|
|
40
|
+
"sha": "4c44018e59b437e86cdfc41da381398f93ed8808"
|
|
41
|
+
},
|
|
42
|
+
"pypa/gh-action-pypi-publish": {
|
|
43
|
+
"tag": "release/v1",
|
|
44
|
+
"sha": "7245906fb61fa33a13554f9d5fb856fe61758086"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Copyright 2026 Cavanşir Qurbanzadə. SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
name: CI
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
concurrency:
|
|
11
|
+
group: ci-${{ github.ref }}
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
jobs:
|
|
14
|
+
verify:
|
|
15
|
+
uses: ./.github/workflows/verify.yml
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
# Copyright 2026 Cavanşir Qurbanzadə. SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
name: Language adapters
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
permissions:
|
|
6
|
+
contents: read
|
|
7
|
+
jobs:
|
|
8
|
+
desktop:
|
|
9
|
+
name: Node and JNI ${{ matrix.node }}
|
|
10
|
+
runs-on: ${{ matrix.os }}
|
|
11
|
+
timeout-minutes: 30
|
|
12
|
+
strategy:
|
|
13
|
+
fail-fast: false
|
|
14
|
+
matrix:
|
|
15
|
+
include:
|
|
16
|
+
- {os: ubuntu-24.04, node: linux-x64-gnu, jvm: linux-x86_64, docker: x86_64}
|
|
17
|
+
- {os: ubuntu-24.04-arm, node: linux-arm64-gnu, jvm: linux-arm64, docker: aarch64}
|
|
18
|
+
- {os: windows-2022, node: win32-x64, jvm: windows-x86_64, docker: ''}
|
|
19
|
+
- {os: macos-15-intel, node: darwin-x64, jvm: macos-x86_64, docker: ''}
|
|
20
|
+
- {os: macos-26, node: darwin-arm64, jvm: macos-arm64, docker: ''}
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
23
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0
|
|
24
|
+
with: {python-version: '3.13'}
|
|
25
|
+
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1
|
|
26
|
+
with: {node-version: '24'}
|
|
27
|
+
- uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad
|
|
28
|
+
with: {distribution: temurin, java-version: '17'}
|
|
29
|
+
- uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1
|
|
30
|
+
with: {gradle-version: '9.1.0'}
|
|
31
|
+
- name: Build desktop adapters
|
|
32
|
+
shell: bash
|
|
33
|
+
run: |
|
|
34
|
+
if [ -n '${{ matrix.docker }}' ]; then
|
|
35
|
+
python scripts/bindings.py headers
|
|
36
|
+
node_version="$(node -p process.version)"
|
|
37
|
+
docker run --rm -v "$PWD:/source" -v "$JAVA_HOME:/jdk:ro" -w /source -e JAVA_HOME=/jdk -e "YLSPEC_NODE_HEADERS=/source/build/node-headers/node-${node_version}/include/node" quay.io/pypa/manylinux_2_28_${{ matrix.docker }} bash -lc 'export PATH=/opt/python/cp313-cp313/bin:$PATH; python -m pip install "cmake>=3.26"; python scripts/bindings.py desktop --node-target ${{ matrix.node }} --jvm-target ${{ matrix.jvm }}'
|
|
38
|
+
else
|
|
39
|
+
python scripts/bindings.py desktop --node-target '${{ matrix.node }}' --jvm-target '${{ matrix.jvm }}'
|
|
40
|
+
fi
|
|
41
|
+
- name: Test Java, Kotlin, and native Node
|
|
42
|
+
shell: bash
|
|
43
|
+
run: |
|
|
44
|
+
case '${{ matrix.jvm }}' in
|
|
45
|
+
windows*) library=ylspec_jni.dll;;
|
|
46
|
+
macos*) library=libylspec_jni.dylib;;
|
|
47
|
+
*) library=libylspec_jni.so;;
|
|
48
|
+
esac
|
|
49
|
+
native_path="$PWD/jvm/natives/src/main/resources/natives/${{ matrix.jvm }}/$library"
|
|
50
|
+
if [ '${{ runner.os }}' = Windows ]; then native_path="$(cygpath -w "$native_path")"; fi
|
|
51
|
+
gradle -p jvm :java:smokeTest :kotlin:smokeTest -Dylspec.native.path="$native_path" --no-daemon
|
|
52
|
+
cd javascript
|
|
53
|
+
npm test
|
|
54
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
|
|
55
|
+
with:
|
|
56
|
+
name: bindings-${{ matrix.node }}
|
|
57
|
+
path: |
|
|
58
|
+
javascript/prebuilds/
|
|
59
|
+
jvm/natives/src/main/resources/natives/
|
|
60
|
+
if-no-files-found: error
|
|
61
|
+
musl:
|
|
62
|
+
name: Alpine Node and JNI ${{ matrix.arch }}
|
|
63
|
+
runs-on: ${{ matrix.os }}
|
|
64
|
+
timeout-minutes: 25
|
|
65
|
+
strategy:
|
|
66
|
+
fail-fast: false
|
|
67
|
+
matrix:
|
|
68
|
+
include:
|
|
69
|
+
- {os: ubuntu-24.04, arch: x64, jvm: x86_64}
|
|
70
|
+
- {os: ubuntu-24.04-arm, arch: arm64, jvm: arm64}
|
|
71
|
+
steps:
|
|
72
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
73
|
+
- name: Build and execute against musl
|
|
74
|
+
run: |
|
|
75
|
+
docker run --rm -v "$PWD:/source" -w /source -e JAVA_HOME=/usr/lib/jvm/java-17-openjdk alpine:3.21 sh -ec '
|
|
76
|
+
apk add --no-cache python3 cmake make gcc musl-dev nodejs nodejs-dev npm openjdk17-jdk
|
|
77
|
+
python3 scripts/bindings.py desktop --system-headers --node-target linux-${{ matrix.arch }}-musl --jvm-target linux-${{ matrix.jvm }}-musl
|
|
78
|
+
cd javascript && npm test && cd ..
|
|
79
|
+
mkdir -p build/java-musl
|
|
80
|
+
javac -encoding UTF-8 -d build/java-musl $(find jvm/java/src -name "*.java")
|
|
81
|
+
java -Dylspec.native.path=/source/jvm/natives/src/main/resources/natives/linux-${{ matrix.jvm }}-musl/libylspec_jni.so -cp build/java-musl io.github.younglionorganization.ylspec.SmokeTest'
|
|
82
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
|
|
83
|
+
with:
|
|
84
|
+
name: bindings-linux-${{ matrix.arch }}-musl
|
|
85
|
+
path: |
|
|
86
|
+
javascript/prebuilds/
|
|
87
|
+
jvm/natives/src/main/resources/natives/
|
|
88
|
+
if-no-files-found: error
|
|
89
|
+
wasm:
|
|
90
|
+
name: Browser WebAssembly and React
|
|
91
|
+
runs-on: ubuntu-24.04
|
|
92
|
+
timeout-minutes: 25
|
|
93
|
+
steps:
|
|
94
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
95
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0
|
|
96
|
+
with: {python-version: '3.13'}
|
|
97
|
+
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1
|
|
98
|
+
with: {node-version: '24'}
|
|
99
|
+
- name: Install pinned Emscripten SDK
|
|
100
|
+
run: |
|
|
101
|
+
git clone --branch 6.0.13 --depth 1 https://github.com/emscripten-core/emsdk.git build/emsdk
|
|
102
|
+
test "$(git -C build/emsdk rev-parse HEAD)" = 35659964bc2762fffec0d257997fb61475f765b7
|
|
103
|
+
build/emsdk/emsdk install 6.0.13
|
|
104
|
+
build/emsdk/emsdk activate 6.0.13
|
|
105
|
+
- name: Build the C core as WebAssembly
|
|
106
|
+
run: |
|
|
107
|
+
source build/emsdk/emsdk_env.sh
|
|
108
|
+
emcmake cmake -S . -B build/web -DCMAKE_BUILD_TYPE=Release -DYLSPEC_BUILD_WASM=ON -DYLSPEC_BUILD_CLI=OFF -DBUILD_TESTING=OFF
|
|
109
|
+
cmake --build build/web --parallel 2
|
|
110
|
+
python scripts/bindings.py prepare-js
|
|
111
|
+
cp build/web/core.mjs build/web/core.wasm javascript/wasm/
|
|
112
|
+
- name: Type-check and test in a real browser
|
|
113
|
+
working-directory: javascript
|
|
114
|
+
run: |
|
|
115
|
+
npm install --ignore-scripts
|
|
116
|
+
npm run typecheck
|
|
117
|
+
npx playwright install --with-deps chromium
|
|
118
|
+
npm run test:browser
|
|
119
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
|
|
120
|
+
with:
|
|
121
|
+
name: bindings-wasm
|
|
122
|
+
path: javascript/wasm/
|
|
123
|
+
if-no-files-found: error
|
|
124
|
+
android:
|
|
125
|
+
name: Android JNI ${{ matrix.abi }}
|
|
126
|
+
runs-on: ubuntu-24.04
|
|
127
|
+
timeout-minutes: 20
|
|
128
|
+
strategy:
|
|
129
|
+
fail-fast: false
|
|
130
|
+
matrix:
|
|
131
|
+
abi: [armeabi-v7a, arm64-v8a, x86, x86_64]
|
|
132
|
+
steps:
|
|
133
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
134
|
+
- name: Install NDK and cross-compile
|
|
135
|
+
run: |
|
|
136
|
+
"$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" 'ndk;28.2.13676358'
|
|
137
|
+
cmake -S . -B build/android -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="$ANDROID_HOME/ndk/28.2.13676358/build/cmake/android.toolchain.cmake" -DANDROID_ABI=${{ matrix.abi }} -DANDROID_PLATFORM=android-26 -DYLSPEC_BUILD_JNI=ON -DBUILD_TESTING=OFF -DYLSPEC_BUILD_CLI=OFF
|
|
138
|
+
cmake --build build/android --parallel 2
|
|
139
|
+
mkdir -p jvm/android/src/main/jni/${{ matrix.abi }}
|
|
140
|
+
cp build/android/libylspec_jni.so jvm/android/src/main/jni/${{ matrix.abi }}/
|
|
141
|
+
"$ANDROID_HOME/ndk/28.2.13676358/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-nm" -D build/android/libylspec_jni.so | grep Java_io_github_younglionorganization_ylspec_Native_process
|
|
142
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
|
|
143
|
+
with:
|
|
144
|
+
name: bindings-android-${{ matrix.abi }}
|
|
145
|
+
path: jvm/android/src/main/jni/
|
|
146
|
+
if-no-files-found: error
|
|
147
|
+
package:
|
|
148
|
+
name: Package npm and Maven distributions
|
|
149
|
+
needs: [desktop, musl, wasm, android]
|
|
150
|
+
runs-on: ubuntu-24.04
|
|
151
|
+
timeout-minutes: 25
|
|
152
|
+
steps:
|
|
153
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
154
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0
|
|
155
|
+
with: {python-version: '3.13'}
|
|
156
|
+
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1
|
|
157
|
+
with: {node-version: '24'}
|
|
158
|
+
- uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad
|
|
159
|
+
with: {distribution: temurin, java-version: '17'}
|
|
160
|
+
- uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1
|
|
161
|
+
with: {gradle-version: '9.1.0'}
|
|
162
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333
|
|
163
|
+
with: {pattern: 'bindings-*', path: build/downloads}
|
|
164
|
+
- name: Collect native resource trees
|
|
165
|
+
run: python scripts/collect_bindings.py
|
|
166
|
+
- name: Build JVM publications and npm tarball
|
|
167
|
+
run: |
|
|
168
|
+
gradle -p jvm publishAllPublicationsToStagingRepository :java:smokeTest :kotlin:smokeTest --no-daemon
|
|
169
|
+
python scripts/bindings.py package
|
|
170
|
+
mkdir -p build/npm-consumer
|
|
171
|
+
cd build/npm-consumer
|
|
172
|
+
npm install --ignore-scripts ../../dist/languages/*.tgz
|
|
173
|
+
node --input-type=module -e "import {createClient} from '@younglionorganization/ylspec'; const y=await createClient(); if(y.unpack(y.pack(new y.Document({n:42n}))).data.n!==42n) throw Error('Packaged native module failed');"
|
|
174
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
|
|
175
|
+
with: {name: language-packages, path: 'dist/languages/*', if-no-files-found: error}
|
|
176
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
|
|
177
|
+
with:
|
|
178
|
+
name: android-smoke-inputs
|
|
179
|
+
path: |
|
|
180
|
+
jvm/java/build/libs/java-*.jar
|
|
181
|
+
jvm/android/build/distributions/*.aar
|
|
182
|
+
if-no-files-found: error
|
|
183
|
+
android-runtime:
|
|
184
|
+
name: Android API 26 runtime
|
|
185
|
+
needs: package
|
|
186
|
+
runs-on: ubuntu-24.04
|
|
187
|
+
timeout-minutes: 30
|
|
188
|
+
steps:
|
|
189
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
190
|
+
- uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad
|
|
191
|
+
with: {distribution: temurin, java-version: '17'}
|
|
192
|
+
- uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1
|
|
193
|
+
with: {gradle-version: '8.14.3'}
|
|
194
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333
|
|
195
|
+
with: {name: android-smoke-inputs, path: jvm}
|
|
196
|
+
- name: Enable KVM access
|
|
197
|
+
run: |
|
|
198
|
+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
|
|
199
|
+
sudo udevadm control --reload-rules
|
|
200
|
+
sudo udevadm trigger --name-match=kvm
|
|
201
|
+
- uses: reactivecircus/android-emulator-runner@4c44018e59b437e86cdfc41da381398f93ed8808
|
|
202
|
+
with:
|
|
203
|
+
api-level: 26
|
|
204
|
+
arch: x86_64
|
|
205
|
+
disable-animations: true
|
|
206
|
+
script: |
|
|
207
|
+
gradle -p jvm/android-smoke assembleDebug --no-daemon
|
|
208
|
+
adb install -r jvm/android-smoke/build/outputs/apk/debug/ylspec-android-smoke-debug.apk
|
|
209
|
+
adb shell am instrument -w io.github.younglionorganization.ylspec.smoke/.SmokeInstrumentation | tee build-android-result.txt
|
|
210
|
+
grep 'YLSpec Android JNI tests passed' build-android-result.txt
|
|
211
|
+
editor:
|
|
212
|
+
name: VS Code language extension
|
|
213
|
+
needs: wasm
|
|
214
|
+
runs-on: ubuntu-24.04
|
|
215
|
+
timeout-minutes: 20
|
|
216
|
+
steps:
|
|
217
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
218
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0
|
|
219
|
+
with: {python-version: '3.13'}
|
|
220
|
+
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1
|
|
221
|
+
with: {node-version: '24'}
|
|
222
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333
|
|
223
|
+
with: {name: bindings-wasm, path: javascript/wasm}
|
|
224
|
+
- name: Assemble the bundled editor engine
|
|
225
|
+
run: |
|
|
226
|
+
python -m pip install 'cairosvg==2.8.2'
|
|
227
|
+
python scripts/prepare_editor.py
|
|
228
|
+
- name: Verify grammar and extension integration, then package VSIX
|
|
229
|
+
working-directory: editors/vscode
|
|
230
|
+
run: |
|
|
231
|
+
npm install --ignore-scripts
|
|
232
|
+
npm test
|
|
233
|
+
xvfb-run -a npm run test:integration
|
|
234
|
+
npm run package
|
|
235
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
|
|
236
|
+
with: {name: editor-package, path: 'dist/editor/*.vsix', if-no-files-found: error}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Copyright 2026 Cavanşir Qurbanzadə. SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
name: Publish Maven Central libraries
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
version:
|
|
7
|
+
description: 'Published GitHub Release version; empty uses release/release.json'
|
|
8
|
+
required: false
|
|
9
|
+
type: string
|
|
10
|
+
permissions: {contents: read}
|
|
11
|
+
concurrency: {group: ylspec-maven-publish, cancel-in-progress: false}
|
|
12
|
+
jobs:
|
|
13
|
+
publish:
|
|
14
|
+
runs-on: ubuntu-24.04
|
|
15
|
+
timeout-minutes: 30
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
18
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0
|
|
19
|
+
with: {python-version: '3.13'}
|
|
20
|
+
- name: Require main
|
|
21
|
+
run: test "$GITHUB_REF" = refs/heads/main
|
|
22
|
+
- name: Download and verify the published release artifact
|
|
23
|
+
env:
|
|
24
|
+
GH_TOKEN: ${{ github.token }}
|
|
25
|
+
INPUT_VERSION: ${{ inputs.version }}
|
|
26
|
+
run: python scripts/publish_registry.py prepare-maven
|
|
27
|
+
- name: Sign unchanged binaries and publish the Central bundle
|
|
28
|
+
env:
|
|
29
|
+
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
|
|
30
|
+
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
|
|
31
|
+
MAVEN_GPG_PRIVATE_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
|
|
32
|
+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
|
|
33
|
+
run: |
|
|
34
|
+
test -n "$MAVEN_CENTRAL_USERNAME" && test -n "$MAVEN_CENTRAL_PASSWORD" && test -n "$MAVEN_GPG_PRIVATE_KEY" || { echo '::error::Configure the Maven Central token and OpenPGP secrets.'; exit 1; }
|
|
35
|
+
python scripts/publish_registry.py central
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Copyright 2026 Cavanşir Qurbanzadə. SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
name: Publish npm package
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
version:
|
|
7
|
+
description: 'Published GitHub Release version; empty uses release/release.json'
|
|
8
|
+
required: false
|
|
9
|
+
type: string
|
|
10
|
+
permissions: {contents: read}
|
|
11
|
+
concurrency: {group: ylspec-npm-publish, cancel-in-progress: false}
|
|
12
|
+
jobs:
|
|
13
|
+
publish:
|
|
14
|
+
runs-on: ubuntu-24.04
|
|
15
|
+
timeout-minutes: 10
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
18
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0
|
|
19
|
+
with: {python-version: '3.13'}
|
|
20
|
+
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1
|
|
21
|
+
with: {node-version: '24', registry-url: 'https://registry.npmjs.org'}
|
|
22
|
+
- name: Require main and configured token
|
|
23
|
+
env:
|
|
24
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
25
|
+
run: |
|
|
26
|
+
test "$GITHUB_REF" = refs/heads/main
|
|
27
|
+
test -n "$NPM_TOKEN" || { echo '::error::Add the NPM_TOKEN repository secret.'; exit 1; }
|
|
28
|
+
- name: Download and verify the published release artifact
|
|
29
|
+
env:
|
|
30
|
+
GH_TOKEN: ${{ github.token }}
|
|
31
|
+
INPUT_VERSION: ${{ inputs.version }}
|
|
32
|
+
run: python scripts/publish_registry.py prepare-npm
|
|
33
|
+
- name: Publish the verified npm tarball
|
|
34
|
+
env:
|
|
35
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
36
|
+
run: npm publish "$REGISTRY_ASSET" --access public --ignore-scripts
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Copyright 2026 Cavanşir Qurbanzadə. SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
name: Publish VS Code extension
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
version:
|
|
7
|
+
description: 'Published GitHub Release version; empty uses release/release.json'
|
|
8
|
+
required: false
|
|
9
|
+
type: string
|
|
10
|
+
permissions: {contents: read}
|
|
11
|
+
concurrency: {group: ylspec-vscode-publish, cancel-in-progress: false}
|
|
12
|
+
jobs:
|
|
13
|
+
publish:
|
|
14
|
+
runs-on: ubuntu-24.04
|
|
15
|
+
timeout-minutes: 10
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
18
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0
|
|
19
|
+
with: {python-version: '3.13'}
|
|
20
|
+
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1
|
|
21
|
+
with: {node-version: '24'}
|
|
22
|
+
- name: Require main and configured publisher credential
|
|
23
|
+
env:
|
|
24
|
+
VSCE_PAT: ${{ secrets.VSCE_PAT }}
|
|
25
|
+
run: |
|
|
26
|
+
test "$GITHUB_REF" = refs/heads/main
|
|
27
|
+
test -n "$VSCE_PAT" || { echo '::error::Configure the Marketplace publisher and VSCE_PAT repository secret.'; exit 1; }
|
|
28
|
+
- name: Download and verify the published VSIX
|
|
29
|
+
env:
|
|
30
|
+
GH_TOKEN: ${{ github.token }}
|
|
31
|
+
INPUT_VERSION: ${{ inputs.version }}
|
|
32
|
+
run: python scripts/publish_registry.py prepare-vscode
|
|
33
|
+
- name: Publish the verified VSIX
|
|
34
|
+
env:
|
|
35
|
+
VSCE_PAT: ${{ secrets.VSCE_PAT }}
|
|
36
|
+
run: npx --yes --package @vscode/vsce@4.1.0 vsce publish --packagePath "$REGISTRY_ASSET"
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Copyright 2026 Cavanşir Qurbanzadə. SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
name: Publish release
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
permissions:
|
|
6
|
+
contents: read
|
|
7
|
+
concurrency:
|
|
8
|
+
group: ylspec-publish
|
|
9
|
+
cancel-in-progress: false
|
|
10
|
+
jobs:
|
|
11
|
+
gate:
|
|
12
|
+
runs-on: ubuntu-24.04
|
|
13
|
+
steps:
|
|
14
|
+
- name: Require the main branch
|
|
15
|
+
env:
|
|
16
|
+
REF: ${{ github.ref }}
|
|
17
|
+
run: test "$REF" = refs/heads/main
|
|
18
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
19
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
20
|
+
with:
|
|
21
|
+
python-version: '3.13'
|
|
22
|
+
- run: python scripts/release.py metadata
|
|
23
|
+
verify:
|
|
24
|
+
needs: gate
|
|
25
|
+
uses: ./.github/workflows/verify.yml
|
|
26
|
+
stage:
|
|
27
|
+
needs: verify
|
|
28
|
+
runs-on: ubuntu-24.04
|
|
29
|
+
permissions:
|
|
30
|
+
contents: write
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
33
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
34
|
+
with:
|
|
35
|
+
python-version: '3.13'
|
|
36
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
37
|
+
with:
|
|
38
|
+
name: release-candidate
|
|
39
|
+
path: artifacts
|
|
40
|
+
- name: Stage and validate complete release
|
|
41
|
+
run: |
|
|
42
|
+
python scripts/release.py stage --sha "$GITHUB_SHA"
|
|
43
|
+
python -m pip install twine
|
|
44
|
+
python -c "import json,pathlib,subprocess; v=json.loads(pathlib.Path('release/release.json').read_text())['version']; subprocess.run(['python','-m','twine','check',*map(str,pathlib.Path('dist/release').glob('*.whl')),f'dist/release/ylspec-{v}.tar.gz'],check=True)"
|
|
45
|
+
- name: Create draft and attach verified assets
|
|
46
|
+
env:
|
|
47
|
+
GH_TOKEN: ${{ github.token }}
|
|
48
|
+
run: python scripts/release.py draft --source dist/release --sha "$GITHUB_SHA"
|
|
49
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
50
|
+
with:
|
|
51
|
+
name: release-staged
|
|
52
|
+
path: dist/release/*
|
|
53
|
+
if-no-files-found: error
|
|
54
|
+
pypi:
|
|
55
|
+
needs: stage
|
|
56
|
+
runs-on: ubuntu-24.04
|
|
57
|
+
environment: pypi
|
|
58
|
+
permissions:
|
|
59
|
+
contents: read
|
|
60
|
+
steps:
|
|
61
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
62
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
63
|
+
with:
|
|
64
|
+
python-version: '3.13'
|
|
65
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
66
|
+
with:
|
|
67
|
+
name: release-staged
|
|
68
|
+
path: staged
|
|
69
|
+
- name: Verify existing PyPI files and select unpublished distributions
|
|
70
|
+
id: pending
|
|
71
|
+
run: python scripts/release.py pending --source staged --output pending
|
|
72
|
+
- name: Require the PyPI API token
|
|
73
|
+
if: steps.pending.outputs.has_files == 'true'
|
|
74
|
+
env:
|
|
75
|
+
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
|
|
76
|
+
run: |
|
|
77
|
+
if [ -z "$PYPI_API_TOKEN" ]; then
|
|
78
|
+
echo "::error::Add the PYPI_API_TOKEN repository secret in Settings > Secrets and variables > Actions."
|
|
79
|
+
exit 1
|
|
80
|
+
fi
|
|
81
|
+
- uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # release/v1
|
|
82
|
+
if: steps.pending.outputs.has_files == 'true'
|
|
83
|
+
with:
|
|
84
|
+
user: __token__
|
|
85
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
86
|
+
packages-dir: pending/
|
|
87
|
+
attestations: false
|
|
88
|
+
finalize:
|
|
89
|
+
needs: pypi
|
|
90
|
+
runs-on: ubuntu-24.04
|
|
91
|
+
permissions:
|
|
92
|
+
contents: write
|
|
93
|
+
steps:
|
|
94
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
95
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
96
|
+
with:
|
|
97
|
+
python-version: '3.13'
|
|
98
|
+
- env:
|
|
99
|
+
GH_TOKEN: ${{ github.token }}
|
|
100
|
+
run: python scripts/release.py finalize
|