kopia lustrzana https://github.com/meshtastic/protobufs
Namespace protobufs & use Trunk
rodzic
1326e9e1bf
commit
d7f485f9c5
|
@ -1,6 +1,6 @@
|
|||
<!-- Describe what you are intending to change -->
|
||||
|
||||
## What does this PR do?
|
||||
# What does this PR do?
|
||||
|
||||
<!-- Please remove or replace the issue url -->
|
||||
|
||||
|
|
|
@ -1,73 +1,12 @@
|
|||
name: "CI"
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
name: pull-request
|
||||
on: pull_request
|
||||
jobs:
|
||||
|
||||
lint:
|
||||
if: ${{ github.event_name != 'workflow_dispatch' }}
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: checkout source
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: run protolint
|
||||
uses: plexsystems/protolint-action@v0.2.0
|
||||
with:
|
||||
configDirectory: .
|
||||
|
||||
release:
|
||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: checkout source
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.x
|
||||
|
||||
- name: Cache python libs
|
||||
uses: actions/cache@v3
|
||||
id: cache-pip # needed in if test
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip
|
||||
|
||||
- name: Upgrade python tools
|
||||
shell: bash
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
|
||||
- name: Get release version string
|
||||
run: echo "version=$(./scripts/buildinfo.py short)" >> $GITHUB_OUTPUT
|
||||
id: version
|
||||
|
||||
- name: Create release
|
||||
uses: actions/create-release@v1
|
||||
id: create_release
|
||||
with:
|
||||
release_name: Meshtastic Protobufs ${{ steps.version.outputs.version }}
|
||||
tag_name: v${{ steps.version.outputs.version }}
|
||||
body: Protobufs for version ${{ steps.version.outputs.version }} release of Meshtastic firmware
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
|
||||
- name: Bump version.properties
|
||||
run: >-
|
||||
scripts/bump_version.py
|
||||
|
||||
- name: Create version.properties pull request
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
with:
|
||||
add-paths: |
|
||||
version.properties
|
||||
- uses: actions/checkout@v2
|
||||
- uses: bufbuild/buf-setup-action@v1
|
||||
- uses: bufbuild/buf-lint-action@v1
|
||||
- uses: bufbuild/buf-breaking-action@v1
|
||||
with:
|
||||
against: "https://github.com/${GITHUB_REPOSITORY}.git#branch=master"
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
name: "CI"
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
if: ${{ github.event_name != 'workflow_dispatch' }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: checkout source
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: run protolint
|
||||
uses: plexsystems/protolint-action@v0.2.0
|
||||
with:
|
||||
configDirectory: .
|
||||
|
||||
release:
|
||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: checkout source
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.x
|
||||
|
||||
- name: Cache python libs
|
||||
uses: actions/cache@v3
|
||||
id: cache-pip # needed in if test
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip
|
||||
|
||||
- name: Upgrade python tools
|
||||
shell: bash
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
|
||||
- name: Get release version string
|
||||
run: echo "version=$(./scripts/buildinfo.py short)" >> $GITHUB_OUTPUT
|
||||
id: version
|
||||
|
||||
- name: Create release
|
||||
uses: actions/create-release@v1
|
||||
id: create_release
|
||||
with:
|
||||
release_name: Meshtastic Protobufs ${{ steps.version.outputs.version }}
|
||||
tag_name: v${{ steps.version.outputs.version }}
|
||||
body: Protobufs for version ${{ steps.version.outputs.version }} release of Meshtastic firmware
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
|
||||
- name: Bump version.properties
|
||||
run: >-
|
||||
scripts/bump_version.py
|
||||
|
||||
- name: Create version.properties pull request
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
with:
|
||||
add-paths: |
|
||||
version.properties
|
|
@ -0,0 +1,19 @@
|
|||
name: Nightly
|
||||
on:
|
||||
schedule:
|
||||
- cron: 0 8 * * 1-5
|
||||
workflow_dispatch: {}
|
||||
|
||||
jobs:
|
||||
trunk_check:
|
||||
name: Trunk Check Upload
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Trunk Check
|
||||
uses: trunk-io/trunk-action@v1
|
||||
with:
|
||||
trunk-token: ${{ secrets.TRUNK_TOKEN }}
|
|
@ -1,19 +0,0 @@
|
|||
name: Update docs
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
|
||||
update-docs:
|
||||
environment: Production
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Update Docs
|
||||
uses: benc-uk/workflow-dispatch@v1
|
||||
with:
|
||||
workflow: "Update protobufs"
|
||||
repo: meshtastic/meshtastic
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
|
@ -1,20 +0,0 @@
|
|||
---
|
||||
lint:
|
||||
|
||||
rules:
|
||||
|
||||
remove:
|
||||
- ENUM_FIELD_NAMES_PREFIX
|
||||
- ENUM_FIELD_NAMES_UPPER_SNAKE_CASE
|
||||
- ENUM_NAMES_UPPER_CAMEL_CASE
|
||||
- FIELD_NAMES_LOWER_SNAKE_CASE
|
||||
- ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH
|
||||
- REPEATED_FIELD_NAMES_PLURALIZED
|
||||
- ORDER
|
||||
|
||||
rules_option:
|
||||
max_line_length:
|
||||
max_chars: 180
|
||||
|
||||
indent:
|
||||
style: 2
|
|
@ -0,0 +1,7 @@
|
|||
*out
|
||||
*logs
|
||||
*actions
|
||||
*notifications
|
||||
plugins
|
||||
user_trunk.yaml
|
||||
user.yaml
|
|
@ -0,0 +1,10 @@
|
|||
# Autoformatter friendly markdownlint config (all formatting rules disabled)
|
||||
default: true
|
||||
blank_lines: false
|
||||
bullet: false
|
||||
html: false
|
||||
indentation: false
|
||||
line_length: false
|
||||
spaces: false
|
||||
url: false
|
||||
whitespace: false
|
|
@ -0,0 +1,28 @@
|
|||
version: 0.1
|
||||
cli:
|
||||
version: 1.3.1
|
||||
plugins:
|
||||
sources:
|
||||
- id: trunk
|
||||
ref: v0.0.8
|
||||
uri: https://github.com/trunk-io/plugins
|
||||
lint:
|
||||
enabled:
|
||||
- buf-lint@1.12.0
|
||||
- buf-breaking@1.12.0
|
||||
- actionlint@1.6.22
|
||||
- markdownlint@0.33.0
|
||||
- prettier@2.8.3
|
||||
- gitleaks@8.15.2
|
||||
- git-diff-check
|
||||
runtimes:
|
||||
enabled:
|
||||
- go@1.18.3
|
||||
- node@18.12.1
|
||||
actions:
|
||||
disabled:
|
||||
- trunk-announce
|
||||
- trunk-check-pre-push
|
||||
- trunk-fmt-pre-commit
|
||||
enabled:
|
||||
- trunk-upgrade-available
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"recommendations": ["zxh404.vscode-proto3", "plex.vscode-protolint"]
|
||||
"recommendations": ["trunk.io", "pbkit.vscode-pbkit"]
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{
|
||||
"cmake.configureOnOpen": false
|
||||
}
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "trunk.io"
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
The [Protobuf](https://developers.google.com/protocol-buffers) message definitions for the Meshtastic project (used by apps and the device firmware).
|
||||
|
||||
**[Documentation/API Reference](https://meshtastic.org/docs/developers/protobufs/api)**
|
||||
**[Documentation/API Reference](https://buf.build/meshtastic/protobufs)**
|
||||
|
||||
## Stats
|
||||
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
version: v1
|
||||
name: "buf.build/meshtastic/protobufs"
|
||||
deps: []
|
||||
build:
|
||||
excludes: []
|
||||
breaking:
|
||||
use:
|
||||
- FILE
|
||||
lint:
|
||||
use:
|
||||
- MINIMAL
|
|
@ -1,18 +1,19 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option java_package = "com.geeksville.mesh";
|
||||
option optimize_for = LITE_RUNTIME;
|
||||
option go_package = "github.com/meshtastic/go/generated";
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
|
||||
import "channel.proto";
|
||||
import "config.proto";
|
||||
import "device_metadata.proto";
|
||||
import "mesh.proto";
|
||||
import "module_config.proto";
|
||||
|
||||
option java_outer_classname = "AdminProtos";
|
||||
|
||||
import "meshtastic/channel.proto";
|
||||
import "meshtastic/config.proto";
|
||||
import "meshtastic/device_metadata.proto";
|
||||
import "meshtastic/mesh.proto";
|
||||
import "meshtastic/module_config.proto";
|
||||
|
||||
/*
|
||||
* This message is handled by the Admin module and is responsible for all settings/channel read/write operations.
|
||||
* This message is used to do settings operations to both remote AND local nodes.
|
|
@ -1,15 +1,16 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option java_package = "com.geeksville.mesh";
|
||||
option optimize_for = LITE_RUNTIME;
|
||||
option go_package = "github.com/meshtastic/go/generated";
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
|
||||
import "channel.proto";
|
||||
import "config.proto";
|
||||
|
||||
option java_outer_classname = "AppOnlyProtos";
|
||||
|
||||
import "meshtastic/channel.proto";
|
||||
import "meshtastic/config.proto";
|
||||
|
||||
/*
|
||||
* This is the most compact possible representation for a set of channels.
|
||||
* It includes only one PRIMARY channel (which must be first) and
|
|
@ -1,5 +1,7 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option java_package = "com.geeksville.mesh";
|
||||
option java_outer_classname = "CannedMessageConfigProtos";
|
||||
option optimize_for = LITE_RUNTIME;
|
|
@ -1,10 +1,10 @@
|
|||
syntax = "proto3";
|
||||
|
||||
option java_package = "com.geeksville.mesh";
|
||||
package meshtastic;
|
||||
|
||||
option java_package = "com.geeksville.mesh";
|
||||
option optimize_for = LITE_RUNTIME;
|
||||
option go_package = "github.com/meshtastic/go/generated";
|
||||
|
||||
option java_outer_classname = "ChannelProtos";
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option java_package = "com.geeksville.mesh";
|
||||
option java_outer_classname = "ConfigProtos";
|
||||
option optimize_for = LITE_RUNTIME;
|
|
@ -1,9 +1,10 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option java_package = "com.geeksville.mesh";
|
||||
option optimize_for = LITE_RUNTIME;
|
||||
option go_package = "github.com/meshtastic/go/generated";
|
||||
|
||||
option java_outer_classname = "DeviceMetadataProtos";
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
|
|
@ -1,15 +1,16 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option java_package = "com.geeksville.mesh";
|
||||
option optimize_for = LITE_RUNTIME;
|
||||
option go_package = "github.com/meshtastic/go/generated";
|
||||
|
||||
import "channel.proto";
|
||||
import "mesh.proto";
|
||||
|
||||
option java_outer_classname = "DeviceOnly";
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
|
||||
import "meshtastic/channel.proto";
|
||||
import "meshtastic/mesh.proto";
|
||||
|
||||
/*
|
||||
* This message is never sent over the wire, but it is used for serializing DB
|
||||
* state to flash in the device code
|
|
@ -1,15 +1,16 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option java_package = "com.geeksville.mesh";
|
||||
option optimize_for = LITE_RUNTIME;
|
||||
option go_package = "github.com/meshtastic/go/generated";
|
||||
|
||||
import "config.proto";
|
||||
import "module_config.proto";
|
||||
|
||||
option java_outer_classname = "LocalOnlyProtos";
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
|
||||
import "meshtastic/config.proto";
|
||||
import "meshtastic/module_config.proto";
|
||||
|
||||
/*
|
||||
* Protobuf structures common to apponly.proto and deviceonly.proto
|
||||
* This is never sent over the wire, only for local use
|
|
@ -1,18 +1,19 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option java_package = "com.geeksville.mesh";
|
||||
option optimize_for = LITE_RUNTIME;
|
||||
option go_package = "github.com/meshtastic/go/generated";
|
||||
|
||||
import "channel.proto";
|
||||
import "config.proto";
|
||||
import "module_config.proto";
|
||||
import "portnums.proto";
|
||||
import "telemetry.proto";
|
||||
|
||||
option java_outer_classname = "MeshProtos";
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
|
||||
import "meshtastic/channel.proto";
|
||||
import "meshtastic/config.proto";
|
||||
import "meshtastic/module_config.proto";
|
||||
import "meshtastic/portnums.proto";
|
||||
import "meshtastic/telemetry.proto";
|
||||
|
||||
/*
|
||||
* a gps position
|
||||
*/
|
|
@ -1,5 +1,7 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option java_package = "com.geeksville.mesh";
|
||||
option java_outer_classname = "ModuleConfigProtos";
|
||||
option optimize_for = LITE_RUNTIME;
|
|
@ -1,14 +1,15 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option java_package = "com.geeksville.mesh";
|
||||
option optimize_for = LITE_RUNTIME;
|
||||
option go_package = "github.com/meshtastic/go/generated";
|
||||
|
||||
import "mesh.proto";
|
||||
|
||||
option java_outer_classname = "MQTTProtos";
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
|
||||
import "meshtastic/mesh.proto";
|
||||
|
||||
/*
|
||||
* This message wraps a MeshPacket with extra metadata about the sender and how it arrived.
|
||||
*/
|
|
@ -1,5 +1,7 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option java_package = "com.geeksville.mesh";
|
||||
option java_outer_classname = "Portnums";
|
||||
option optimize_for = LITE_RUNTIME;
|
|
@ -1,5 +1,7 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option java_package = "com.geeksville.mesh";
|
||||
option java_outer_classname = "RemoteHardware";
|
||||
option optimize_for = LITE_RUNTIME;
|
|
@ -1,5 +1,7 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option java_package = "com.geeksville.mesh";
|
||||
option java_outer_classname = "RTTTLConfigProtos";
|
||||
option optimize_for = LITE_RUNTIME;
|
|
@ -1,5 +1,7 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option java_package = "com.geeksville.mesh";
|
||||
option java_outer_classname = "StoreAndForwardProtos";
|
||||
option optimize_for = LITE_RUNTIME;
|
|
@ -1,9 +1,10 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option java_package = "com.geeksville.mesh";
|
||||
option optimize_for = LITE_RUNTIME;
|
||||
option go_package = "github.com/meshtastic/go/generated";
|
||||
|
||||
option java_outer_classname = "TelemetryProtos";
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
|
Ładowanie…
Reference in New Issue