Skip to content

Commit

Permalink
Merge pull request #6 from eclipse-chariott/ladatz/migratedm
Browse files Browse the repository at this point in the history
Migrate Dog Mode end to end example to the examples repository
  • Loading branch information
ladatz authored Feb 7, 2024
2 parents 69560f3 + 4a28243 commit aa0e8d9
Show file tree
Hide file tree
Showing 98 changed files with 11,014 additions and 21 deletions.
2 changes: 2 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[env]
DEFAULT_INTENT_BROKER_URL = "http://0.0.0.0:4243"
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.pb filter=lfs diff=lfs merge=lfs -text
intent_brokering/dogmode/applications/local-object-detection/models/ssd_mobilenet_v2_coco.pb filter=lfs diff=lfs merge=lfs -text
37 changes: 37 additions & 0 deletions .github/workflows/devskim.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: DevSkim

on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '17 19 * * 4'

jobs:
lint:
name: DevSkim
runs-on: ubuntu-20.04
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Run DevSkim scanner
uses: microsoft/DevSkim-Action@v1
with:
ignore-globs: "*.json"

- name: Upload DevSkim scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: devskim-results.sarif
33 changes: 33 additions & 0 deletions .github/workflows/dotnet-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: .NET CI

on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- 'intent_brokering/dogmode/applications/dog-mode-ui/**'
- '.github/workflows/dotnet-ci.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.403
global-json-file: intent_brokering/dogmode/applications/dog-mode-ui/global.json

- run: dotnet --info

- run: dotnet build intent_brokering/dogmode/applications/dog-mode-ui
27 changes: 27 additions & 0 deletions .github/workflows/editorconfig-audit-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: EditorConfig audit

on:
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
editorconfig-audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: '16'
- run: npm install eclint
- run: |
# Unfortunately, if the "".editorconfig" is present then "eclint"
# checks for full conformance either irrespective or on top of the
# check options you given the command-line. By removing the file, only
# the given options are checked.
git ls-files | grep -iF .editorconfig | xargs -t -n 1 rm
env node_modules/.bin/eclint check --insert_final_newline --trim_trailing_whitespace $(git ls-files | grep -viF .editorconfig | grep -viE "\.pb$")
4 changes: 3 additions & 1 deletion .github/workflows/markdown-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
- 'docs/**'
- '**.md'
- '**.markdown'
- 'tools/.markdownlint.jsonc'
- 'tools/.markdownlinkcheck.json'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -30,4 +32,4 @@ jobs:
- uses: actions/checkout@v2
- run: |
npm install markdown-link-check
find . -type d \( -name node_modules -o -name .github \) -prune -o -type f -name '*.md' -print0 | xargs -0 -n1 node_modules/.bin/markdown-link-check --config ./tools/.markdownlinkcheck.jsonc --quiet
find . -type d \( -name node_modules -o -name .github \) -prune -o -type f -name '*.md' -print0 | xargs -0 -n1 node_modules/.bin/markdown-link-check --config ./tools/.markdownlinkcheck.json --quiet
84 changes: 84 additions & 0 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Rust CI

on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- 'intent_brokering/dogmode/common/**'
- 'intent_brokering/dogmode/applications/**'
- 'Cargo.lock'
- 'Cargo.toml'
- 'rust-toolchain.toml'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

env:
CARGO_TERM_COLOR: always

jobs:
static_code_analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install protobuf-compiler
run: sudo apt-get install -y protobuf-compiler
- name: Install stable toolchain
run: |
rustup show
rustup component add rustfmt clippy
- name: Cache Dependencies
uses: Swatinem/rust-cache@v1
- run: cargo check --workspace --locked
- run: cargo clippy --all-targets --all-features --workspace --no-deps -- -D warnings
- run: cargo fmt --all -- --check
- name: Run doctest only
# we run doctests here as cargo tarpaulin (our test runner)
# requires nightly toolchain to do so
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --doc
- name: Run cargo doc
# This step is required to detect possible errors in docs that are not doctests.
uses: actions-rs/cargo@v1
with:
command: doc
args: --workspace --no-deps # Warnings are treated as errors due to our .cargo/config file.


build_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install protobuf-compiler
run: sudo apt-get install -y protobuf-compiler
- name: Install stable toolchain
run: rustup show
- name: Cache Dependencies
uses: Swatinem/rust-cache@v1
- name: Run cargo-tarpaulin
uses: actions-rs/[email protected]
with:
version: '0.21.0'
args: '--workspace --ignore-tests --skip-clean --exclude-files spikes/* --exclude-files examples/* --exclude-files tests/*'

buf:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: bufbuild/buf-setup-action@v1
with:
version: '1.8.0'
- uses: bufbuild/buf-lint-action@v1
23 changes: 23 additions & 0 deletions .github/workflows/security-audit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Security Audit
on:
pull_request:
branches:
- main
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
- ".github/workflows/security-audit.yaml"
schedule:
- cron: "0 0 * * *" # once a day at midnight UTC
# NB: that cron trigger on GH actions runs only on the default branch

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: cargo audit -D warnings
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ bld/
**/*.rs.bk

# Stops pushes of local vscode files.
/.vscode/*
/.vscode/*
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "external/chariott"]
path = external/chariott
url = https://github.com/eclipse-chariott/chariott
Loading

0 comments on commit aa0e8d9

Please sign in to comment.