-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into client-auto-update
- Loading branch information
Showing
241 changed files
with
11,784 additions
and
6,954 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 @@ | ||
<!-- 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 | ||
|
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
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,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 |
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
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
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 |
---|---|---|
|
@@ -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: | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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: | ||
|
@@ -123,4 +163,4 @@ jobs: | |
- name: Cache Dependencies | ||
uses: Swatinem/rust-cache@v1 | ||
|
||
- run: ./scripts/tests/fuzz.sh | ||
- run: ./scripts/tests/fuzz.sh --verbose |
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,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 |
Oops, something went wrong.