From 76ef68564626310d05d7a4bea6f1952437559d93 Mon Sep 17 00:00:00 2001 From: n1c00o <34602094+n1c00o@users.noreply.github.com> Date: Wed, 12 Oct 2022 14:38:36 +0200 Subject: Add CI Actions (#8) * Add CI Action for Rust * Add concurrency group and only tests on Ubuntu --- .clang-format | 1 + .github/workflows/ci.yml | 51 ++++++++++++++++++++++++++++++++++++++++++++++++ .idea/clawflake.iml | 5 ++++- .idea/jsonSchemas.xml | 25 ++++++++++++++++++++++++ 4 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 .clang-format create mode 100644 .github/workflows/ci.yml create mode 100644 .idea/jsonSchemas.xml diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..2593ef5 --- /dev/null +++ b/.clang-format @@ -0,0 +1 @@ +BasedOnStyle: Google \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..fef285b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,51 @@ +name: CI +on: + pull_request: + branches: + - main + push: + branches: + - main +jobs: + rust: + name: Rust CI + continue-on-error: true + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + timeout-minutes: 360 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + name: Checkout the repository + - uses: actions/cache@v3 + name: Setup caching + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - uses: actions-rs/toolchain@v1 + name: Install the Rust toolchain + with: + toolchain: nightly + override: true + components: clippy, rustfmt + - uses: actions-rs/clippy-check@v1 + name: Style check + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --all-features + - uses: actions-rs/cargo@v1 + name: Run tests + with: + command: test + args: --workspace + - uses: actions-rs/cargo@v1 + name: Build in release mode + with: + command: build + args: --workspace --release \ No newline at end of file diff --git a/.idea/clawflake.iml b/.idea/clawflake.iml index bc2cd87..c254557 100644 --- a/.idea/clawflake.iml +++ b/.idea/clawflake.iml @@ -1,7 +1,10 @@ - + + + + diff --git a/.idea/jsonSchemas.xml b/.idea/jsonSchemas.xml new file mode 100644 index 0000000..c502d22 --- /dev/null +++ b/.idea/jsonSchemas.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3