summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorn1c00o <34602094+n1c00o@users.noreply.github.com>2022-10-12 14:38:36 +0200
committerGitHub <noreply@github.com>2022-10-12 14:38:36 +0200
commit76ef68564626310d05d7a4bea6f1952437559d93 (patch)
tree2e7b4c5bc3eb7c40b0c4760ae76d93d6ca0cfc81
parent9c908b7f2d31e4d6e0e30e13a8bea9571858d2f1 (diff)
Add CI Actions (#8)
* Add CI Action for Rust * Add concurrency group and only tests on Ubuntu
-rw-r--r--.clang-format1
-rw-r--r--.github/workflows/ci.yml51
-rw-r--r--.idea/clawflake.iml5
-rw-r--r--.idea/jsonSchemas.xml25
4 files changed, 81 insertions, 1 deletions
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 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="CPP_MODULE" version="4">
<component name="NewModuleRootManager">
- <content url="file://$MODULE_DIR$" />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+ <excludeFolder url="file://$MODULE_DIR$/target" />
+ </content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="JsonSchemaMappingsProjectConfiguration">
+ <state>
+ <map>
+ <entry key="GitHub Workflow">
+ <value>
+ <SchemaInfo>
+ <option name="name" value="GitHub Workflow" />
+ <option name="relativePathToSchema" value="https://json.schemastore.org/github-workflow.json" />
+ <option name="applicationDefined" value="true" />
+ <option name="patterns">
+ <list>
+ <Item>
+ <option name="path" value=".github/workflows/ci.yml" />
+ </Item>
+ </list>
+ </option>
+ </SchemaInfo>
+ </value>
+ </entry>
+ </map>
+ </state>
+ </component>
+</project> \ No newline at end of file