-
Notifications
You must be signed in to change notification settings - Fork 9
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
1 parent
754acbc
commit f5b6aef
Showing
4 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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
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,40 @@ | ||
name: Lint experiments | ||
on: | ||
push: | ||
paths: | ||
- 'experimental/**' # Only run action when experiments have changed | ||
|
||
defaults: | ||
run: | ||
working-directory: ./experimental | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
rustfmt: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
- name: Cache | ||
uses: ./.github/actions/cache | ||
- name: Install latest nightly toolchain and rustfmt | ||
run: rustup update nightly && rustup default nightly && rustup component add rustfmt | ||
clippy: | ||
name: "clippy #${{ matrix.rust_version }}" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
rust_version: ["stable"] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
- name: Cache | ||
uses: ./.github/actions/cache | ||
with: | ||
rust_version: ${{ matrix.rust_version }} | ||
- name: Install ${{ matrix.version }} toolchain and clippy | ||
run: rustup install ${{ matrix.rust_version }} && rustup default ${{ matrix.rust_version }} && rustup component add clippy | ||
- run: cargo clippy --all-targets --all-features -- -D warnings |
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,42 @@ | ||
name: Test experiments | ||
on: | ||
push: | ||
paths: | ||
- 'experimental/**' # Only run action when experiments have changed | ||
|
||
defaults: | ||
run: | ||
working-directory: ./experimental | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
test: | ||
name: "cargo test --workspace #${{ matrix.platform }} ${{ matrix.rust_version }}" | ||
runs-on: ${{ matrix.platform }} | ||
strategy: | ||
matrix: | ||
platform: [windows-latest, ubuntu-latest, macos-12] | ||
rust_version: [""] | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
- name: Cache | ||
uses: ./.github/actions/cache | ||
with: | ||
rust_version: ${{ matrix.rust_version }} | ||
- name: Install Rust ${{ matrix.rust_version }} | ||
if: ${{ matrix.rust_version != '' }} | ||
run: rustup install ${{ matrix.rust_version }} && rustup default ${{ matrix.rust_version }} | ||
- id: rust-version | ||
run: echo "version=$(rustc --version)" >> $GITHUB_OUTPUT | ||
- name: "[${{ steps.rust-version.outputs.version}}] cargo build --workspace --verbose" | ||
run: cargo build --workspace --verbose | ||
- name: "[${{ steps.rust-version.outputs.version}}] cargo test --workspace --verbose" | ||
run: cargo test --workspace --verbose | ||
env: | ||
RUST_BACKTRACE: 1 | ||
|
||
|
||
|
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 @@ | ||
# Shared library experiments and POC | ||
|
||
In past a lot of interesting projects have been kept eternally on a branch of libdatadog. | ||
|
||
However this has made collaboration and reuse of code within core of libdatadog harder. | ||
|
||
As a consequences, we've discussed in the past the idea of having a semi-temporary experiments sub project within libdatadog. Where all those not yet-production ready (or meant for production) projects can live, and facilitiate code reuse and better collaboration based on Pull requests. | ||
|
||
## Rules for experiments | ||
|
||
For now *by default* all of the projects withing `experimental` namespace should not be build alongside the full libdatadog crate, to avoid unnecessary increase of build times and the complexity of the libdatadog's CI. | ||
|
||
Experiments are free to add CI configuration as they see fit. They should however prefer to constrain the CI run only to their own folders, e.g. | ||
|
||
``` | ||
name: Experimental CI | ||
on: | ||
push: | ||
paths: | ||
- 'experimental/custom-parsing/**' # Only run action when custom parsing code has changes | ||
``` | ||
|
||
To simplify the experiment setup - an experimental Cargo workspace will be created - experiments are free to add themselves to the workspace - however its not mandatory. The workspace purpose will mostly be relegeated to CI automations. | ||
|
||
|