Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
james-rms committed Sep 25, 2024
2 parents c6675cb + 0ebaf69 commit 866e4b8
Show file tree
Hide file tree
Showing 109 changed files with 3,729 additions and 1,966 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ contact_links:
url: https://robotics.stackexchange.com/questions/ask
about: Get help from the robotics community
- name: "💬 Live chat"
url: https://foxglove.dev/slack
about: Join the discussion in our Slack community
url: https://foxglove.dev/chat
about: Join the discussion in our Discord community
51 changes: 29 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
spellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true
- run: corepack enable
Expand All @@ -26,7 +26,7 @@ jobs:
conformance-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true
- run: corepack enable
Expand All @@ -41,7 +41,7 @@ jobs:
conformance-cpp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true
- run: corepack enable
Expand All @@ -61,7 +61,7 @@ jobs:
conformance-go:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true
- run: corepack enable
Expand All @@ -80,7 +80,7 @@ jobs:
conformance-python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true
- run: corepack enable
Expand All @@ -99,7 +99,7 @@ jobs:
conformance-typescript:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true
- run: corepack enable
Expand All @@ -114,7 +114,7 @@ jobs:
conformance-kaitai-struct:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true
- run: corepack enable
Expand All @@ -129,7 +129,7 @@ jobs:
conformance-swift:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true
- run: corepack enable
Expand All @@ -148,7 +148,7 @@ jobs:
conformance-rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true
- run: corepack enable
Expand All @@ -160,7 +160,8 @@ jobs:
with:
toolchain: stable
default: true
- run: cd rust && cargo build --example=conformance_reader
- run: cargo build --example=conformance_reader --example=conformance_reader_async --features=tokio
working-directory: rust
- run: yarn install --immutable
- run: yarn test:conformance:generate-inputs --verify
- run: yarn test:conformance --runner rust-
Expand All @@ -171,7 +172,7 @@ jobs:
run:
working-directory: cpp
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true
- uses: actions/cache@v4
Expand All @@ -190,7 +191,7 @@ jobs:
run:
working-directory: cpp
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true
- uses: actions/cache@v4
Expand All @@ -212,7 +213,7 @@ jobs:
id-token: write

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true
- run: corepack enable
Expand Down Expand Up @@ -269,7 +270,7 @@ jobs:
typescript-examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true
- run: corepack enable
Expand Down Expand Up @@ -299,7 +300,7 @@ jobs:
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true
- uses: actions/setup-python@v5
Expand Down Expand Up @@ -380,14 +381,14 @@ jobs:
run:
working-directory: go
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true
- uses: actions/setup-go@v5
with:
go-version-file: go/go.work
- name: install golangci-lint
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.56.2
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59.1
- run: make lint
- run: make test
- name: Check library version
Expand Down Expand Up @@ -438,7 +439,7 @@ jobs:
env: ${{ matrix.env }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: "0"
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
Expand All @@ -465,7 +466,7 @@ jobs:
swift:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true
- uses: swift-actions/setup-swift@v2
Expand All @@ -482,21 +483,27 @@ jobs:
run:
working-directory: rust
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
components: "rustfmt, clippy"
- run: rustup target add wasm32-unknown-unknown
- run: cargo fmt --all -- --check
- run: cargo clippy -- --no-deps
- run: cargo clippy --no-default-features -- --no-deps
- run: cargo clippy --no-default-features --features lz4 -- --no-deps
- run: cargo clippy --no-default-features --features zstd -- --no-deps
- run: cargo build
- run: cargo test
- run: cargo clippy --no-default-features --features tokio -- --no-deps
- run: cargo clippy --no-default-features --features tokio,lz4 -- --no-deps
- run: cargo clippy --no-default-features --features tokio,zstd -- --no-deps
- run: cargo build --all-features
- run: cargo test --all-features
- run: cargo build --all-features --target wasm32-unknown-unknown
- run: cargo check --all-features --target wasm32-unknown-unknown
- name: "publish to crates.io"
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/releases/rust/v')
run: cargo publish --token ${{ secrets.RUST_CRATES_IO_TOKEN }}
15 changes: 5 additions & 10 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,16 @@ name: Website
on:
push:
branches: [main]
# deploy the website for every new MCAP CLI release, so the version gets populated in CLI installation docs
tags: ["releases/mcap-cli/*"]
pull_request:
branches: ["*"]

jobs:
docs-home:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true
# https://github.com/actions/checkout/issues/701 - causes tags to be fetched, which
# are needed to determine the latest MCAP CLI release
fetch-depth: 0

- run: corepack enable
- uses: actions/setup-node@v4
Expand All @@ -42,7 +37,7 @@ jobs:
docs-cpp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- run: make -C cpp ci-docs

Expand All @@ -57,7 +52,7 @@ jobs:
docs-python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
Expand All @@ -78,7 +73,7 @@ jobs:
docs-swift:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: swift-actions/setup-swift@v2
with:
Expand Down Expand Up @@ -117,7 +112,7 @@ jobs:
deployments: write
steps:
# need checkout so that cloudflare can detect git commit
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/download-artifact@v4

Expand Down
8 changes: 7 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,11 @@

// https://github.com/microsoft/vscode-cpptools/issues/722
"C_Cpp.autoAddFileAssociations": false,
"C_Cpp.default.cppStandard": "c++17"
"C_Cpp.default.cppStandard": "c++17",
"[go]": {
"editor.defaultFormatter": "golang.go"
},
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer"
}
}
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Download the latest `mcap-cli` version from the [releases page](https://github.c

## License

[MIT License](/LICENSE). Contributors are required to accept the [Contributor License Agreement](https://github.com/foxglove/cla).
[MIT License](/LICENSE).

## Release process

Expand Down Expand Up @@ -93,3 +93,25 @@ Tag a release matching the version number `releases/swift/vX.Y.Z`

1. Update the version in rust/Cargo.toml
2. Tag a release matching the version number `releases/rust/vX.Y.Z`

## Citations

If you use MCAP in your research, please cite it in your work. Our suggested
citation format is:

```
@software{MCAP,
title = {MCAP: serialization-agnostic log container file format},
author = {{Foxglove Developers}},
url = {https://mcap.dev},
version = {your version},
date = {your date of access},
year = {2024},
publisher = {{Foxglove Technologies}},
note = {Available from https://github.com/foxglove/mcap}
}
```

Please replace the version and date fields with the version of the software you
used, and the date you obtained it. Citing MCAP will help spread awareness of
the project and strengthen the ecosystem.
9 changes: 9 additions & 0 deletions cpp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,18 @@ following dependencies:
If your project does not need `lz4` or `zstd` support, you can optionally disable these by defining
`MCAP_COMPRESSION_NO_LZ4` or `MCAP_COMPRESSION_NO_ZSTD` respectively.

### Conan

To simplify installation of dependencies, the [Conan](https://conan.io/) package
manager can be used with the included
[conanfile.py](https://github.com/foxglove/mcap/blob/main/cpp/mcap/conanfile.py).

### CMake

For using MCAP with CMake, the third-party [olympus-robotics/mcap_builder](https://github.com/olympus-robotics/mcap_builder) repository provides a helpful wrapper.

### Alternatives

If you use an alternative approach, such as CMake's FetchContent or directly
vendoring the dependencies, make sure you use versions equal or greater than the
versions listed above.
Expand Down
2 changes: 1 addition & 1 deletion cpp/bench/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class McapBenchmarksConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "cmake"
requires = "benchmark/1.7.0", "mcap/1.4.0"
requires = "benchmark/1.7.0", "mcap/1.4.1"

def build(self):
cmake = CMake(self)
Expand Down
2 changes: 1 addition & 1 deletion cpp/build-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

conan config init

conan editable add ./mcap mcap/1.4.0
conan editable add ./mcap mcap/1.4.1
conan install docs --install-folder docs/build/Release \
-s compiler.cppstd=17 -s build_type=Release --build missing

Expand Down
2 changes: 1 addition & 1 deletion cpp/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

conan config init

conan editable add ./mcap mcap/1.4.0
conan editable add ./mcap mcap/1.4.1
conan install test --install-folder test/build/Debug \
-s compiler.cppstd=17 -s build_type=Debug --build missing

Expand Down
2 changes: 1 addition & 1 deletion cpp/docs/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class McapDocsConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "cmake"
requires = "mcap/1.4.0"
requires = "mcap/1.4.1"

def build(self):
cmake = CMake(self)
Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class McapExamplesConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "cmake"
requires = [
"mcap/1.4.0",
"mcap/1.4.1",
"protobuf/3.21.1",
"nlohmann_json/3.10.5",
"catch2/2.13.8",
Expand Down
3 changes: 2 additions & 1 deletion cpp/examples/protobuf/dynamic_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <google/protobuf/dynamic_message.h>

#include "mcap/reader.hpp"
#include <memory>
#include <vector>

namespace gp = google::protobuf;
Expand Down Expand Up @@ -82,7 +83,7 @@ int main(int argc, char** argv) {
return 1;
}
}
gp::Message* message = protoFactory.GetPrototype(descriptor)->New();
auto message = std::unique_ptr<gp::Message>(protoFactory.GetPrototype(descriptor)->New());
if (!message->ParseFromArray(it->message.data, static_cast<int>(it->message.dataSize))) {
std::cerr << "failed to parse message using included foxglove.PointCloud schema" << std::endl;
reader.close();
Expand Down
Loading

0 comments on commit 866e4b8

Please sign in to comment.