generated from rerun-io/rerun_template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7210b49
Showing
27 changed files
with
1,675 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* text=auto eol=lf | ||
Cargo.lock linguist-generated=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- | ||
* Keep your PR:s small and focused. | ||
* The PR title is what ends up in the changelog, so make it descriptive! | ||
* If applicable, add a screenshot or gif. | ||
* Do NOT open PR:s from your `main` branch, as that makes it hard for maintainers to test and add commits to your PR. | ||
* Remember to run `cargo fmt` and `cargo clippy`. | ||
* Open the PR as a draft until you have self-reviewed it and it passes CI. | ||
* When you have addressed a PR comment, mark it as resolved. | ||
Please be patient! | ||
--> | ||
|
||
* Closes #ISSUE_NUMBER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Copied from https://github.com/rerun-io/rerun_template | ||
|
||
# https://github.com/marketplace/actions/require-labels | ||
# Check for existence of labels | ||
# See all our labels at https://github.com/rerun-io/rerun/issues/labels | ||
|
||
name: PR Labels | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
- labeled | ||
- unlabeled | ||
|
||
jobs: | ||
label: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check for a "do-not-merge" label | ||
uses: mheap/github-action-required-labels@v3 | ||
with: | ||
mode: exactly | ||
count: 0 | ||
labels: "do-not-merge" | ||
|
||
- name: Require label "include in changelog" or "exclude from changelog" | ||
uses: mheap/github-action-required-labels@v3 | ||
with: | ||
mode: minimum | ||
count: 1 | ||
labels: "exclude from changelog, include in changelog" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Copied from https://github.com/rerun-io/rerun_template | ||
on: [push, pull_request] | ||
|
||
name: Link checker | ||
|
||
jobs: | ||
link-checker: | ||
name: Check links | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Restore link checker cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: .lycheecache | ||
key: cache-lychee-${{ github.sha }} | ||
restore-keys: cache-lychee- | ||
|
||
# Check https://github.com/lycheeverse/lychee on how to run locally. | ||
- name: Link Checker | ||
id: lychee | ||
uses: lycheeverse/lychee-action@v1.9.0 | ||
with: | ||
fail: true | ||
lycheeVersion: "0.14.3" | ||
# When given a directory, lychee checks only markdown, html and text files, everything else we have to glob in manually. | ||
args: | | ||
--base . --cache --max-cache-age 1d . "**/*.rs" "**/*.toml" "**/*.hpp" "**/*.cpp" "**/CMakeLists.txt" "**/*.py" "**/*.yml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
# Copied from https://github.com/rerun-io/rerun_template | ||
on: [push, pull_request] | ||
|
||
name: Rust | ||
|
||
env: | ||
RUSTFLAGS: -D warnings | ||
RUSTDOCFLAGS: -D warnings | ||
|
||
jobs: | ||
rust-check: | ||
name: Rust | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: default | ||
toolchain: 1.76.0 | ||
override: true | ||
|
||
- name: Install packages (Linux) | ||
if: runner.os == 'Linux' | ||
uses: awalsh128/cache-apt-pkgs-action@v1.3.0 | ||
with: | ||
# some deps used by eframe, if that is part of the project | ||
packages: libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev # libgtk-3-dev is used by rfd | ||
version: 1.0 | ||
execute_install_scripts: true | ||
|
||
- name: Set up cargo cache | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Rustfmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
- name: check --all-features | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
args: --all-features --all-targets | ||
|
||
- name: check default features | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
args: --all-targets | ||
|
||
- name: check --no-default-features | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
args: --no-default-features --lib --all-targets | ||
|
||
- name: Test doc-tests | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --doc --all-features | ||
|
||
- name: cargo doc --lib | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: doc | ||
args: --lib --no-deps --all-features | ||
|
||
- name: cargo doc --document-private-items | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: doc | ||
args: --document-private-items --no-deps --all-features | ||
|
||
- name: Build tests | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --all-features --no-run | ||
|
||
- name: Run test | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --all-features | ||
|
||
- name: Clippy | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: --all-targets --all-features -- -D warnings | ||
|
||
# --------------------------------------------------------------------------- | ||
|
||
check_wasm: | ||
name: Check wasm32 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: 1.76.0 | ||
target: wasm32-unknown-unknown | ||
override: true | ||
components: clippy | ||
|
||
- name: Set up cargo cache | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Check wasm32 | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
args: --target wasm32-unknown-unknown --lib | ||
|
||
- name: Clippy wasm32 | ||
env: | ||
CLIPPY_CONF_DIR: "scripts/clippy_wasm" # Use scripts/clippy_wasm/clippy.toml | ||
run: cargo clippy --target wasm32-unknown-unknown --lib -- -D warnings | ||
|
||
# --------------------------------------------------------------------------- | ||
|
||
cargo-deny: | ||
name: Check Rust dependencies (cargo-deny) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: EmbarkStudios/cargo-deny-action@v1 | ||
with: | ||
rust-version: "1.76.0" | ||
log-level: warn | ||
command: check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copied from https://github.com/rerun-io/rerun_template | ||
|
||
# https://github.com/crate-ci/typos | ||
# Add exceptions to `.typos.toml` | ||
# install and run locally: cargo install typos-cli && typos | ||
|
||
name: Spell Check | ||
on: [pull_request] | ||
|
||
jobs: | ||
run: | ||
name: Spell Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Actions Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check spelling of entire workspace | ||
uses: crate-ci/typos@master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Mac stuff: | ||
.DS_Store | ||
|
||
# C++ build directory | ||
build | ||
|
||
# Rust compile target directories: | ||
target | ||
target_ra | ||
target_wasm | ||
|
||
# https://github.com/lycheeverse/lychee | ||
.lycheecache | ||
|
||
# Pixi environment | ||
.pixi | ||
|
||
# Python stuff: | ||
__pycache__ | ||
.mypy_cache | ||
.ruff_cache | ||
venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# https://github.com/crate-ci/typos | ||
# install: cargo install typos-cli | ||
# run: typos | ||
|
||
[default.extend-words] | ||
teh = "teh" # part of @teh-cmc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=827846 | ||
// for the documentation about the extensions.json format | ||
"recommendations": [ | ||
"charliermarsh.ruff", | ||
"gaborv.flatbuffers", | ||
"github.vscode-github-actions", | ||
"josetr.cmake-language-support-vscode", | ||
"ms-python.mypy-type-checker", | ||
"ms-python.python", | ||
"ms-vscode.cmake-tools", | ||
"ms-vscode.cpptools-extension-pack", | ||
"ms-vsliveshare.vsliveshare", | ||
"polymeilex.wgsl", | ||
"rust-lang.rust-analyzer", | ||
"serayuzgur.crates", | ||
"streetsidesoftware.code-spell-checker", | ||
"tamasfe.even-better-toml", | ||
"vadimcn.vscode-lldb", | ||
"wayou.vscode-todo-highlight", | ||
"webfreak.debug", | ||
"xaver.clang-format", // C++ formatter | ||
"zxh404.vscode-proto3", | ||
"esbenp.prettier-vscode" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
// Python | ||
{ | ||
"name": "Python Debugger: Current File", | ||
"type": "debugpy", | ||
"request": "launch", | ||
"program": "${file}", | ||
"console": "integratedTerminal" | ||
}, | ||
// Rust: | ||
{ | ||
"name": "Debug 'PROJ_NAME'", | ||
"type": "lldb", | ||
"request": "launch", | ||
"cargo": { | ||
"args": [ | ||
"build" | ||
], | ||
"filter": { | ||
"name": "PROJ_NAME", | ||
"kind": "bin" | ||
} | ||
}, | ||
"args": [], | ||
"cwd": "${workspaceFolder}", | ||
"env": { | ||
"RUST_LOG": "debug" | ||
} | ||
}, | ||
{ | ||
"name": "Launch Rust tests", | ||
"type": "lldb", | ||
"request": "launch", | ||
"cargo": { | ||
"args": [ | ||
"test", | ||
"--no-run", | ||
"--lib", | ||
"--all-features" | ||
], | ||
"filter": { | ||
"kind": "lib" | ||
} | ||
}, | ||
"cwd": "${workspaceFolder}", | ||
"env": { | ||
"RUST_LOG": "debug" | ||
} | ||
}, | ||
] | ||
} |
Oops, something went wrong.