Skip to content

Commit 97b7251

Browse files
authored
Third-party component upload (#31)
* Prepare third-party deps for registry * Create component upload workflow * Update existing workflows * Use registry for nanopb and khash
1 parent d68d73e commit 97b7251

File tree

9 files changed

+84
-15
lines changed

9 files changed

+84
-15
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@ jobs:
1616
uses: ./.github/workflows/build_examples.yml
1717
license-check:
1818
name: License Check
19-
uses: ./.github/workflows/license_check.yml
19+
uses: ./.github/workflows/license_check.yml
20+
registry-check:
21+
name: Registry Check
22+
uses: ./.github/workflows/esp_registry.yml
23+
with: { dry_run: true }

.github/workflows/docs.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: Build Documentation
22
on:
3-
workflow_dispatch:
4-
push:
5-
branches: [main]
6-
concurrency:
7-
group: "docs"
8-
cancel-in-progress: true
3+
workflow_call:
4+
inputs:
5+
deploy:
6+
type: boolean
7+
description: Deploy to GitHub Pages
8+
default: false
99
jobs:
1010
build-docs:
1111
name: Build Documentation
@@ -21,11 +21,13 @@ jobs:
2121
- name: Configure Pages
2222
uses: actions/configure-pages@v5
2323
- name: Upload Generated Docs
24+
if: ${{ inputs.deploy }}
2425
uses: actions/upload-pages-artifact@v3
2526
with: { path: docs/output/html }
26-
deploy:
27+
deploy-docs:
2728
name: Deploy Documentation
2829
needs: build-docs
30+
if: ${{ inputs.deploy }}
2931
permissions:
3032
pages: write
3133
id-token: write

.github/workflows/esp_registry.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: ESP Registry
2+
on:
3+
workflow_call:
4+
inputs:
5+
dry_run:
6+
type: boolean
7+
description: Do not actually upload the components
8+
default: true
9+
jobs:
10+
esp_registry:
11+
name: Upload Components
12+
runs-on: ubuntu-latest
13+
env:
14+
COMPONENTS: |
15+
nanopb:./components/third_party/nanopb
16+
khash:./components/third_party/khash
17+
steps:
18+
- uses: actions/checkout@v4
19+
with: { submodules: recursive }
20+
- name: Upload Components (Dry Run)
21+
uses: espressif/upload-components-ci-action@v2
22+
if: ${{ inputs.dry_run }}
23+
with:
24+
components: ${{ env.COMPONENTS }}
25+
namespace: livekit
26+
api_token: ${{ secrets.ESP_REGISTRY_TOKEN }}
27+
dry_run: true
28+
- name: Upload Components
29+
uses: espressif/upload-components-ci-action@v2
30+
if: ${{ !inputs.dry_run }}
31+
with:
32+
components: ${{ env.COMPONENTS }}
33+
namespace: livekit
34+
api_token: ${{ secrets.ESP_REGISTRY_TOKEN }}
35+
dry_run: false

.github/workflows/release.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Release
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches: [main]
6+
jobs:
7+
registry-upload:
8+
name: Registry Upload
9+
uses: ./.github/workflows/esp_registry.yml
10+
with: { dry_run: false }
11+
deploy-docs:
12+
name: Deploy Documentation
13+
uses: ./.github/workflows/docs.yml
14+
with: { deploy: true }

components/livekit/idf_component.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ dependencies:
1515
espressif/esp_peer: ~1.2.3
1616
media_lib_sal:
1717
path: ../third_party/esp-webrtc-solution/components/media_lib_sal
18-
nanopb:
19-
path: ../third_party/nanopb
20-
khash:
21-
path: ../third_party/khash
18+
livekit/nanopb: ~0.4.9
19+
livekit/khash: ~0.1.0
2220
files:
2321
use_gitignore: true
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Khash
2+
3+
A generic hash table with open addressing from [Klib](https://github.com/attractivechaos/klib).
4+
5+
---
6+
7+
**Important**: This component is uploaded to the ESP Component Registry unofficially and is not affiliated with the Klib project. It is used as a dependency of the [LiveKit ESP32 SDK](https://github.com/livekit/client-sdk-esp32) and may not be regularly updated with the upstream project.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
description: Khash (from klib)
1+
version: 0.1.0
2+
description: A generic hash table with open addressing.
3+
url: https://attractivechaos.github.io/klib/
24
repository: https://github.com/attractivechaos/klib
35
license: MIT
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Nanopb
2+
3+
Protocol buffer library for embedded systems.
4+
5+
---
6+
7+
**Important**: This component is uploaded to the ESP Component Registry unofficially and is not affiliated with the Nanopb project. It is used as a dependency of the [LiveKit ESP32 SDK](https://github.com/livekit/client-sdk-esp32) and may not be regularly updated with the upstream project.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
description: Nanopb
1+
version: 0.4.9
2+
description: Protocol buffer library for embedded systems.
23
url: https://jpa.kapsi.fi/nanopb/
34
repository: https://github.com/nanopb/nanopb/
45
documentation: https://jpa.kapsi.fi/nanopb/docs/
5-
version: 0.4.9
66
license: Zlib

0 commit comments

Comments
 (0)