Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Typescript API into eclipse-zenoh #1

Merged
merged 216 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from 212 commits
Commits
Show all changes
216 commits
Select commit Hold shift + click to select a range
397a93d
start the repo
p-avital Oct 9, 2023
573754a
trying to get the generated wasm to be included in the package
p-avital Oct 11, 2023
b280d85
why are webpack resources always outdated? D:
p-avital Oct 12, 2023
cc45b1f
more webpack shenanigans
p-avital Oct 16, 2023
8c30ca6
WIP: Attempting different tsconfig, package.json and emcc build comma…
Charles-Schleich Nov 16, 2023
51a6626
WIP: Modules TSconfig package.json
Charles-Schleich Nov 17, 2023
b50b445
WIP: improve package json and tsconfig settings,
Charles-Schleich Nov 17, 2023
cfbde4a
WIP: Writing as Javascript as .mjs file
Charles-Schleich Nov 20, 2023
3e7cda2
WIP: Webpack + Multiple Build attempts
Charles-Schleich Nov 23, 2023
edb9e83
WIP: Webpack Settings, Add web example in example directory without e…
Charles-Schleich Nov 24, 2023
27ff698
WIP: Session Opens, Interface horribleness
Charles-Schleich Nov 28, 2023
94965e8
WIP: got declare keyexpr put working, got put working
Charles-Schleich Nov 28, 2023
74f8b25
WIP: Register callback functions C <> JS, implement subcriber interface
Charles-Schleich Nov 29, 2023
d60b351
test new remove
Charles-Schleich Nov 29, 2023
4c3c1c1
WIP: beign Selector, intoSelector, Reply, Session,Query, and exposing…
Charles-Schleich Nov 29, 2023
e730e8d
ADD Copywrite, License, Contributers, Copywrite embedding in generate…
Charles-Schleich Dec 1, 2023
24169de
Finish command build examples: WIP README
Charles-Schleich Dec 1, 2023
bbacb9e
Improve Readme
Charles-Schleich Dec 5, 2023
13bb601
WIP: Improving Typescript interface, Implement Selector somewhat
Charles-Schleich Dec 5, 2023
38094cd
Fix Selector representation, begin exposing zw_get for Query
Charles-Schleich Dec 11, 2023
d1ef8a0
Minor cleanup, better interface for KeyExpr
Charles-Schleich Jan 3, 2024
beb58ed
Add method to create value from payload, and create empty Value
Charles-Schleich Jan 4, 2024
64f3168
Fixed put not posting, Still fails after 20 iterations of infinite lo…
Charles-Schleich Jan 8, 2024
586f93d
WIP debugging
Charles-Schleich Jan 10, 2024
e4aa41c
Session.open returns explicit session Type
Charles-Schleich Jan 10, 2024
a5b0f5e
Exposing writeArrayToMemory function, WIP getting passing of array bu…
Charles-Schleich Jan 14, 2024
eec41f0
WIP: Fixing sending / interpreting incorrect Bytes, JS->C
Charles-Schleich Jan 14, 2024
6c28f76
Put Functionning and sending Bytes as expected, Small Cleanup
Charles-Schleich Jan 15, 2024
9222efa
Cleanup
Charles-Schleich Jan 15, 2024
433c589
Cleanup Put
Charles-Schleich Jan 15, 2024
f6577cc
WIP: Adding Subscriber Callbacks - Save point before C++ Exploration
Charles-Schleich Jan 16, 2024
b3849fc
killed all possible ways to do Callbacks Across the TS -> CPP boundar…
Charles-Schleich Feb 17, 2024
d4b141d
WIP: Begin moving functions from C Style calls to C++ emscripten call…
Charles-Schleich Feb 19, 2024
f524b69
Cleanup and port put, open_session, start_tasks, make_ke, to CPP Embi…
Charles-Schleich Feb 19, 2024
4564b4f
WIP Move declare_ke over to new c++ binding method
Charles-Schleich Feb 20, 2024
5dd6cb3
ported to zw_declare_ke to CPP style of binding
Charles-Schleich Feb 21, 2024
fcae0c2
WIP fix zenoh.KeyExpr.new()
Charles-Schleich Feb 21, 2024
9b4f31a
Debugging and clean up
Charles-Schleich Feb 23, 2024
a402c8c
Update README.md
OlivierHecart Feb 23, 2024
c7654bd
WIP Sub with Olivier
Charles-Schleich Feb 23, 2024
f186ce5
WIP: Fixing CPP not forgetting emscripten::val ts_cb
Charles-Schleich Feb 23, 2024
bfba792
Improve Build Script + added Typed Callback for CPP interop
Charles-Schleich Feb 27, 2024
8d896f0
WIP: Using Single Threaded mode in Zenoh-ts Polling from TS zp_read, …
Charles-Schleich Feb 28, 2024
6053370
WIP : Debugging Error Multiple inflight ASync Values
Charles-Schleich Mar 1, 2024
e2c9e74
Run TS callback on event from non-main thread
OlivierHecart Mar 13, 2024
3c41698
Fix traces
OlivierHecart Mar 14, 2024
6b0df2f
Call TS callback on sample reception
OlivierHecart Mar 14, 2024
ff1ffed
Fix Creation of new val object, using constructor in CPP - Michael
Charles-Schleich Mar 14, 2024
3cf5216
Remove traces
OlivierHecart Mar 14, 2024
3fd98e4
Pass keyexpr to user callback as int ptr
OlivierHecart Mar 14, 2024
5566fac
Pass keyexpr to user callback as String
OlivierHecart Mar 14, 2024
ecb309a
Pass payload to user callback as UInt8Array
OlivierHecart Mar 14, 2024
09b5985
Add throughput subscriber
OlivierHecart Mar 15, 2024
864e17e
Copy SharedArrayBuffer to ArrayBuffer to get around WASM issue regard…
Charles-Schleich Mar 26, 2024
e2566e0
WIP, Formatting adding declare_publisher,
Charles-Schleich Apr 2, 2024
7ee80a6
Fix build failure
Charles-Schleich Apr 2, 2024
33074b8
Added Sample, added Handler Funciton for declare_subscriber
Charles-Schleich Apr 2, 2024
3122df0
expose delete key expression
Charles-Schleich Apr 3, 2024
8d22ffd
Testing 3 simultaneous subscribers at the same time
Charles-Schleich Apr 4, 2024
d0a0476
Added publisher struct
Charles-Schleich Apr 4, 2024
90b3a43
Added pico-managed publisher, and did cleanup
Charles-Schleich Apr 8, 2024
a11d288
use WasmPtr type, improvements to C++ layer, minor cleanup, WIP publi…
Charles-Schleich Apr 9, 2024
edb0770
Cleanup
Charles-Schleich Apr 11, 2024
dd54114
WIP: Get String from KeyExpr Resource Wasm Internal, WIP Fix Pthread …
Charles-Schleich Apr 22, 2024
1f2685d
WIP: Fixing Subscriber Out of bounds error in Worker Thread
Charles-Schleich Apr 24, 2024
5648669
WIP: Add Debug statements to find out of bounds error
Charles-Schleich Apr 24, 2024
7e6a9bf
Fixed Publisher Failing to init, fixed publisher put, all that remain…
Charles-Schleich Apr 26, 2024
62db9b5
Cleaup CPP, TODO's, remove empty Node example
Charles-Schleich May 2, 2024
7b3d4f9
Partial release cleanup, adding types and documentation
Charles-Schleich May 2, 2024
6c94703
Add Docs to interfaces and Functions
Charles-Schleich May 2, 2024
12da78e
small doc fix
Charles-Schleich May 2, 2024
dfab7cb
Added docs to CPP, and TS
Charles-Schleich May 3, 2024
2a95a59
added images, improved readme
Charles-Schleich May 3, 2024
d50ef88
add disclaimer to readme
Charles-Schleich May 6, 2024
e07f8fe
Add TS link Readme,
Charles-Schleich May 14, 2024
ada8d33
feat: RemoteAPI, save index->index.old, working on Remote API for Ses…
Charles-Schleich May 15, 2024
c0c8a05
feat: RemoteAPI - WIP: Added creation of subscriber, not working yet
Charles-Schleich May 23, 2024
ee5c53b
feat: remote-api WIP, consume async samples from Websocket
Charles-Schleich May 27, 2024
badbbb7
feat: remote-api: switched from webpack to vite, WIP handling Subscri…
Charles-Schleich May 30, 2024
4aac820
WIP: Remote-api, handling of deserializing and sending off Control an…
Charles-Schleich May 31, 2024
1c7ae0e
feat: Remote API : Sub callbacks
Charles-Schleich Jun 6, 2024
9aabe28
feat: remote-api: update control message CreateSubscriber->DeclareSub…
Charles-Schleich Jun 10, 2024
5b85196
Begin using Rust-interface
Charles-Schleich Jul 12, 2024
4f49f36
rework interface, impl Publisher class
Charles-Schleich Jul 12, 2024
a2b8d4e
Update Interface, hande undeclare subscriber, add put, delete directl…
Charles-Schleich Jul 16, 2024
1e1eef9
Calling RemoteAPI from API Layer
Charles-Schleich Jul 16, 2024
f5b1936
Simplify IntoKeyExpr, fix call callback of subscriber
Charles-Schleich Jul 17, 2024
988fc60
undeclaring publisher
Charles-Schleich Jul 17, 2024
6d4c5a1
WIP: Add Queryable, RemoteQueryable, ReplyWS,Query, QueryWS
Charles-Schleich Jul 19, 2024
4e28ec2
WIP Query -> Reply using Channel to websocket
Charles-Schleich Jul 23, 2024
1a9d3cd
Refactor classes out, continue Queryable
Charles-Schleich Jul 24, 2024
9d9138e
Refactor, WIP Implement Query-Reply Handling
Charles-Schleich Jul 24, 2024
f00fe35
fixed get blocking and not collecting all responses
Charles-Schleich Jul 26, 2024
31f98b0
minor refactor Publisher
Charles-Schleich Jul 26, 2024
fbd6213
Begin Ros2 Teleop
Charles-Schleich Jul 29, 2024
d9a367a
Refactor + Simplify module import for library consumption
Charles-Schleich Jul 29, 2024
56c991f
ros2Teleop demo WIP: sub -> battery_state, deserializing message
Charles-Schleich Aug 5, 2024
40cd5a1
Ros2Teleop: wrap raw bytes in byte buffer for CDRReader
Charles-Schleich Aug 6, 2024
a37ccd9
Add Types to Ros2Demo, Lidar and Commands working
Charles-Schleich Aug 6, 2024
a9b1747
removed zenoh-wasm, reworked interface for Query, Reply, Error, Delet…
Charles-Schleich Aug 7, 2024
a192117
Add smaller examples, delete, get, ping,pong
Charles-Schleich Aug 7, 2024
131dedf
add small demos, z_pub, z_queryable, z_sub, removed publisher set con…
Charles-Schleich Aug 8, 2024
694761b
add version
Charles-Schleich Aug 12, 2024
f95eb46
npx prettier --write .
Charles-Schleich Aug 12, 2024
a00ffcc
update doc-strings session.ts
Charles-Schleich Aug 12, 2024
2ac8224
add docstrings to Query, Sample and ZBytes
Charles-Schleich Aug 12, 2024
4a4add0
add docstring for publisher / subscriber, ZBytes
Charles-Schleich Aug 12, 2024
e98701b
Add Docstring to Query, Selector, Reply, ReplyErr
Charles-Schleich Aug 12, 2024
1e5323e
Fix incorrect handling of selector separator
Charles-Schleich Aug 12, 2024
07f3ae3
Add Github Workflow build and Package - first attempt
Charles-Schleich Aug 12, 2024
fa11670
Add TypeDoc + Docstrings
Charles-Schleich Aug 12, 2024
20927cc
Add z_sub_thr throughput
Charles-Schleich Aug 13, 2024
dd8a29e
Add dep uuid
Charles-Schleich Aug 13, 2024
5beca6f
Simplify package.json, github publish attempt 2
Charles-Schleich Aug 13, 2024
ca8f1cf
add `push` to register workflow
Charles-Schleich Aug 13, 2024
12ba6db
downgrade node version for release-it workflow
Charles-Schleich Aug 13, 2024
e3ef439
add .npmrc, use gitub for npm registry
Charles-Schleich Aug 13, 2024
b4aeb09
add npm login workflow
Charles-Schleich Aug 13, 2024
2467d07
add release-it.json
Charles-Schleich Aug 13, 2024
4e488c3
remove npm login
Charles-Schleich Aug 13, 2024
9a6ebdc
always run cleanup step
Charles-Schleich Aug 13, 2024
48d0052
add publish config to package.json
Charles-Schleich Aug 13, 2024
60695bb
attempt publish zenoh-ts
Charles-Schleich Aug 13, 2024
127fbaa
add packages write permissions
Charles-Schleich Aug 13, 2024
410892f
export Encoding and CongestionControl via index.ts, Update example ex…
Charles-Schleich Aug 13, 2024
10d5032
bump 0.0.2
Charles-Schleich Aug 13, 2024
4a5fd70
build to use self hosted runners
Charles-Schleich Aug 13, 2024
8268d2f
Replace Encoding functions returning values with static readonly, bum…
Charles-Schleich Aug 26, 2024
7b6a5d7
spelling
Charles-Schleich Aug 30, 2024
428d440
remove receiver from map: Finshed get Query
Charles-Schleich Sep 2, 2024
cf53bfd
fix docstring
Charles-Schleich Sep 2, 2024
e1a391b
fix: spelling error
Charles-Schleich Sep 2, 2024
ed9a126
cleanup example, update + cleanup examples, spelling receive
Charles-Schleich Sep 3, 2024
a899b3d
add remote-api-plugin into repository
Charles-Schleich Sep 3, 2024
daac664
Add Deserializer for primitive types, unsigned, signed and float, fix…
Charles-Schleich Sep 4, 2024
1c99685
remove Result, update get signature, update, remove ArrayNumberDeseri…
Charles-Schleich Sep 4, 2024
601e74f
change pipeline directory
Charles-Schleich Sep 5, 2024
6f8ce0a
add working directory to node setup and yarn install
Charles-Schleich Sep 5, 2024
f61aaf4
nest working-directory inside with
Charles-Schleich Sep 5, 2024
b845e47
update get to accept callback, and update example using get
Charles-Schleich Sep 5, 2024
e8c35a0
add Ring / Fifo channel option to Subscriber, align subscriber exampl…
Charles-Schleich Sep 6, 2024
530a3b5
fix example sub_thr
Charles-Schleich Sep 6, 2024
1935dc7
Fix workflow file directory
Charles-Schleich Sep 9, 2024
8eab680
check git repo status
Charles-Schleich Sep 9, 2024
f926195
remove npm install, check git workdir
Charles-Schleich Sep 9, 2024
91d843c
move release-it.json and .npmrc
Charles-Schleich Sep 9, 2024
6f44850
workflow cleanup
Charles-Schleich Sep 9, 2024
c51744b
bump version
Charles-Schleich Sep 9, 2024
205d977
add workflows: check-labels, ci for rust, rename package -> package-ts
Charles-Schleich Sep 9, 2024
6b2415f
Remove Deserialize interface, replace with functions
Charles-Schleich Sep 10, 2024
bfdd83a
remove unneeded async declarations for websocket, replace var with let
Charles-Schleich Sep 10, 2024
9e5bc6b
Add Overloads to subscriber for either callback or handler
Charles-Schleich Sep 11, 2024
e4f1a4c
Add optional params to interface for get, put, delete
Charles-Schleich Sep 11, 2024
7819adc
add put example, fix deserialize Option failure
Charles-Schleich Sep 11, 2024
9cfc321
fmt
Charles-Schleich Sep 12, 2024
6009bae
bump ts version
Charles-Schleich Sep 12, 2024
6ec4542
add workflow to release plugin, add workspace
Charles-Schleich Sep 12, 2024
088a538
fix build pipeline TS
Charles-Schleich Sep 12, 2024
82b0752
Merge branch 'master' into feat/remote-api
Charles-Schleich Sep 12, 2024
f6d7838
Merge pull request #2 from ZettaScaleLabs/feat/remote-api
Charles-Schleich Sep 12, 2024
dd83363
update Readme
Charles-Schleich Sep 12, 2024
384940a
fix plugin handle multiple websockets
Charles-Schleich Sep 13, 2024
f3580df
fix, plugin multiple clients, state cleanup on subscriber tasks
Charles-Schleich Sep 13, 2024
6ac682c
Sync Cargo.lock eclipse-zenoh/zenoh@6b7ec55, fix misaligned api
Charles-Schleich Sep 13, 2024
823810c
publisher remove await
Charles-Schleich Sep 13, 2024
cd3caaf
Add workflow to release plugin
Charles-Schleich Sep 13, 2024
e95029c
Add use of Finalization Registry and dispose. Add cleanup of state in…
Charles-Schleich Sep 16, 2024
b0dae95
Add reliability to publisher. Improve documentation
Charles-Schleich Sep 16, 2024
e0dca42
Removed uneccesary promises, add callback check in Queryable, Sync Ca…
Charles-Schleich Sep 16, 2024
1dfafc7
minor example cleanup
Charles-Schleich Sep 16, 2024
c99144d
fix type signature examples, remove debug console.logs
Charles-Schleich Sep 16, 2024
95ed45e
update README plugin
Charles-Schleich Sep 18, 2024
ae73e0d
Add Admin Space Queryable to remote API plugin
Charles-Schleich Sep 20, 2024
28db147
Improve user API: Replace function arguments with object with named v…
Charles-Schleich Sep 23, 2024
de35337
Cleanup of documentation
Charles-Schleich Sep 23, 2024
0199077
admin space, add ability to query single client /@/<zid>/remote-plugi…
Charles-Schleich Sep 23, 2024
e27e272
fmt
Charles-Schleich Sep 23, 2024
160f463
bump version
Charles-Schleich Sep 24, 2024
cfc6548
export FifoChannel, RingChannel, and deserialize convienence functions
Charles-Schleich Sep 30, 2024
9e241cb
bump version
Charles-Schleich Sep 30, 2024
6631263
add docs, update README and yarn.lock
Charles-Schleich Oct 1, 2024
bf68bc9
Add doc workflow
Charles-Schleich Oct 1, 2024
5922e40
npm ci from zenoh-ts directory
Charles-Schleich Oct 1, 2024
aaf2749
ci: run yarn instead of npm ci
Charles-Schleich Oct 1, 2024
88a9522
move docs to top level directory
Charles-Schleich Oct 1, 2024
8b59e6a
remove top level docs, update workflow
Charles-Schleich Oct 1, 2024
fc78256
target src/index.ts
Charles-Schleich Oct 1, 2024
26baa74
Upload docs
Charles-Schleich Oct 1, 2024
36e9800
combine build-ts and build-rs in single CI
Charles-Schleich Oct 1, 2024
d9b042b
Run action from zenoh-ts directory
Charles-Schleich Oct 1, 2024
ebcee56
move working directory up
Charles-Schleich Oct 1, 2024
244cc45
working directory zenoh-ts top level of job
Charles-Schleich Oct 1, 2024
d18fff5
init tsc before running npx tsc
Charles-Schleich Oct 1, 2024
f2f18f7
borales/actions-yarn@v4 dir zenoh-ts
Charles-Schleich Oct 1, 2024
519f541
remove unneeded `npx --package typescript tsc --init` step workflows
Charles-Schleich Oct 1, 2024
154e70c
Rename pipelines
Charles-Schleich Oct 1, 2024
3f1d161
Merge eclipse-zenoh histories
Charles-Schleich Oct 1, 2024
f71d278
rename ci to build-rs-ts
Charles-Schleich Oct 1, 2024
178f246
match convention of other projects
Charles-Schleich Oct 1, 2024
887ecbd
Update plugin to for new serialization api
Charles-Schleich Oct 3, 2024
8ad9199
Cleanup Examples, add Readme to run examples
Charles-Schleich Oct 4, 2024
694616d
Update README
Charles-Schleich Oct 4, 2024
ccbfea8
Plugin timestamp use to_string_rfc3339_lossy
Charles-Schleich Oct 4, 2024
6c88921
Implement B64 Encoding / decoding for data sent between Rust plugin a…
Charles-Schleich Oct 4, 2024
4679b6c
Use B64 Encoded strings for payload and attachment in interface betwe…
Charles-Schleich Oct 4, 2024
c6e0eeb
Merge pull request #1 from ZettaScaleLabs/b64_encode_payload
Charles-Schleich Oct 4, 2024
61cd0dc
bump version 0.0.9
Charles-Schleich Oct 4, 2024
5a20de4
Docs Link
Charles-Schleich Oct 4, 2024
9808d54
Add Copywrite notice to files
Charles-Schleich Oct 4, 2024
9cc9134
Revert "Plugin timestamp use to_string_rfc3339_lossy"
OlivierHecart Oct 7, 2024
68fd23b
Update zenoh-ts/src/config.ts
gabrik Oct 21, 2024
e0eaec8
Fix encoding enumeration
fuzzypixelz Oct 21, 2024
b91f7bb
Fix namespace
fuzzypixelz Oct 21, 2024
f89a4a9
Fix license field
fuzzypixelz Oct 21, 2024
8e6694c
Fix runner id in package-ts.yaml
fuzzypixelz Oct 21, 2024
08affd4
Fix copyright headers, remove ZettaScaleLabs references
fuzzypixelz Oct 21, 2024
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
15 changes: 15 additions & 0 deletions .github/workflows/check-labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Check required labels

on:
pull_request_target:
types: [opened, synchronize, reopened, labeled]
branches: ["**"]

jobs:
check-labels:
name: Check PR labels
uses: eclipse-zenoh/ci/.github/workflows/check-labels.yml@main
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
permissions:
pull-requests: write
93 changes: 93 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
#
# Copyright (c) 2022 ZettaScale Technology
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
# which is available at https://www.apache.org/licenses/LICENSE-2.0.
#
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
#
# Contributors:
# ZettaScale Zenoh Team, <[email protected]>
#
name: Build TS and Plugin

on:
push:
branches:
- "**"
pull_request:
branches:
- "**"
schedule:
- cron: "0 6 * * 1-5"

jobs:
build-rs:
name: Build Rust plugin on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/[email protected]
- name: Install Rust toolchain
run: |
rustup show
rustup component add rustfmt clippy
- name: Code format check
run: cargo fmt --check -- --config "unstable_features=true,imports_granularity=Crate,group_imports=StdExternalCrate"
- name: Clippy
run: cargo clippy --all --examples -- -D warnings
- name: Build
run: cargo build --all-targets
- name: Run tests
run: cargo test
- name: Cleanup
run: cargo clean

build-ts:
name: Build TS API on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: ./zenoh-ts
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '21'

- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install
dir: 'zenoh-ts'

- name: Transpile Library
run: |
yarn run build

# NOTE: In GitHub repository settings, the "Require status checks to pass
# before merging" branch protection rule ensures that commits are only merged
# from branches where specific status checks have passed. These checks are
# specified manually as a list of workflow job names. Thus we use this extra
# job to signal whether all CI checks have passed.
ci:
name: CI status checks
runs-on: ubuntu-latest
needs: [build-rs, build-ts]
if: always()
steps:
- name: Check whether all jobs pass
run: echo '${{ toJson(needs) }}' | jq -e 'all(.result == "success")'
81 changes: 81 additions & 0 deletions .github/workflows/package-ts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Package zenoh-ts

on:
workflow_dispatch:
inputs:
publish:
description: 'Publish artifacts'
default: false
required: false
type: boolean
version:
description: 'Library version'
required: false
default: '0.0.1'
type: string
zenoh_version:
description: 'Zenoh version'
required: true
type: string
default: '1.0.0-alpha.6'
push:

defaults:
run:
shell: bash
working-directory: ./zenoh-ts

jobs:
package:
name: Package app for ${{ matrix.job.name }}
env:
NUXT_PUBLIC_VERSION: ${{ inputs.version }}
strategy:
fail-fast: false
matrix:
job:
- { name: 'Ubuntu x64', os: 'ubuntu-22.04', arch: X64 }
runs-on: ['self-hosted', '${{ matrix.job.os }}', '${{ matrix.job.arch }}']
fuzzypixelz marked this conversation as resolved.
Show resolved Hide resolved
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: git config
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://npm.pkg.github.com/

- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install
dir: ./zenoh-ts

- name: Transpile Code
run: yarn run build

- name: Publish
id: publish
shell: bash
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
npm install
npx release-it

- name: Cleanup
if: always()
run: |
rm -rf node_modules
rm -rf dist
rm -rf package-lock.json
35 changes: 35 additions & 0 deletions .github/workflows/publish-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "typedoc"

on:
push:
branches: [docs]

permissions:
contents: read
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- run: cd zenoh-ts && yarn install
# Generate your TypeDoc documentation
- run: cd zenoh-ts && npx typedoc src/index.ts
# https://github.com/actions/upload-pages-artifact
- uses: actions/upload-pages-artifact@v2
with:
path: ./zenoh-ts/docs # This should be your TypeDoc "out" path.
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
# https://github.com/actions/deploy-pages
uses: actions/deploy-pages@v2
62 changes: 62 additions & 0 deletions .github/workflows/release-plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Release

permissions:
contents: write

on:
push:
tags:
- v[0-9]+.*

jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/create-gh-release-action@v1
with:
# (optional) Path to changelog.
changelog: CHANGELOG.md
# (required) GitHub token for creating GitHub Releases.
token: ${{ secrets.GITHUB_TOKEN }}

upload-assets:
needs: create-release
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
features: systemd,io_uring
- target: x86_64-apple-darwin
os: macos-latest
- target: x86_64-pc-windows-msvc
os: windows-latest

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: taiki-e/upload-rust-binary-action@v1
with:
# (required) Comma-separated list of binary names (non-extension portion of filename) to build and upload.
# Note that glob pattern is not supported yet.
bin:
[
'zenoh_plugin_remote_api.dll',
'libzenoh_plugin_remote_api.so',
'libzenoh_plugin_remote_api.dylib'
]
# (optional) Target triple, default is host triple.
target: ${{ matrix.target }}
# (optional) On which platform to distribute the `.tar.gz` file.
# [default value: unix]
# [possible values: all, unix, windows, none]
tar: unix
# (optional) On which platform to distribute the `.zip` file.
# [default value: windows]
# [possible values: all, unix, windows, none]
zip: windows
# (optional) Build with the given set of features if any.
features: ${{ matrix.features || '' }}
# (required) GitHub token for uploading assets to GitHub Releases.
token: ${{ secrets.GITHUB_TOKEN }}
Loading