-
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.
Add analogous gh jobs for .circleci/then.yml jobs
- Loading branch information
1 parent
cb2e2cf
commit d2bd558
Showing
6 changed files
with
132 additions
and
0 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,20 @@ | ||
--- | ||
name: 'Install Dependencies' | ||
description: 'Install the dependencies and rust components used across jobs' | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install dependencies | ||
run: | | ||
sudo sed -i "/#\$nrconf{restart} = 'i';/s/.*/\$nrconf{restart} = 'a';/" /etc/needrestart/needrestart.conf | ||
sudo apt-get update | ||
sudo apt install -y libssl-dev clang libclang-dev protobuf-compiler | ||
shell: bash | ||
- name: Add rust components | ||
run: | | ||
rustup target add wasm32-unknown-unknown | ||
rustup component add rust-src | ||
shell: bash | ||
- name: Install wasm-pack | ||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | ||
shell: bash |
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,40 @@ | ||
--- | ||
name: "Build and run node-test" | ||
on: | ||
push: | ||
paths: | ||
- "node/**" | ||
- "crates/**" | ||
- "pallets/*" | ||
- "runtime/*" | ||
|
||
jobs: | ||
node-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Increase swap | ||
run: | | ||
sudo swapoff -a | ||
sudo dd if=/dev/zero of=/swapfile bs=1G count=8 | ||
sudo chmod 0600 /swapfile | ||
sudo mkswap /swapfile | ||
sudo swapon /swapfile | ||
grep Swap /proc/meminfo | ||
- name: Install dependencies | ||
uses: ./.github/actions/install-dependencies/ | ||
- name: Build entropy-protocol nodejs package | ||
run: | | ||
cd crates/protocol | ||
make build-nodejs-testing | ||
cd nodejs-test | ||
yarn | ||
cd ../../.. | ||
- name: Run cargo test | ||
timeout-minutes: 45 | ||
run: | | ||
pushd node | ||
cargo build --all-targets --release -j $(nproc) | ||
cargo test --all-targets --release | ||
yarn --cwd ../crates/protocol/nodejs-test test | ||
cargo test -p entropy-tss --release --features=test_helpers -F wasm_test test_wasm |
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,17 @@ | ||
--- | ||
name: "Check chainspecs" | ||
on: ["push"] | ||
|
||
jobs: | ||
check-chainspecs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
uses: ./.github/actions/install-dependencies/ | ||
- name: Check chainspecs | ||
run: | | ||
cargo run -p entropy -- build-spec --raw --chain dev > chainspec-dev-raw.json | ||
cargo run -p entropy -- build-spec --raw --chain integration-tests > chainspec-integration-raw.json | ||
cargo run -p entropy -- build-spec --raw --chain testnet > chainspec-testnet-raw.json |
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,14 @@ | ||
--- | ||
name: "Check documentation build" | ||
on: ["push"] | ||
|
||
jobs: | ||
check-doc-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
uses: ./.github/actions/install-dependencies/ | ||
- name: Build documentation | ||
run: cargo doc --no-deps |
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,27 @@ | ||
--- | ||
name: "Lint and check licenses" | ||
on: ["push"] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
uses: ./.github/actions/install-dependencies/ | ||
- name: Format and lint | ||
run: | | ||
curl -LsSf https://github.com/tamasfe/taplo/releases/download/0.8.0/taplo-full-linux-x86_64.gz | gunzip -N -d - > ${CARGO_HOME:-~/.cargo}/bin/taplo && chmod +x ${CARGO_HOME:-~/.cargo}/bin/taplo | ||
cargo fmt --check | ||
taplo fmt --check | ||
cargo clippy -- -D warnings | ||
check-licenses: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Check licenses with cargo deny | ||
run: | | ||
cargo install --locked cargo-deny | ||
cargo deny --all-features check license |
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,14 @@ | ||
name: "Test: check runtime benchmarks" | ||
on: ["push"] | ||
|
||
jobs: | ||
test-runtime-benchmarks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
uses: ./.github/actions/install-dependencies/ | ||
- name: Check runtime-benchmarks | ||
run: | | ||
pushd node && cargo check --features=runtime-benchmarks |