Skip to content

Commit

Permalink
Add CircleCI configuration (#142)
Browse files Browse the repository at this point in the history
* Add starter CircleCI configuration (#141)

* Clean up and DRY up CircleCI configuration (#143)

* Clean up and DRY up config

* Fix env vars (doesn't work)

* trigger build

Co-authored-by: Kara Graysen <kara@noisypigeon.me>
Co-authored-by: Kara Graysen <kara@noisypigeon.inc>
  • Loading branch information
3 people authored and thor314 committed Aug 3, 2022
1 parent fad25d6 commit 6ecee83
Show file tree
Hide file tree
Showing 8 changed files with 110 additions and 178 deletions.
109 changes: 109 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
version: 2.1

commands:
install-dependencies-and-checkout:
steps:
- install-dependencies
- checkout
increase-swap:
steps:
- run: sudo swapoff -a
- run: sudo dd if=/dev/zero of=/swapfile bs=1G count=8
- run: sudo chmod 0600 /swapfile
- run: sudo mkswap /swapfile
- run: sudo swapon /swapfile
- run: grep Swap /proc/meminfo
install-dependencies:
steps:
- run: sudo apt-get update
- run: sudo apt install -y libssl-dev clang libclang-dev
- run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- run: rustup default stable
- run: rustup update nightly
- run: rustup update stable
- run: rustup target add wasm32-unknown-unknown --toolchain nightly

jobs:
node-test:
machine:
image: "ubuntu-2004:202201-02"
resource_class: "2xlarge"
steps:
- increase-swap
- install-dependencies-and-checkout
- run: pushd node && cargo build --release && cargo test
node-benchmark:
machine:
image: "ubuntu-2004:202201-02"
resource_class: "2xlarge"
steps:
- install-dependencies-and-checkout
- run: pushd node && cargo check --features=runtime-benchmarks --release

crypto-protocol:
machine:
image: "ubuntu-2004:202201-02"
resource_class: "2xlarge"
steps:
- install-dependencies-and-checkout
- run: cd crypto/protocol && cargo check
crypto-signing-client:
machine:
image: "ubuntu-2004:202201-02"
resource_class: "2xlarge"
steps:
- install-dependencies-and-checkout
- run: cd crypto/signing-client && cargo check
crypto-common:
machine:
image: "ubuntu-2004:202201-02"
resource_class: "2xlarge"
steps:
- install-dependencies-and-checkout
- run: cd crypto/common && cargo check

linting-node-core:
machine:
image: "ubuntu-2004:202201-02"
resource_class: "2xlarge"
steps:
- install-dependencies-and-checkout
- run: SKIP_WASM_BUILD=1 cargo clippy
linting-crypto-protocol:
machine:
image: "ubuntu-2004:202201-02"
resource_class: "2xlarge"
steps:
- install-dependencies-and-checkout
- run: cd crypto/protocol && cargo clippy
linting-crypto-signing-client:
machine:
image: "ubuntu-2004:202201-02"
resource_class: "2xlarge"
steps:
- install-dependencies-and-checkout
- run: cd crypto/signing-client && cargo clippy
linting-crypto-common:
machine:
image: "ubuntu-2004:202201-02"
resource_class: "2xlarge"
steps:
- install-dependencies-and-checkout
- run: cd crypto/common && cargo clippy

workflows:
entropy-node:
jobs:
- node-test
- node-benchmark
entropy-crypto:
jobs:
- crypto-protocol
- crypto-signing-client
- crypto-common
entropy-linting:
jobs:
- linting-node-core
- linting-crypto-protocol
- linting-crypto-signing-client
- linting-crypto-common
13 changes: 0 additions & 13 deletions .github/ISSUE_TEMPLATE/ask-a-question.md

This file was deleted.

46 changes: 0 additions & 46 deletions .github/ISSUE_TEMPLATE/report-a-bug.md

This file was deleted.

26 changes: 0 additions & 26 deletions .github/ISSUE_TEMPLATE/suggest-a-feature.md

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/build.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/lint.yml

This file was deleted.

9 changes: 0 additions & 9 deletions .github/workflows/scripts/install_dependencies.sh

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Substrate Node Template
# Substrate Node Template

[![Try on playground](https://img.shields.io/badge/Playground-Node_Template-brightgreen?logo=Parity%20Substrate)](https://playground.substrate.dev/?deploy=node-template) [![Matrix](https://img.shields.io/matrix/substrate-technical:matrix.org)](https://matrix.to/#/#substrate-technical:matrix.org)

Expand Down

0 comments on commit 6ecee83

Please sign in to comment.