Skip to content

Commit

Permalink
Merge protocol_changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mallets committed Apr 11, 2024
2 parents 934895d + a1b50dd commit cb03f10
Show file tree
Hide file tree
Showing 91 changed files with 4,214 additions and 2,167 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@ jobs:
- name: Run doctests
run: cargo test --doc

- name: Install valgrind
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get install -y valgrind
shell: bash

- name: Run memory leaks check
if: ${{ matrix.os == 'ubuntu-latest' }}
run: ci/valgrind-check/run.sh
shell: bash

# 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
Expand Down
60 changes: 0 additions & 60 deletions .github/workflows/enforce-linking-issues.yml

This file was deleted.

15 changes: 5 additions & 10 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@ jobs:
- name: Clone this repository
uses: actions/checkout@v4

- name: Install Rust toolchain
run: |
rustup show
rustup component add rustfmt clippy
- name: Install rustup components
run: rustup component add rustfmt clippy

- name: Code format check
run: cargo fmt --check
Expand All @@ -62,11 +60,8 @@ jobs:
- name: Clone this repository
uses: actions/checkout@v4

- name: Install Rust toolchain
run: rustup show

- name: Install nextest
run: cargo install --locked cargo-nextest
run: cargo +stable install --locked cargo-nextest
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse

Expand All @@ -83,7 +78,7 @@ jobs:
ASYNC_STD_THREAD_COUNT: 4

doc:
name: Doc generation
name: Generate documentation
needs: checks
runs-on: ubuntu-latest
steps:
Expand All @@ -94,7 +89,7 @@ jobs:
- name: Install Rust toolchain nightly for docs gen
run: rustup toolchain install nightly

- name: generate doc
- name: Run rustdoc using Nightly Rust and Zenoh unstable
# NOTE: force 'unstable' feature for doc generation, as forced for docs.rs build in zenoh/Cargo.toml
run: >
cargo +nightly rustdoc --manifest-path ./zenoh/Cargo.toml --lib --features unstable -j3
Expand Down
50 changes: 34 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,38 @@ on:
inputs:
live-run:
type: boolean
description: If false (or undefined) the workflow runs in dry-run mode (i.e. with no side-effects)
description: Live-run
required: false
default: false
version:
type: string
description: Release number. If undefined, the workflow auto-generates a version using git-describe
description: Release number
required: false

jobs:
tag:
name: Bump and tag crates
uses: eclipse-zenoh/ci/.github/workflows/tag-crates.yml@main
with:
repo: ${{ github.repository }}
live-run: ${{ inputs.live-run || false }}
version: ${{ inputs.version }}
inter-deps-pattern: zenoh.*
secrets: inherit
name: Branch, bump & tag crates
runs-on: ubuntu-latest
outputs:
version: ${{ steps.create-release-branch.outputs.version }}
branch: ${{ steps.create-release-branch.outputs.branch }}
steps:
- id: create-release-branch
uses: eclipse-zenoh/ci/create-release-branch@main
with:
repo: ${{ github.repository }}
live-run: ${{ inputs.live-run || false }}
version: ${{ inputs.version }}
github-token: ${{ secrets.BOT_TOKEN_WORKFLOW }}

- uses: eclipse-zenoh/ci/bump-crates@main
with:
repo: ${{ github.repository }}
version: ${{ steps.create-release-branch.outputs.version }}
branch: ${{ steps.create-release-branch.outputs.branch }}
bump-deps-pattern: zenoh.*
bump-deps-version: ${{ steps.create-release-branch.outputs.version }}
github-token: ${{ secrets.BOT_TOKEN_WORKFLOW }}

build-debian:
name: Build Debian packages
Expand All @@ -64,14 +78,14 @@ jobs:
secrets: inherit

cargo:
name: Publish Cargo crates
needs: tag
name: Publish Cargo crates
uses: eclipse-zenoh/ci/.github/workflows/release-crates-cargo.yml@main
with:
repos: ${{ github.repository }}
repo: ${{ github.repository }}
live-run: ${{ inputs.live-run || false }}
branch: ${{ needs.tag.outputs.branch }}
inter-deps-pattern: zenoh.*
unpublished-deps-patterns: "zenoh.*"
secrets: inherit

debian:
Expand Down Expand Up @@ -146,9 +160,10 @@ jobs:
uses: eclipse-zenoh/ci/.github/workflows/release-crates-dockerhub.yml@main
with:
no-build: true
live-run: ${{ inputs.live-run || false }}
live-run: true
version: ${{ needs.tag.outputs.version }}
repo: ${{ github.repository }}
branch: ${{ needs.tag.outputs.branch }}
tags: "eclipse/zenoh:${{ needs.tag.outputs.version }}"
binary: zenohd
files: |
Expand All @@ -158,6 +173,7 @@ jobs:
platforms: |
linux/arm64
linux/amd64
licenses: EPL-2.0 OR Apache-2.0
secrets: inherit

ghcr:
Expand All @@ -166,10 +182,11 @@ jobs:
uses: eclipse-zenoh/ci/.github/workflows/release-crates-ghcr.yml@main
with:
no-build: true
live-run: ${{ inputs.live-run || false }}
live-run: true
version: ${{ needs.tag.outputs.version }}
repo: ${{ github.repository }}
tags: "${{ github.repository }}:${{ needs.tag.outputs.version }}"
branch: ${{ needs.tag.outputs.branch }}
tags: "ghcr.io/${{ github.repository }}:${{ needs.tag.outputs.version }}"
binary: zenohd
files: |
zenohd
Expand All @@ -178,4 +195,5 @@ jobs:
platforms: |
linux/arm64
linux/amd64
licenses: EPL-2.0 OR Apache-2.0
secrets: inherit
25 changes: 22 additions & 3 deletions .github/workflows/sync-lockfiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,22 @@ jobs:
fetch:
name: Fetch Zenoh's lockfile
runs-on: ubuntu-latest
outputs:
zenoh-head-hash: ${{ steps.info.outputs.head-hash }}
zenoh-head-date: ${{ steps.info.outputs.head-date }}
steps:
- name: Checkout Zenoh
uses: actions/checkout@v4
with:
repository: eclipse-zenoh/zenoh
ref: ${{ inputs.branch }}

- id: info
name: Get HEAD info
run: |
echo "head-hash=$(git log -1 --format=%h)" >> $GITHUB_OUTPUT
echo "head-date=$(git log -1 --format=%ad)" >> $GITHUB_OUTPUT
- name: Upload lockfile
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -94,8 +103,14 @@ jobs:
# NOTE: If there is a pending PR, this action will simply update it with a forced push.
uses: peter-evans/create-pull-request@v6
with:
title: Sync lockfile with Zenoh's
body: Automated synchronization of the Cargo lockfile with Zenoh. This is done to ensure plugin ABI compatibility.
title: Sync `Cargo.lock` with `eclipse-zenoh/zenoh@${{ needs.fetch.outputs.zenoh-head-hash }}` from `${{ needs.fetch.outputs.zenoh-head-date }}`"
body: >
This pull request synchronizes ${{ matrix.dependant }}'s Cargo lockfile with zenoh's.
This is done to ensure ABI compatibility between Zenoh applications, backends & plugins.
- **Zenoh HEAD hash**: eclipse-zenoh/zenoh@${{ needs.fetch.outputs.zenoh-head-hash }}
- **Zenoh HEAD date**: ${{ needs.fetch.outputs.zenoh-head-date }}
- **Workflow run**: [${{ github.run_id }}](https://github.com/eclipse-zenoh/zenoh/actions/runs/${{ github.run_id }})
commit-message: "chore: Sync Cargo lockfile with Zenoh's"
committer: eclipse-zenoh-bot <[email protected]>
author: eclipse-zenoh-bot <[email protected]>
Expand All @@ -107,6 +122,10 @@ jobs:

- name: Enable auto merge for the pull request
if: steps.cpr.outputs.pull-request-operation == 'created'
run: gh pr merge -R "eclipse-zenoh/${{ matrix.dependant }}" --merge --auto "${{ steps.cpr.outputs.pull-request-number }}"
run: >
gh pr merge "${{ steps.cpr.outputs.pull-request-number }}"
--repo "eclipse-zenoh/${{ matrix.dependant }}"
--squash
--auto
env:
GH_TOKEN: ${{ secrets.BOT_TOKEN_WORKFLOW }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@
.vscode

cargo-timing*.html

ci/valgrind-check/*.log
24 changes: 24 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit cb03f10

Please sign in to comment.