Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feat/dapp-staking-v3
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinonard committed Nov 30, 2023
2 parents ccb8e73 + cef3ab1 commit 4705bc9
Show file tree
Hide file tree
Showing 242 changed files with 22,892 additions and 9,163 deletions.
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/release_checklist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Astar Release Checklist
about: Checklist to follow before creating a new release
title: 'Release v_xx Checklist'
labels:
assignees: ''
---

## Release v_xx Specific
<!---
All the preparation specific for this release, for example
- [x] Test batch precompile in Astar & Shiden
- [x] Test xtokens in Astar
-->


## Runtime Release
- [ ] Check Semver bumped for below crates
- `astar-runtime`
- `shiden-runtime`
- `shibuya-runtime`
- `local-runtime`
- `astar-collator`
- `xcm-tools` (if needed)
- [ ] Check Spec Version bumped for all runtimes
- Astar: x -> y
- Shiden: x -> y
- Shibuya: x -> y
- [ ] Verify completed migrations are removed from any public networks.


## All Releases
- [ ] Check and update new Github release is created with release logs.

## Post Release
- [ ] Notify Builders and DevOps
3 changes: 1 addition & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
- [ ] added or updated unit tests
- [ ] updated Astar official documentation
- [ ] added OnRuntimeUpgrade hook for precompile revert code registration
- [ ] updated spec version
- [ ] updated semver
- [ ] added benchmarks & weights for any modified runtime logics.
1 change: 1 addition & 0 deletions .github/license-check/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"pallets/collator-selection/**",
"pallets/custom-signatures/**",
"precompiles/utils/**",
"precompiles/utils_v2/**",
"vendor/**"
],
"license": "./.github/license-check/headers/HEADER-GNUv3"
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Latest commit hash in PR branch will be built and used for benchmarking.
### How to execute
Usage
```
# [chain name] - astar-dev, shiden-dev, shibuya-dev, dev
# [chain names] - Use "," for multiple runtimes. Available values are: astar-dev, shiden-dev, shibuya-dev, dev
# [pallet names] - Use "," for multiple pallets, "all" for all pallets
/bench [chain name] [pallet names]
/bench [chain names] [pallet names]
```
```
# benchmark a pallet
Expand All @@ -21,8 +21,12 @@ Usage
# benchmark all pallets
/bench astar-dev all
# benchmark multiple runtimes with multiple pallets
/bench astar-dev,shibuya-dev pallet_balances,pallet_dapps_staking
```


### Reference machine
```
Hardware
Expand Down
33 changes: 12 additions & 21 deletions .github/workflows/base_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,25 @@ on:
tags-ignore:
- v[0-9]+.[0-9]+.[0-9]+*
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
clean-up-actions:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
# Only cancel non-master branch runs
if: ${{ github.ref != 'refs/heads/master' }}
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

compile-and-check:
runs-on: ubuntu-latest
runs-on: [self-hosted, Linux, X64]
steps:
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
df -h
- name: Checkout the source code
uses: actions/checkout@v3

- name: Install deps
run: sudo apt -y install protobuf-compiler
run: |
sudo apt -y install protobuf-compiler pkg-config
if ! command -v sccache; then
cargo install sccache --locked
fi
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
echo "SCCACHE_CACHE_SIZE=100G" >> $GITHUB_ENV
- name: Install & display rust toolchain
run: rustup show
Expand Down
16 changes: 5 additions & 11 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,11 @@ on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
workflow_dispatch:
jobs:
clean-up-actions:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
# Only cancel non-master branch runs
if: ${{ github.ref != 'refs/heads/master' }}
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
coverage:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
Expand Down Expand Up @@ -53,7 +47,7 @@ jobs:
uses: actions-rs/[email protected]
with:
version: 0.22.0
args: '--workspace -e astar-collator xcm-tools local-runtime shibuya-runtime shiden-runtime astar-runtime integration-tests --exclude-files vendor/* bin/* runtime/* tests/* **/mock.rs **/weights.rs'
args: '--workspace -e astar-collator xcm-tools local-runtime shibuya-runtime shiden-runtime astar-runtime integration-tests --exclude-files vendor/* bin/* runtime/* tests/* **/mock.rs **/weights.rs precompiles/utils_v2/*'
out-type: Xml

- name: Code Coverage Summary Report
Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,29 @@ jobs:
native-macos:
needs: checks-and-tests
runs-on: macos-latest
env:
RUSTC_WRAPPER: "sccache"
SCCACHE_BUCKET: ${{ secrets.SCCACHE_BUCKET }}
SCCACHE_REGION: ${{ secrets.SCCACHE_REGION }}
SCCACHE_S3_KEY_PREFIX: "astar-macos"
permissions:
id-token: write
contents: read
steps:
- name: Checkout the source code
uses: actions/checkout@v3
with:
submodules: true

- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.SCCACHE_ROLE }}
role-session-name: github_astar_mac
aws-region: ${{ secrets.SCCACHE_REGION }}

- name: Install deps
run: brew install protobuf
run: brew install protobuf sccache

- name: Install & display rust toolchain
run: rustup show
Expand All @@ -223,6 +238,9 @@ jobs:
- name: Build optimized binary
run: cargo build --release --verbose --locked

- name: Show sccache stats
run: sccache --show-stats

- uses: actions/upload-artifact@v3
with:
name: astar-macOS-latest-x86_64
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ jobs:
days-before-pr-stale: 60
days-before-issue-close: 7
days-before-pr-close: 14
exempt-issue-labels: 'project'
14 changes: 4 additions & 10 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
name: Static Analysis
on: [push, workflow_dispatch]
jobs:
clean-up-actions:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
# Only cancel non-master branch runs
if: ${{ github.ref != 'refs/heads/master' }}
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
fmt:
if: github.event.pull_request.draft == false
runs-on: [self-hosted, Linux, X64]
Expand Down
25 changes: 5 additions & 20 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,14 @@ on:
tags-ignore:
- v[0-9]+.[0-9]+.[0-9]+*
workflow_dispatch:
jobs:
clean-up-actions:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
# Only cancel non-master branch runs
if: ${{ github.ref != 'refs/heads/master' }}
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
test-runtimes:
runs-on: ubuntu-latest
runs-on: [self-hosted, Linux, X64]
steps:
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
df -h
- name: Checkout the source code
uses: actions/checkout@v3

Expand Down
Loading

0 comments on commit 4705bc9

Please sign in to comment.