Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #44 from Polkadex-Substrate/develop
Browse files Browse the repository at this point in the history
Parachain Release
  • Loading branch information
Gauthamastro authored May 25, 2023
2 parents bd32123 + e0f099d commit c1fee29
Show file tree
Hide file tree
Showing 43 changed files with 9,671 additions and 2,419 deletions.
117 changes: 117 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: Continuous Integration

on:
pull_request: []
push:
branches: [develop, main]

env:
RUNNER_INSTANCE_TYPE: c5d.9xlarge

jobs:
start-runner:
name: Start self-hosted EC2 runner
runs-on: ubuntu-latest
outputs:
label: ${{ steps.start-ec2-runner.outputs.label }}
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Start EC2 runner
id: start-ec2-runner
uses: machulav/ec2-github-runner@v2
with:
mode: start
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
ec2-image-id: ami-06de69a4185c962ed
ec2-instance-type: ${{ env.RUNNER_INSTANCE_TYPE }}
subnet-id: subnet-a4d326e8
security-group-id: sg-078363c0f7b5f0b41
iam-role-name: github-runner-role
aws-resource-tags: >
[
{"Key": "Name", "Value": "github-runner"},
{"Key": "GitHubRepository", "Value": "${{ github.repository }}"}
]
build:
name: Build | Run linters | Run tests
needs: start-runner
runs-on: ${{ needs.start-runner.outputs.label }}
steps:
- name: Set home environment variable # bug self hosted https://github.com/actions-rs/toolchain/issues/137
run: |
echo "HOME=/root" >> ${GITHUB_ENV} # bug
- name: Install latest nightly with wasm target
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: wasm32-unknown-unknown
default: true
components: rustfmt, clippy
- name: Install .toml files linter
run: cargo install taplo-cli --locked
- name: Install Protoc
uses: arduino/setup-protoc@v1
- name: Install dependencies
run: |
apt update
apt install -y clang
- name: Checkout to the current branch
uses: actions/checkout@v3
- name: Cache cargo registry
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Check versions info
run: |
rustup -V
cargo fmt -- --version
cargo clippy -V
- name: Lint .toml files
run: |
taplo lint
taplo fmt --check
- name: Build Project with runtime benchmarks
run: RUSTFLAGS="-D warnings" cargo build --features runtime-benchmarks
- name: Test weights generation
run: ./target/debug/parachain-polkadex-node benchmark pallet --pallet "*" --extrinsic "*" --steps 2 --repeat 1
- name: Build Project with try-runtime
run: RUSTFLAGS="-D warnings" cargo build --features try-runtime
- name: Build
run: RUSTFLAGS="-D warnings" cargo build
- name: Check Formatting
run: cargo fmt --all -- --check
- name: Check Clippy
run: cargo clippy -- -D warnings
- name: Test Project
run: cargo test --workspace
stop-runner:
name: Stop self-hosted EC2 runner
needs:
- start-runner
- build
runs-on: ubuntu-latest
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Stop EC2 runner
uses: machulav/ec2-github-runner@v2
with:
mode: stop
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
label: ${{ needs.start-runner.outputs.label }}
ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }}
49 changes: 0 additions & 49 deletions .github/workflows/test-code.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[formatting]
column_width = 150
67 changes: 67 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Changelog

All notable changes to this project will be documented in this file.

> **Types of changes**
> - `Added` for new features.
> - `Changed` for changes in existing functionality.
> - `Deprecated` for soon-to-be removed features.
> - `Removed` for now removed features.
> - `Fixed` for any bug fixes.
> - `Security` in case of vulnerabilities.
## [Unreleased]

## [v1.0.0] - 2023-05-25

### Added

- `xcm-simulator` crate ([#3], [#6], [#7], [#9], [#11], [#13], [#17], [#18], [#19], [#20], [#40], [#35])
- `xcm-helper` pallet ([#3], [#20], [#6], [#7], [#9], [#13], [#17], [#19], [#22], [#40], [#39], [#35], [#47], [#50], [#51])
- `thea-council` pallet ([#9], [#20], [#23], [#37], [#38], [#39], [#35], [#47], [#50])
- `asset-handler` pallet ([#18], [#23], [#35])
- Changelog ([#45])

### Changed

- `parachain-polkadex-node` crate ([#3])
- `parachain-polkadex-runtime` crate ([#3], [#13])
- Bumped dependencies versions ([#15], [#13], [#23])
- CI setup ([#28], [#46], [#52])

### Fixed

- `parachain-polkadex-node` crate chain spec resolving logic ([#23])
- Bugs found during testing ([#23])
- Code style ([#33], [#30], [#35], [#52])

[unreleased]: https://github.com/Polkadex-Substrate/parachain/compare/v0.1.0...HEAD
[v1.0.0]: https://github.com/Polkadex-Substrate/parachain/compare/v0.1.0...v1.0.0

[#3]: https://github.com/Polkadex-Substrate/parachain/pull/3
[#6]: https://github.com/Polkadex-Substrate/parachain/pull/6
[#7]: https://github.com/Polkadex-Substrate/parachain/pull/7
[#9]: https://github.com/Polkadex-Substrate/parachain/pull/9
[#11]: https://github.com/Polkadex-Substrate/parachain/pull/11
[#13]: https://github.com/Polkadex-Substrate/parachain/pull/13
[#15]: https://github.com/Polkadex-Substrate/parachain/pull/15
[#17]: https://github.com/Polkadex-Substrate/parachain/pull/17
[#18]: https://github.com/Polkadex-Substrate/parachain/pull/18
[#19]: https://github.com/Polkadex-Substrate/parachain/pull/19
[#20]: https://github.com/Polkadex-Substrate/parachain/pull/20
[#22]: https://github.com/Polkadex-Substrate/parachain/pull/22
[#23]: https://github.com/Polkadex-Substrate/parachain/pull/23
[#28]: https://github.com/Polkadex-Substrate/parachain/pull/28
[#30]: https://github.com/Polkadex-Substrate/parachain/pull/30
[#33]: https://github.com/Polkadex-Substrate/parachain/pull/33
[#35]: https://github.com/Polkadex-Substrate/parachain/pull/35
[#37]: https://github.com/Polkadex-Substrate/parachain/pull/37
[#38]: https://github.com/Polkadex-Substrate/parachain/pull/38
[#39]: https://github.com/Polkadex-Substrate/parachain/pull/39
[#40]: https://github.com/Polkadex-Substrate/parachain/pull/40
[#45]: https://github.com/Polkadex-Substrate/parachain/pull/45
[#46]: https://github.com/Polkadex-Substrate/parachain/pull/46
[#47]: https://github.com/Polkadex-Substrate/parachain/pull/47
[#50]: https://github.com/Polkadex-Substrate/parachain/pull/50
[#51]: https://github.com/Polkadex-Substrate/parachain/pull/51
[#52]: https://github.com/Polkadex-Substrate/parachain/pull/52
Loading

0 comments on commit c1fee29

Please sign in to comment.