Skip to content

Commit

Permalink
Merge branch 'dev/1.0.0' into authn/testing
Browse files Browse the repository at this point in the history
  • Loading branch information
oteffahi committed May 28, 2024
2 parents babdabc + 6174356 commit b4aaef9
Show file tree
Hide file tree
Showing 454 changed files with 27,951 additions and 14,993 deletions.
7 changes: 6 additions & 1 deletion .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ slow-timeout = { period = "60s", terminate-after = 2 }
filter = """
test(=zenoh_session_unicast) |
test(=zenoh_session_multicast) |
test(=zenoh_unicity_p2p) |
test(=zenoh_unicity_brokered) |
test(=transport_tcp_intermittent) |
test(=transport_tcp_intermittent_for_lowlatency_transport) |
test(=three_node_combination) |
test(=downsampling_by_keyexpr)
test(=watchdog_alloc_concurrent) |
test(=header_check_memory_concurrent) |
test(=header_link_concurrent) |
test(=header_link_failure_concurrent)
"""
threads-required = 'num-cpus'
slow-timeout = { period = "60s", terminate-after = 6 }
26 changes: 19 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ on:
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
CARGO_PROFILE_DEV_DEBUG: false
RUSTUP_WINDOWS_PATH_ADD_BIN: 1

jobs:
check:
Expand All @@ -38,23 +39,27 @@ jobs:
- name: Clone this repository
uses: actions/checkout@v4

- name: Install Rust toolchain
run: |
rustup show
rustup component add rustfmt clippy
- name: Setup rust-cache
uses: Swatinem/rust-cache@v2

- name: Update Stable Rust toolchain
run: rustup update stable

- name: Install latest cargo-deny
uses: taiki-e/install-action@cargo-deny

- name: Code format check
run: cargo fmt --check
run: cargo fmt --check -- --config "unstable_features=true,imports_granularity=Crate,group_imports=StdExternalCrate"

- name: Clippy
run: cargo +stable clippy --all-targets -- --deny warnings

- name: Clippy unstable targets
run: cargo +stable clippy --all-targets --features unstable -- --deny warnings

- name: Clippy shared memory without unstable
run: cargo +stable clippy --all-targets --features shared-memory -- --deny warnings

- name: Clippy all features
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest' }}
run: cargo +stable clippy --all-targets --all-features -- --deny warnings
Expand All @@ -69,6 +74,9 @@ jobs:
- name: Run doctests
run: cargo test --doc

- name: Check licenses
run: cargo deny check licenses

test:
name: Unit tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -101,8 +109,12 @@ jobs:
run: cargo nextest run --exclude zenoh-examples --exclude zenoh-plugin-example --workspace

- name: Run tests with SHM
if: ${{ matrix.os == 'macOS-latest' || matrix.os == 'windows-latest' }}
run: cargo nextest run -F shared-memory -F unstable -E 'not (test(test_default_features))' --exclude zenoh-examples --exclude zenoh-plugin-example --workspace

- name: Run tests with SHM + unixpipe
if: ${{ matrix.os == 'ubuntu-latest' }}
run: cargo nextest run -F shared-memory -F transport_unixpipe -p zenoh-transport
run: cargo nextest run -F shared-memory -F unstable -F transport_unixpipe -E 'not (test(test_default_features))' --exclude zenoh-examples --exclude zenoh-plugin-example --workspace

- name: Check for feature leaks
if: ${{ matrix.os == 'ubuntu-latest' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
run: rustup component add rustfmt clippy

- name: Code format check
run: cargo fmt --check
run: cargo fmt --check -- cargo fmt --check -- --config "unstable_features=true,imports_granularity=Crate,group_imports=StdExternalCrate"
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse

Expand Down
26 changes: 2 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,33 +160,11 @@ jobs:
uses: eclipse-zenoh/ci/.github/workflows/release-crates-dockerhub.yml@main
with:
no-build: true
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: |
zenohd
libzenoh_plugin_rest.so
libzenoh_plugin_storage_manager.so
platforms: |
linux/arm64
linux/amd64
licenses: EPL-2.0 OR Apache-2.0
secrets: inherit

ghcr:
name: Publish container image to GitHub Container Registry
needs: [tag, build-standalone]
uses: eclipse-zenoh/ci/.github/workflows/release-crates-ghcr.yml@main
with:
no-build: true
live-run: true
live-run: ${{ inputs.live-run || false }}
version: ${{ needs.tag.outputs.version }}
repo: ${{ github.repository }}
branch: ${{ needs.tag.outputs.branch }}
tags: "ghcr.io/${{ github.repository }}:${{ needs.tag.outputs.version }}"
image: "eclipse/zenoh"
binary: zenohd
files: |
zenohd
Expand Down
21 changes: 21 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#
# Copyright (c) 2024 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]>
#
repos:
- repo: local
hooks:
- id: fmt
name: fmt
entry: cargo fmt -- --config "unstable_features=true,imports_granularity=Crate,group_imports=StdExternalCrate"
language: system
types: [rust]
Loading

0 comments on commit b4aaef9

Please sign in to comment.