Skip to content

Commit

Permalink
Merge branch 'master' into docs/improve-rust-test-cli-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnymatthews authored Sep 6, 2024
2 parents 1eac8f8 + 837aa55 commit 7b36ac1
Show file tree
Hide file tree
Showing 202 changed files with 11,071 additions and 8,167 deletions.
16 changes: 0 additions & 16 deletions .circleci/config.yml

This file was deleted.

192 changes: 0 additions & 192 deletions .circleci/then.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ target
.cargo-remote.toml
.entropy
chains

# We specifically want to include the `create-test-keyshares` crate as part of our builds.
scripts
!scripts/create-test-keyshares/

service
shell.nix

Expand Down
20 changes: 20 additions & 0 deletions .github/actions/install-dependencies/action.yaml
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
2 changes: 2 additions & 0 deletions .github/workflows/build-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
pattern: "!*.dockerbuild"
- name: Create release
env:
GH_TOKEN: ${{ github.token }}
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/build-and-run-node-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: "Build and test"
on:
push:
paths:
- "node/**"
- "crates/**"
- "pallets/**"
- "runtime/**"

jobs:
node-test:
runs-on: core-build-runner
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 build && cargo test`
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
17 changes: 17 additions & 0 deletions .github/workflows/check-chainspecs.yaml
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
14 changes: 14 additions & 0 deletions .github/workflows/check-doc-build.yaml
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
53 changes: 53 additions & 0 deletions .github/workflows/cla.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This workflow automates the process of signing our CLA. It makes use of
# the action at https://github.com/contributor-assistant/github-action in
# order to provide automations.
#
# This workflow file should be present in every repository that wants to
# use the Contributor License Agreement automation process. Ideally, it
# would remain more-or-less synchronized across each repository as updates
# are rolled out.
#
# Since the database of signatories is maintained in a remote repository,
# each repository that wishes to make use of the CLA Assistant will also
# need to have a repository secret (named `CLA_ASSISTANT_LITE_PAT`) that
# grants permission to write to the "signatures" file in that repository.
---
name: "CLA Assistant"
on:
issue_comment:
types:
- created
pull_request_target:
types:
- opened
- closed
- synchronize

# Explicitly configure permissions, in case the GITHUB_TOKEN workflow permissions
# are set to read-only in the repository's settings.
permissions:
actions: write
contents: read # We only need to `read` since signatures are in a remote repo.
pull-requests: write
statuses: write

jobs:
CLAAssistant:
runs-on: ubuntu-latest
steps:
- name: "CLA Assistant"
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
uses: entropyxyz/contributor-assistant-github-action@c5f4628ffe1edb97724edb64e0dd4795394d33e5 # exemptRepoOrgMembers
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Required, so that the bot in this repository has `write` permissions to Contents of remote repo.
PERSONAL_ACCESS_TOKEN: ${{ secrets.CLA_ASSISTANT_LITE_PAT }}
with:
path-to-signatures: 'legal/cla/v1/signatures.json'
path-to-document: 'https://github.com/entropyxyz/.github/blob/main/legal/cla/v1/cla.md'
branch: 'main'
allowlist: dependabot[bot],entropyxyz
exemptRepoOrgMembers: true
remote-organization-name: entropyxyz
remote-repository-name: .github
lock-pullrequest-aftermerge: false
Loading

0 comments on commit 7b36ac1

Please sign in to comment.