-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
25 changed files
with
392 additions
and
494 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,105 @@ | ||
name: CI Base | ||
on: | ||
workflow_call: | ||
inputs: | ||
project: | ||
type: string | ||
required: true | ||
description: 'The Rust project to target' | ||
dir: | ||
type: string | ||
required: false | ||
default: '.' | ||
description: 'The directory to start from' | ||
|
||
jobs: | ||
lint: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup | Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
${{ inputs.dir }}/${{ inputs.project }}/target | ||
key: cargo-${{ hashFiles(format('{0}/{1}/Cargo.lock', inputs.dir, inputs.project)) }} | ||
restore-keys: | | ||
${{ inputs.project }}-cargo- | ||
- name: Setup | Toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
default: true | ||
components: clippy,rustfmt | ||
|
||
- name: Build | Clippy | ||
uses: actions-rs/clippy-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --manifest-path ${{ inputs.dir }}/${{ inputs.project }}/Cargo.toml --all-targets -- -D warnings | ||
|
||
- name: Build | Rustfmt | ||
run: cargo fmt --manifest-path ${{ inputs.dir }}/${{ inputs.project }}/Cargo.toml -- --check | ||
|
||
check: | ||
name: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup | Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup | Cache Cargo | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
${{ inputs.dir }}/${{ inputs.project }}/target | ||
key: cargo-${{ hashFiles(format('{0}/{1}/Cargo.lock', inputs.dir, inputs.project)) }} | ||
restore-keys: | | ||
${{ inputs.project }}-cargo- | ||
- name: Setup | Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
|
||
- name: Build | Check | ||
run: cargo check --all --manifest-path ${{ inputs.dir }}/${{ inputs.project }}/Cargo.toml | ||
|
||
test: | ||
name: test | ||
needs: check # Ensure check is run first. | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup | Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup | Cache Cargo | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
${{ inputs.dir }}/${{ inputs.project }}/target | ||
key: cargo-${{ hashFiles(format('{0}/{1}/Cargo.lock', inputs.dir, inputs.project)) }} | ||
restore-keys: | | ||
${{ inputs.project }}-cargo- | ||
- name: Setup | Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
|
||
- name: Build | Test | ||
run: cargo test --manifest-path ${{ inputs.dir }}/${{ inputs.project }}/Cargo.toml | ||
|
||
- name: Build | Debug | ||
run: cargo build --manifest-path ${{ inputs.dir }}/${{ inputs.project }}/Cargo.toml |
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,16 @@ | ||
name: CI CLI | ||
on: | ||
push: | ||
branches: | ||
- "*" | ||
paths: | ||
- 'hadron-cli/**' | ||
- "!**.md" | ||
tags-ignore: | ||
- "*" | ||
|
||
jobs: | ||
ci: | ||
uses: hadron-project/hadron/.github/workflows/_rust-ci-base.yaml@99-compaction | ||
with: | ||
project: hadron-cli |
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,16 @@ | ||
name: CI Client | ||
on: | ||
push: | ||
branches: | ||
- "*" | ||
paths: | ||
- 'hadron-client/**' | ||
- "!**.md" | ||
tags-ignore: | ||
- "*" | ||
|
||
jobs: | ||
ci: | ||
uses: hadron-project/hadron/.github/workflows/_rust-ci-base.yaml@99-compaction | ||
with: | ||
project: hadron-client |
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,16 @@ | ||
name: CI Core | ||
on: | ||
push: | ||
branches: | ||
- "*" | ||
paths: | ||
- 'hadron-core/**' | ||
- "!**.md" | ||
tags-ignore: | ||
- "*" | ||
|
||
jobs: | ||
ci: | ||
uses: hadron-project/hadron/.github/workflows/_rust-ci-base.yaml@99-compaction | ||
with: | ||
project: hadron-core |
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 @@ | ||
name: CI Core | ||
on: | ||
push: | ||
branches: | ||
- "*" | ||
paths: | ||
- 'examples/**' | ||
- "!**.md" | ||
tags-ignore: | ||
- "*" | ||
|
||
jobs: | ||
pipeline-txp: | ||
uses: hadron-project/hadron/.github/workflows/_rust-ci-base.yaml@99-compaction | ||
with: | ||
project: pipeline-transactional-processing | ||
dir: examples | ||
pipeline-txp: | ||
uses: hadron-project/hadron/.github/workflows/_rust-ci-base.yaml@99-compaction | ||
with: | ||
project: stream-transactional-processing | ||
dir: examples |
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 @@ | ||
name: CI Guide | ||
on: | ||
push: | ||
branches: | ||
- * | ||
paths: | ||
- guide/** | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup | Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup mdBook | ||
uses: peaceiris/actions-mdbook@v1 | ||
with: | ||
mdbook-version: '0.4.6' | ||
|
||
- name: Build | ||
run: mdbook build guide |
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,16 @@ | ||
name: CI Operator | ||
on: | ||
push: | ||
branches: | ||
- "*" | ||
paths: | ||
- 'hadron-operator/**' | ||
- "!**.md" | ||
tags-ignore: | ||
- "*" | ||
|
||
jobs: | ||
ci: | ||
uses: hadron-project/hadron/.github/workflows/_rust-ci-base.yaml@99-compaction | ||
with: | ||
project: hadron-operator |
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,16 @@ | ||
name: CI Stream | ||
on: | ||
push: | ||
branches: | ||
- "*" | ||
paths: | ||
- 'hadron-stream/**' | ||
- "!**.md" | ||
tags-ignore: | ||
- "*" | ||
|
||
jobs: | ||
ci: | ||
uses: hadron-project/hadron/.github/workflows/_rust-ci-base.yaml@99-compaction | ||
with: | ||
project: hadron-stream |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.