-
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.
* chore: Rename rust-toolchain to rust-toolchain.toml * chore: Rename rust.yml to ci.yml * chore: Remove deprecated actions in ci.yml * feat: Add .editorconfig * feat: Add Release workflow * fix: Typo in ci.yml
- Loading branch information
1 parent
6831401
commit e982c95
Showing
5 changed files
with
92 additions
and
25 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,8 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true |
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 |
---|---|---|
|
@@ -12,46 +12,38 @@ | |
# ZettaScale Zenoh Team, <[email protected]> | ||
# | ||
|
||
|
||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ '**' ] | ||
branches: ["**"] | ||
pull_request: | ||
branches: [ '**' ] | ||
branches: ["**"] | ||
schedule: | ||
- cron: '0 0 * * 1-5' | ||
- cron: "0 0 * * 1-5" | ||
workflow_call: | ||
|
||
jobs: | ||
checks: | ||
name: Code checks | ||
runs-on: [self-hosted, ubuntu-22.04] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Clone this repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
components: rustfmt, clippy | ||
run: rustup component add rustfmt clippy | ||
|
||
- name: Code format check | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: -- --check | ||
run: cargo fmt --check | ||
|
||
- name: Clippy check | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: --all-targets -- -D warnings | ||
run: cargo clippy --all-targets --all-features -- --deny warnings | ||
|
||
- name: Build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release --all-targets | ||
run: cargo build --release --all-targets | ||
|
||
- name: Run tests | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --release --verbose | ||
run: cargo test --release --verbose | ||
env: | ||
ASYNC_STD_THREAD_COUNT: 4 |
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,66 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
dry-run: | ||
description: Perform a dry-run of the release, without any side-effects | ||
type: boolean | ||
required: true | ||
version: | ||
description: > | ||
Release version. Can be left unspecified if `dry-run = true`, | ||
in which case the workflow will generate it using `git describe`. | ||
type: string | ||
required: false | ||
|
||
env: | ||
ACTOR_NAME: zettascale-bot | ||
ACTOR_EMAIL: [email protected] | ||
|
||
jobs: | ||
ci: | ||
uses: ./.github/workflows/ci.yml@main | ||
|
||
tag: | ||
runs-on: [self-hosted, ubuntu-20.04] | ||
needs: ci | ||
outputs: | ||
branch: ${{ steps.tag.outputs.branch }} | ||
version: ${{ steps.tag.outputs.version }} | ||
steps: | ||
- id: tag | ||
uses: ZettaScaleLabs/ci/tag-crates@develop | ||
with: | ||
repo: ${{ github.repository }} | ||
dry-run: ${{ inputs.dry-run }} | ||
github-token: ${{ secrets.ZETTASCALE_BOT_PERSONAL_ACCESS_TOKEN }} | ||
actor-name: ${{ env.ACTOR_NAME }} | ||
actor-email: ${{ env.ACTOR_EMAIL }} | ||
inter-deps-pattern: ^$ | ||
|
||
publish-cargo: | ||
runs-on: [self-hosted, ubuntu-20.04] | ||
needs: tag | ||
steps: | ||
- uses: ZettaScaleLabs/ci/publish-crates-cargo@develop | ||
with: | ||
repos: ${{ github.repository }} | ||
branch: ${{ needs.tag.outputs.branch }} | ||
dry-run: ${{ inputs.dry-run }} | ||
github-token: ${{ secrets.ZETTASCALE_BOT_PERSONAL_ACCESS_TOKEN }} | ||
crates-io-token: ${{ secrets.ZETTASCALE_CRATES_IO_TOKEN }} | ||
inter-deps-pattern: ^$ | ||
|
||
publish-github: | ||
runs-on: [self-hosted, ubuntu-20.04] | ||
needs: tag | ||
steps: | ||
- if: ${{ !inputs.dry-run }} | ||
run: > | ||
gh release create ${{ needs.tag.outputs.version }} | ||
--target ${{ needs.tag.outputs.branch }} | ||
--latest | ||
--generate-notes | ||
env: | ||
GH_TOKEN: ${{ secrets.ZETTASCALE_BOT_PERSONAL_ACCESS_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[toolchain] | ||
channel = "stable" |