Skip to content

Commit

Permalink
Merge branch 'main' into client-auto-update
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelarogbonlo authored Jul 11, 2023
2 parents 6c55af9 + be494e4 commit cc78611
Show file tree
Hide file tree
Showing 241 changed files with 11,784 additions and 6,954 deletions.
20 changes: 20 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!-- Please adhere to the style guide at -->
<!-- https://github.com/zeitgeistpm/zeitgeist/blob/main/docs/STYLE_GUIDE.md -->
### What does it do?

### What important points should reviewers know?

### Is there something left for follow-up PRs?

### What alternative implementations were considered?

### Are there relevant PRs or issues?
<!-- Include references to the issues it fixes here separated by whitespaces. -->
<!-- Use a valid GitHub keyword for that, such as "closes" or "fixes". -->
<!-- Example: closes #500 #700 -->

<!-- Include references to relevant issues outside of Zeitgeist here -->
<!-- Include references to relevant PRs here -->

### References

8 changes: 2 additions & 6 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,8 @@ jobs:
uses: actions/checkout@v2
if: github.event_name == 'workflow_dispatch'

# TODO(#839): `rustup show` installs the rustc version specified in the `rust-toolchain` file
# according to https://rust-lang.github.io/rustup/overrides.html. We don't use actions-rs due
# to the lack of support of `rust-toolchain` files with TOML syntax:
# https://github.com/actions-rs/toolchain/issues/126.
- name: Install rust toolchain
run: rustup show
- name: Install build tools
run: ./scripts/init.sh

- name: Cache dependencies
uses: Swatinem/rust-cache@v1
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Coverage

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

env:
CARGO_TERM_COLOR: always

jobs:
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install rust toolchain
run: rustup show

- uses: actions-rs/[email protected]
with:
crate: grcov
use-tool-cache: true

# No disk space: https://github.com/zeitgeistpm/zeitgeist/actions/runs/5085081984/jobs/9144298675?pr=1006
# Workaround: https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
- name: Free up disk space on GitHub hosted runners
run: |
# Ensure context is GitHub hosted runner
# https://docs.github.com/en/actions/learn-github-actions/contexts#runner-context
if [[ "${{ runner.name }}" == "GitHub Actions"* ]]; then
echo "Freeing up space in GitHub hosted runner"
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
fi
- name: Cache Dependencies
uses: Swatinem/rust-cache@v1

- name: Generate coverage report
run: ./scripts/tests/coverage.sh

- name: Upload to codecov.io
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ runner.temp }}/zeitgeist-test-coverage.lcov
fail_ci_if_error: true
flags: tests
verbose: true
name: unit-tests
2 changes: 1 addition & 1 deletion .github/workflows/docker-hub-parachain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
images: |
zeitgeistpm/zeitgeist-node-parachain
tags: |
type=ref
type=semver,pattern={{version}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/migration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

# TODO(#839): `rustup show` installs the rustc version specified in the `rust-toolchain` file
# according to https://rust-lang.github.io/rustup/overrides.html. We don't use actions-rs due
# to the lack of support of `rust-toolchain` files with TOML syntax:
# https://github.com/actions-rs/toolchain/issues/126.
- name: Install rust toolchain
run: rustup show
- name: Install build tools
run: ./scripts/init.sh

- run: ./scripts/runtime-upgrade/test_runtime_upgrade.sh ${{ github.event.inputs.block }}
118 changes: 79 additions & 39 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

# TODO(#839): `rustup show` installs the rustc version specified in the `rust-toolchain` file
# according to https://rust-lang.github.io/rustup/overrides.html. We don't use actions-rs due
# to the lack of support of `rust-toolchain` files with TOML syntax:
# https://github.com/actions-rs/toolchain/issues/126.
- name: Install rust toolchain
run: rustup show
- name: Install build tools
run: ./scripts/init.sh

- uses: actions-rs/[email protected]
with:
Expand All @@ -34,6 +30,26 @@ jobs:
- name: Format
run: ./scripts/tests/format.sh --check

copyright:
name: Copyright Notices
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
- name: Install check-license and dependencies
run: |
pip install scripts/check-license
pip install -r scripts/check-license/requirements.txt
- name: Query files changed
id: files_changed
uses: Ana06/[email protected]
with:
filter: '*.rs$'
- name: Check copyright notices
run: check-license ${{ steps.files_changed.outputs.added_modified }}

checks:
name: Checks
runs-on: ubuntu-latest
Expand All @@ -48,62 +64,86 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install rust toolchain
run: rustup show
- name: Install build tools
run: ./scripts/init.sh

- name: Cache Dependencies
uses: Swatinem/rust-cache@v1
uses: Swatinem/rust-cache@v2

- name: Checks
run: ./scripts/tests/${{ matrix.scripts }}.sh

benchmark:
name: Quick check benchmarks
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install rust toolchain
run: rustup show
- name: Install build tools
run: ./scripts/init.sh

- run: ./scripts/benchmarks/quick_check.sh

tests:
name: Tests
test_standalone:
name: Test standalone build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: wasm32-unknown-unknown
default: true
override: true
profile: minimal
components: rustfmt, clippy, llvm-tools-preview

- uses: actions-rs/[email protected]
with:
crate: grcov
use-tool-cache: true
- name: Install build tools
run: ./scripts/init.sh

# No disk space: https://github.com/zeitgeistpm/zeitgeist/actions/runs/5085081984/jobs/9144298675?pr=1006
# Workaround: https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
- name: Free up disk space on GitHub hosted runners
run: |
# Ensure context is GitHub hosted runner
# https://docs.github.com/en/actions/learn-github-actions/contexts#runner-context
if [[ "${{ runner.name }}" == "GitHub Actions"* ]]; then
echo "Freeing up space in GitHub hosted runner"
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
fi
- name: Cache Dependencies
uses: Swatinem/rust-cache@v1

- name: Tests
run: ./scripts/tests/misc.sh
run: ./scripts/tests/test_standalone.sh

- name: Upload to codecov.io
uses: codecov/codecov-action@v3
with:
files: ${{ runner.temp }}/zeitgeist-test-coverage.lcov
fail_ci_if_error: true
flags: tests
verbose: true
name: unit-tests
test_parachain:
name: Test parachain build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install build tools
run: ./scripts/init.sh

# No disk space: https://github.com/zeitgeistpm/zeitgeist/actions/runs/5085081984/jobs/9144298675?pr=1006
# Workaround: https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
- name: Free up disk space on GitHub hosted runners
run: |
# Ensure context is GitHub hosted runner
# https://docs.github.com/en/actions/learn-github-actions/contexts#runner-context
if [[ "${{ runner.name }}" == "GitHub Actions"* ]]; then
echo "Freeing up space in GitHub hosted runner"
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
fi
- name: Cache Dependencies
uses: Swatinem/rust-cache@v1

- name: Tests
run: ./scripts/tests/test_parachain.sh

fuzz:
name: Fuzz
Expand All @@ -112,8 +152,8 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install rust toolchain
run: rustup show
- name: Install build tools
run: ./scripts/init.sh

- uses: actions-rs/[email protected]
with:
Expand All @@ -123,4 +163,4 @@ jobs:
- name: Cache Dependencies
uses: Swatinem/rust-cache@v1

- run: ./scripts/tests/fuzz.sh
- run: ./scripts/tests/fuzz.sh --verbose
36 changes: 36 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Try Runtime on New Tags

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
try_runtime_battery_station:
name: Test Try Runtime
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install build tools
run: ./scripts/init.sh

- name: Cache Dependencies
uses: Swatinem/rust-cache@v2

- run: make try-runtime-upgrade-battery-station
try_runtime_zeitgeist:
name: Test Try Runtime
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install build tools
run: ./scripts/init.sh

- name: Cache Dependencies
uses: Swatinem/rust-cache@v2

- run: make try-runtime-upgrade-zeitgeist
Loading

0 comments on commit cc78611

Please sign in to comment.