Blocks Running Workflow #7
Workflow file for this run
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
name: Execute blocks | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
merge_group: | ||
types: [checks_requested] | ||
jobs: | ||
native-vm-blocks-dump: | ||
name: Check Dump Naitve vs VM | ||
runs-on: ubuntu-latest | ||
env: | ||
MLIR_SYS_190_PREFIX: /usr/lib/llvm-19/ | ||
LLVM_SYS_191_PREFIX: /usr/lib/llvm-19/ | ||
TABLEGEN_190_PREFIX: /usr/lib/llvm-19/ | ||
RPC_ENDPOINT_TESTNET: ${{ secrets.RPC_ENDPOINT_TESTNET }} | ||
RPC_ENDPOINT_MAINNET: ${{ secrets.RPC_ENDPOINT_MAINNET }} | ||
strategy: | ||
matrix: | ||
runner: ["native", "vm"] | ||
features: ["state-dump", "state-dump,only_cairo_vm"] | ||
dump-path: ["state_dumps/native", "state_dumps/vm"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Check and free hdd space left | ||
if: ${{ matrix.runner == "native" }} | ||
Check failure on line 29 in .github/workflows/starknet-blocks.yml GitHub Actions / Execute blocksInvalid workflow file
|
||
run: | | ||
echo "Listing 20 largest packages" | ||
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 20 | ||
df -h | ||
sudo apt-get update | ||
sudo apt-get remove -y '^llvm-.*' | ||
sudo apt-get remove -y 'php.*' | ||
sudo apt-get remove -y '^dotnet-.*' | ||
sudo apt-get remove -y '^temurin-.*' | ||
sudo apt-get remove -y azure-cli microsoft-edge-stable google-chrome-stable firefox mono-devel | ||
sudo apt-get autoremove -y | ||
sudo apt-get clean | ||
df -h | ||
echo "Removing large directories" | ||
# deleting 15GB | ||
sudo rm -rf /usr/share/dotnet/ | ||
sudo rm -rf /usr/local/lib/android | ||
df -h | ||
- uses: dtolnay/[email protected] | ||
with: | ||
components: clippy | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: add llvm deb repository | ||
if: ${{ matrix.runner == "native" }} | ||
uses: myci-actions/add-deb-repo@11 | ||
with: | ||
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main | ||
repo-name: llvm-repo | ||
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key | ||
- name: Install LLVM | ||
if: ${{ matrix.runner == "native" }} | ||
run: sudo apt-get install llvm-19 llvm-19-dev llvm-19-runtime clang-19 clang-tools-19 lld-19 libpolly-19-dev libmlir-19-dev mlir-19-tools | ||
- name: Install Cairo Native deps | ||
if: ${{ matrix.runner == "native" }} | ||
run: make deps | ||
- name: Build Cairo Native project | ||
if: ${{ matrix.runner == "native" }} | ||
run: make build | ||
- name: Build runtime subproject | ||
if: ${{ matrix.runner == "native" }} | ||
run: | | ||
make runtime-ci | ||
export CAIRO_NATIVE_RUNTIME_LIBRARY=libcairo_native_runtime.a | ||
- name: Checkout to Starknet Replay | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: lambdaclass/starknet-replay | ||
ref: e125989afa77022995b3989c1d64292755312a87 | ||
- name: Install Starknet Replay deps | ||
run: make deps | ||
- name: Patch Cairo Native's version | ||
if: ${{ matrix.runner == "native" }} | ||
run: | | ||
echo \ | ||
"\n[patch.'https://github.com/lambdaclass/cairo_native'] | ||
cairo-native = { git = 'https://github.com/lambdaclass//cairo_native.git', rev = ${{ github.event.pull_request.head.sha }}" \ | ||
Cargo.toml | ||
cargo update | ||
- name: Run Blocks | ||
run: cargo run --features ${{matrix.features}} block-range 807301 807301 mainnet | ||
- name: Upload generated Dump | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dump-{{matrix.runner}} | ||
path: ${{matrix.dump-path}} | ||
compare-dump: | ||
needs: [native-vm-blocks-dump] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Starknet Replay | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: lambdaclass/starknet-replay | ||
ref: e125989afa77022995b3989c1d64292755312a87 | ||
- name: Fetch Native dumps | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dump-native | ||
path: state_dumps/native | ||
- name: Fetch VM dumps | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dump-vm | ||
path: state_dumps/vm | ||
- name: Check Diffs | ||
run: | | ||
diffs=./scripts/diff-check.sh | ||
if cpm -s $diffs 0 then \ | ||
echo "$diffs DUMPS DIFFING" \ | ||
exit 1 \ | ||
fi |