Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'madara/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
antiyro committed Sep 28, 2023
2 parents 57c9b7c + 97cd7de commit e0c90c4
Show file tree
Hide file tree
Showing 59 changed files with 1,629 additions and 111,248 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/configs-verifier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Task - Configs Verifier

on:
workflow_dispatch:
workflow_call:

jobs:
genesis-docs:
name: Genesis documentation
runs-on: ubuntu-latest
if: ${{ github.event.label.name != 'ignore-docs' }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Ensure docs changes
run: |
if [[ -n $(git diff --name-only origin/main | grep configs/genesis-assets/genesis.json) ]]; then
git diff --name-only origin/main | grep docs/genesis.md
fi
configs-hashes:
name: Verify genesis-assets hashes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Verify hashes
run: |
for f in $(find configs/genesis-assets/ -type f -not -path configs/index.json); do
cat configs/index.json | grep $(md5sum $f | awk '{print $1}')
done
38 changes: 38 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Task - Integration Tests

on:
workflow_dispatch:
workflow_call:

jobs:
coverage:
# sadly, for now we have to "rebuild" for the coverage
runs-on: ubuntu-latest-32-cores
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key:
${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{
github.run_id }}
fail-on-cache-miss: true
- name: Setup build deps
run: |
sudo apt-get update
sudo apt-get install -y clang llvm libudev-dev protobuf-compiler
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Coverage
run: cargo llvm-cov --codecov --output-path codecov.json
- name: Upload coverage to codecov.io
uses: codecov/codecov-action@v3
with:
files: codecov.json
fail_ci_if_error: false
5 changes: 3 additions & 2 deletions .github/workflows/madara-commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ jobs:
${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{
github.run_id }}
fail-on-cache-miss: true
- name: Run setup
run: |
target/release/madara setup
- name: Create build-spec (plain)
run: |
target/release/madara build-spec --chain local > chain-plain.json
- name: Create build-spec (raw)
run: |
target/release/madara build-spec --chain chain-plain.json --raw > chain-raw.json
# TODO: add remaining commands
24 changes: 0 additions & 24 deletions .github/workflows/pull-request-close.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,3 @@ jobs:
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Generate a token
id: generate_token
uses: getsentry/action-github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIV_KEY }}

- name: Cleanup
run: |
gh extension install actions/gh-actions-cache
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -B $BRANCH --key ${{ runner.os }}-cargo- | cut -f 1 )
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
echo "Deleting cache $cacheKey"
gh actions-cache delete $cacheKey -B $BRANCH --confirm
done
echo "Done"
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
15 changes: 13 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,19 @@ jobs:
name: Enforce CHANGELOG
uses: ./.github/workflows/changelog.yml

configs-verifier:
name: Verify configs
uses: ./.github/workflows/configs-verifier.yml

linters:
name: Run linters
uses: ./.github/workflows/linters.yml
needs: changelog
needs: [changelog, configs-verifier]

rust_build:
name: Build Rust project
uses: ./.github/workflows/rust-build.yml
needs: changelog
needs: [changelog, configs-verifier]

madara_commands:
name: Test Madara commands
Expand All @@ -31,6 +35,13 @@ jobs:
uses: ./.github/workflows/linters-cargo.yml
needs: rust_build

# TODO: Unlock when rust tests are working on main
# coverage:
# name: Run coverage
# uses: ./.github/workflows/coverage.yml
# needs: [madara_commands, linters_cargo]

# https://github.com/keep-starknet-strange/madara/issues/1097
# benchmark:
# name: Run benchmarks
# uses: ./.github/workflows/benchmarks.yml
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Next release

- ci: disable pr close workflow
- ci: add ci verification for detecting genesis changes and config hashes
- feat: better management of custom configurations for genesis assets
- fix: fix sharingan chain spec
- fix: update madara infra to main branch
- fix: update `Cargo.lock`
Expand Down
Loading

0 comments on commit e0c90c4

Please sign in to comment.