From b32552900bfdda10fa2ca6c29b8ccd34f06f98f6 Mon Sep 17 00:00:00 2001 From: Hithem <0xrequiem1@gmail.com> Date: Mon, 4 Mar 2024 12:13:30 +0100 Subject: [PATCH 1/2] fix(workflows): fix deoxys CI --- .github/workflows/binaries-build.yml | 115 ----------------- .github/workflows/configs-verifier.yml | 34 ----- .github/workflows/cron-daily.yml | 4 - .github/workflows/cron-weekly.yml | 12 -- .github/workflows/da-tests.yml | 53 -------- .github/workflows/docker-build.yml | 116 ------------------ .github/workflows/linters-cargo.yml | 4 +- .github/workflows/lock-closed.yml | 31 ----- .github/workflows/madara-commands.yml | 41 ------- .github/workflows/pre-release.yml | 42 ------- .github/workflows/pull-request.yml | 46 ++----- .github/workflows/push.yml | 40 +----- .github/workflows/release.yml | 22 ---- .../{rust-build-test.yml => rust-check.yml} | 19 ++- .github/workflows/rustdoc.yml | 38 ------ .github/workflows/starknet-js-tests.yml | 34 ----- .github/workflows/starknet-rpc-tests.yml | 55 --------- .github/workflows/tests.yml | 24 ---- 18 files changed, 25 insertions(+), 705 deletions(-) delete mode 100644 .github/workflows/binaries-build.yml delete mode 100644 .github/workflows/configs-verifier.yml delete mode 100644 .github/workflows/cron-weekly.yml delete mode 100644 .github/workflows/da-tests.yml delete mode 100644 .github/workflows/docker-build.yml delete mode 100644 .github/workflows/lock-closed.yml delete mode 100644 .github/workflows/madara-commands.yml delete mode 100644 .github/workflows/pre-release.yml delete mode 100644 .github/workflows/release.yml rename .github/workflows/{rust-build-test.yml => rust-check.yml} (69%) delete mode 100644 .github/workflows/rustdoc.yml delete mode 100644 .github/workflows/starknet-js-tests.yml delete mode 100644 .github/workflows/starknet-rpc-tests.yml delete mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/binaries-build.yml b/.github/workflows/binaries-build.yml deleted file mode 100644 index e15456ad2d..0000000000 --- a/.github/workflows/binaries-build.yml +++ /dev/null @@ -1,115 +0,0 @@ ---- -name: Task - Build binaries and publish - -on: - workflow_dispatch: - inputs: - release_tag_name: - description: "Release tag name" - type: string - required: true - workflow_call: - inputs: - release_tag_name: - description: "Release tag name" - type: string - required: true - -jobs: - build: - strategy: - fail-fast: false - matrix: - build: - - aarch64-apple-darwin - - aarch64-unknown-linux-gnu - - x86_64-apple-darwin - - x86_64-unknown-linux-gnu - # https://github.com/rust-rocksdb/rust-rocksdb/issues/665 - # - x86_64-pc-windows-gnu - - x86_64-pc-windows-msvc - include: - - build: aarch64-apple-darwin - os: macos-latest-xl - bin_name: madara - - build: aarch64-unknown-linux-gnu - os: ubuntu-latest-32-cores - bin_name: madara - - build: x86_64-apple-darwin - os: macos-latest-xl - bin_name: madara - - build: x86_64-unknown-linux-gnu - os: ubuntu-latest-32-cores - bin_name: madara - - build: x86_64-pc-windows-msvc - os: windows-latest - bin_name: madara.exe - runs-on: ${{ matrix.os }} - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup rust toolchain - run: | - rustup target add ${{ matrix.build }} - - - name: Setup build deps (linux) - if: - matrix.build == 'x86_64-unknown-linux-gnu' || matrix.build == - 'aarch64-unknown-linux-gnu' - run: | - sudo apt update - sudo apt install -y clang llvm libudev-dev protobuf-compiler libssl-dev pkg-config - - - name: Setup build deps (aarch64-unknown-linux-gnu) - if: matrix.build == 'aarch64-unknown-linux-gnu' - run: | - sudo apt update - sudo apt install -y g++-aarch64-linux-gnu libc6-dev-arm64-cross pkg-config-aarch64-linux-gnu - export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc - export CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc - export CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g+ - - - name: Setup build deps (x86_64-apple-darwin) - if: - matrix.build == 'x86_64-apple-darwin' || matrix.build == - 'aarch64-apple-darwin' - run: | - brew install protobuf - - - name: Setup build deps (x86_64-pc-windows-msvc) - if: matrix.build == 'x86_64-pc-windows-msvc' - run: | - choco install -y protoc llvm - mkdir C:/tmp/madara-libs - (New-Object net.webclient).Downloadfile("https://github.com/keep-starknet-strange/madara-infra/releases/download/win-bins-build-libs/libjemalloc.a", "C:/tmp/madara-libs/libjemalloc.a") - (New-Object net.webclient).Downloadfile("https://github.com/keep-starknet-strange/madara-infra/releases/download/win-bins-build-libs/rocksdb.lib", "C:/tmp/madara-libs/rocksdb.lib") - - - name: Build (x86_64 linux and x86_64/aarch64 apple) - if: - matrix.build == 'x86_64-unknown-linux-gnu' || matrix.build == - 'x86_64-apple-darwin' || matrix.build == 'aarch64-apple-darwin' - run: cargo build --release --target ${{ matrix.build }} - - - name: Build (aarch64-unknown-linux-gnu) - if: matrix.build == 'aarch64-unknown-linux-gnu' - run: | - export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=/usr/bin/aarch64-linux-gnu-gcc - export CC_aarch64_unknown_linux_gnu=/usr/bin/aarch64-linux-gnu-gcc - export CXX_aarch64_unknown_linux_gnu=/usr/bin/aarch64-linux-gnu-g++ - cargo build --release --target ${{ matrix.build }} - - - name: Build (x86_64-pc-windows-msvc) - if: matrix.build == 'x86_64-pc-windows-msvc' - shell: bash - run: | - JEMALLOC_OVERRIDE=C:/tmp/madara-libs/libjemalloc.a ROCKSDB_LIB_DIR=C:/tmp/madara-libs cargo build --release --target ${{ matrix.build }} - - - name: Upload binaries to release - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: target/${{ matrix.build }}/release/${{ matrix.bin_name }} - asset_name: ${{ matrix.build}}-${{ matrix.bin_name }} - tag: ${{ inputs.release_tag_name }} - overwrite: true diff --git a/.github/workflows/configs-verifier.yml b/.github/workflows/configs-verifier.yml deleted file mode 100644 index 7c8a8fedcd..0000000000 --- a/.github/workflows/configs-verifier.yml +++ /dev/null @@ -1,34 +0,0 @@ ---- -name: Task - Configs Verifier - -on: - workflow_dispatch: - workflow_call: - -jobs: - genesis-docs: - name: Genesis documentation - runs-on: ubuntu-latest - if: startsWith(github.event.ref, 'refs/tags/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: Install sha3sum - run: sudo apt-get install libdigest-sha3-perl - - name: Verify hashes - run: | - for f in $(find configs/genesis-assets -type f -not -path configs/index.json); do - cat configs/index.json | grep $(sha3sum -a 256 $f | awk '{print $1}') - done diff --git a/.github/workflows/cron-daily.yml b/.github/workflows/cron-daily.yml index b033911409..b0575ac368 100644 --- a/.github/workflows/cron-daily.yml +++ b/.github/workflows/cron-daily.yml @@ -11,10 +11,6 @@ jobs: name: Stale issues uses: ./.github/workflows/stale-issues.yml - lock_closed: - name: Lock closed issues/PRs - uses: ./.github/workflows/lock-closed.yml - security_audit: name: Security audit uses: ./.github/workflows/security-audit.yml diff --git a/.github/workflows/cron-weekly.yml b/.github/workflows/cron-weekly.yml deleted file mode 100644 index 435039291d..0000000000 --- a/.github/workflows/cron-weekly.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -name: Workflow - Weekly Cron - -on: - workflow_dispatch: - schedule: - - cron: "0 0 * * 0" - -jobs: - weekly_pre-release: - name: Weekly pre-release - uses: ./.github/workflows/pre-release.yml diff --git a/.github/workflows/da-tests.yml b/.github/workflows/da-tests.yml deleted file mode 100644 index 9a0b3a2d0f..0000000000 --- a/.github/workflows/da-tests.yml +++ /dev/null @@ -1,53 +0,0 @@ ---- -name: Task - DA Tests - -on: - workflow_dispatch: - workflow_call: - -jobs: - rpc-tests: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - da-layer: - - ethereum - - celestia - - avail - env: - BINARY_PATH: ../target/release/madara - steps: - - uses: actions/checkout@v3 - - uses: Swatinem/rust-cache@v2 - with: - shared-key: "cache" - save-if: false - - uses: actions/cache@v3 - with: - path: target/release/madara - 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: Setup dev chain - run: | - ./target/release/madara setup --chain=dev --from-local=configs - - name: Run DA Layer - run: | - bash ./scripts/da_devnet.sh ${{ matrix.da_layer }} - - name: Run DA tests - run: |- - ./target/release/madara --dev --da-layer ${{ matrix.da_layer }} --da-conf examples/da-confs/${{ matrix.da_layer }}.json & - MADARA_RUN_PID=$! - while ! echo exit | nc localhost 9944; do sleep 1; done - cd da-test - DA_LAYER=${{ matrix.da_layer }} cargo test - kill $MADARA_RUN_PID - - name: Stop DA Layer - run: | - bash ./scripts/stop_da_devnet.sh ${{ matrix.da_layer }} diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml deleted file mode 100644 index eae07b00b5..0000000000 --- a/.github/workflows/docker-build.yml +++ /dev/null @@ -1,116 +0,0 @@ ---- -name: Task - Build and Push Docker Image - -on: - workflow_dispatch: - inputs: - release_tag_name: - description: "Release tag name" - type: string - required: true - workflow_call: - inputs: - release_tag_name: - description: "Release tag name" - type: string - required: true - -env: - REGISTRY_IMAGE: ghcr.io/${{ github.repository }} - -jobs: - build: - runs-on: ubuntu-latest-32-cores - strategy: - fail-fast: false - matrix: - platform: - - linux/amd64 - - linux/arm64 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Docker meta - id: meta - uses: docker/metadata-action@v4 - with: - images: ${{ env.REGISTRY_IMAGE }} - tags: | - type=raw,value=${{ inputs.release_tag_name }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push by digest - id: build - uses: docker/build-push-action@v4 - with: - context: . - file: Dockerfile - platforms: ${{ matrix.platform }} - labels: ${{ steps.meta.outputs.labels }} - outputs: - type=image,name=${{ env.REGISTRY_IMAGE - }},push-by-digest=true,name-canonical=true,push=true - - - name: Export digest - run: | - mkdir -p /tmp/digests - digest="${{ steps.build.outputs.digest }}" - touch "/tmp/digests/${digest#sha256:}" - - - name: Upload digest - uses: actions/upload-artifact@v3 - with: - name: digests - path: /tmp/digests/* - if-no-files-found: error - retention-days: 1 - - merge: - runs-on: ubuntu-latest - needs: - - build - steps: - - name: Download digests - uses: actions/download-artifact@v3 - with: - name: digests - path: /tmp/digests - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Docker meta - id: meta - uses: docker/metadata-action@v4 - with: - images: ${{ env.REGISTRY_IMAGE }} - - - name: Login to GitHub Container Registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Create manifest list and push - working-directory: /tmp/digests - run: | - docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ - $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) - - - name: Inspect image - run: | - docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }} diff --git a/.github/workflows/linters-cargo.yml b/.github/workflows/linters-cargo.yml index cb0b83c1ba..feac1282b7 100644 --- a/.github/workflows/linters-cargo.yml +++ b/.github/workflows/linters-cargo.yml @@ -8,7 +8,7 @@ on: jobs: # FIXME: check why this is rebuilding the project every time cargo-lint: - runs-on: ubuntu-latest-32-cores + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: Swatinem/rust-cache@v2 @@ -18,7 +18,7 @@ jobs: - name: Setup build deps run: | sudo apt-get update - sudo apt-get install -y clang llvm libudev-dev protobuf-compiler + sudo apt-get install -y clang llvm libudev-dev protobuf-compiler libasound2-dev - name: Format and clippy run: | cargo fmt -- --check diff --git a/.github/workflows/lock-closed.yml b/.github/workflows/lock-closed.yml deleted file mode 100644 index 38fc60352b..0000000000 --- a/.github/workflows/lock-closed.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: Task - Lock Closed Issues/PRs - -on: - workflow_dispatch: - workflow_call: - -jobs: - lock: - name: 🔒 Lock closed issues and PRs - runs-on: ubuntu-latest - steps: - - uses: dessant/lock-threads@v2.0.3 - with: - github-token: ${{ github.token }} - issue-lock-inactive-days: "30" - issue-lock-reason: "" - issue-comment: > - Issue closed and locked due to lack of activity. - - If you encounter this same issue, please open a new issue and refer - to this closed one. - pr-lock-inactive-days: "1" - pr-lock-reason: "" - pr-comment: > - Pull Request closed and locked due to lack of activity. - - If you'd like to build on this closed PR, you can clone it using - this method: https://stackoverflow.com/a/14969986 - - Then open a new PR, referencing this closed PR in your message. diff --git a/.github/workflows/madara-commands.yml b/.github/workflows/madara-commands.yml deleted file mode 100644 index 15244e5a9e..0000000000 --- a/.github/workflows/madara-commands.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- -name: Task - Test Madara Commands - -on: - workflow_dispatch: - workflow_call: - -jobs: - build-spec: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 - with: - path: | - target/release/madara - key: - ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{ - github.run_id }} - fail-on-cache-miss: true - - name: Run setup - run: | - target/release/madara setup --chain local --from-local=configs - - name: Create build-spec (plain) - run: | - RUST_LOG=debug target/release/madara build-spec --chain local > chain-plain.json - - name: Create build-spec (raw) - run: | - RUST_LOG=debug target/release/madara build-spec --chain chain-plain.json --raw > chain-raw.json - - name: Generate Sr25519 key for Aura (Leader Election) - id: key-gen - run: | - target/release/madara key generate --scheme Sr25519 - echo "SEED_PHRASE=$(target/release/madara key generate --scheme Sr25519 | sed -n 's/Secret phrase:\s*//p')" >> "$GITHUB_OUTPUT" - - name: Derive Ed25519 key for Grandpa (Finality) - run: | - target/release/madara key inspect --scheme Ed25519 "${{ steps.key-gen.outputs.SEED_PHRASE }}" - - name: Add keys to the node keystore - run: | - target/release/madara key insert --scheme Sr25519 --suri "${{ steps.key-gen.outputs.SEED_PHRASE }}" --key-type aura - target/release/madara key insert --scheme Ed25519 --suri "${{ steps.key-gen.outputs.SEED_PHRASE }}" --key-type gran diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml deleted file mode 100644 index 871da21148..0000000000 --- a/.github/workflows/pre-release.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -name: Task - Pre-Release - -on: - workflow_dispatch: - workflow_call: - -jobs: - build: - name: Take Snapshot - runs-on: ubuntu-latest - steps: - - name: Get the tags by date - id: tags - run: | - echo "new=$(date +'weekly-%Y-%m-%d')" >> $GITHUB_OUTPUT - echo "old=$(date -d'1 week ago' +'weekly-%Y-%m-%d')" >> $GITHUB_OUTPUT - - name: Checkout branch "main" - uses: actions/checkout@v3 - with: - ref: "main" - fetch-depth: 0 - - name: Generate changelog - id: changelog - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - echo "# Automatic snapshot pre-release ${{ steps.tags.outputs.new }}" > Changelog.md - echo "" >> Changelog.md - echo "## Changes since last snapshot (${{ steps.tags.outputs.old }})" >> Changelog.md - echo "" >> Changelog.md - - name: Release snapshot - id: release-snapshot - uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4 latest version, repo archived - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ steps.tags.outputs.new }} - release_name: ${{ steps.tags.outputs.new }} - draft: false - prerelease: true - body_path: Changelog.md diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index ec480d14e4..079a1e9d6a 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -6,51 +6,27 @@ on: pull_request: branches: [main] +concurrency: + group: + pr-checks-${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: changelog: 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, configs-verifier] - - rust_build_test: - name: Build & Integration Tests - uses: ./.github/workflows/rust-build-test.yml - needs: [changelog, configs-verifier] + needs: changelog - madara_commands: - name: Test Madara commands - uses: ./.github/workflows/madara-commands.yml - needs: [linters, rust_build_test] + rust_check: + name: Run check + uses: ./.github/workflows/rust-check.yml + needs: changelog linters_cargo: name: Run Cargo linters uses: ./.github/workflows/linters-cargo.yml - needs: madara_commands - - rpc-tests: - name: Run rpc tests - uses: ./.github/workflows/starknet-rpc-tests.yml - needs: madara_commands - - starknet-js-tests: - name: Run starknet-js compatibility tests - uses: ./.github/workflows/starknet-js-tests.yml - needs: madara_commands - - starknet-foundry-tests: - name: Run Starknet Foundry compatibility tests - runs-on: ubuntu-latest - needs: madara_commands - env: - SNCAST_VERSION: "0.12.0" - SCARB_VERSION: "2.3.1" - steps: - - uses: keep-starknet-strange/starknet-foundry-compatibility-tests@main + needs: rust_check diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index ea2dc26d74..2fcdab6776 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -11,43 +11,11 @@ jobs: name: Run linters uses: ./.github/workflows/linters.yml - rust_build_test: - name: Build & Integration Tests - uses: ./.github/workflows/rust-build-test.yml - - madara_commands: - name: Test Madara commands - uses: ./.github/workflows/madara-commands.yml - needs: [linters, rust_build_test] + rust_check: + name: Run check + uses: ./.github/workflows/rust-check.yml linters_cargo: name: Run Cargo linters uses: ./.github/workflows/linters-cargo.yml - needs: madara_commands - - rpc-tests: - name: Run rpc tests - uses: ./.github/workflows/starknet-rpc-tests.yml - needs: madara_commands - - starknet-js-tests: - name: Run starknet-js compatibility tests - uses: ./.github/workflows/starknet-js-tests.yml - needs: madara_commands - - starknet-foundry-tests: - name: Run Starknet Foundry compatibility tests - runs-on: ubuntu-latest - needs: madara_commands - env: - SNCAST_VERSION: "0.12.0" - SCARB_VERSION: "2.3.1" - steps: - - uses: keep-starknet-strange/starknet-foundry-compatibility-tests@main - - rustdoc: - name: Deploy docs to GitHub Pages - uses: ./.github/workflows/rustdoc.yml - needs: linters_cargo - permissions: - contents: write + needs: rust_check diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 182240810c..0000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -name: Workflow - Release - -on: - workflow_dispatch: - release: - types: [published] - -jobs: - docker_release_build: - name: Docker release build - uses: ./.github/workflows/docker-build.yml - with: - release_tag_name: ${{ github.event.release.tag_name }} - - binaries_release_build: - name: Build binaries (release) - uses: ./.github/workflows/binaries-build.yml - permissions: - contents: write - with: - release_tag_name: ${{ github.event.release.tag_name }} diff --git a/.github/workflows/rust-build-test.yml b/.github/workflows/rust-check.yml similarity index 69% rename from .github/workflows/rust-build-test.yml rename to .github/workflows/rust-check.yml index 59f98ca330..de235fd788 100644 --- a/.github/workflows/rust-build-test.yml +++ b/.github/workflows/rust-check.yml @@ -1,13 +1,13 @@ --- -name: Task - Build & Integration Tests +name: Task - Run check on: workflow_dispatch: workflow_call: jobs: - rust_build_test: - runs-on: ubuntu-latest-32-cores + rust_check: + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: Swatinem/rust-cache@v2 @@ -16,7 +16,7 @@ jobs: - uses: actions/cache@v3 with: path: | - target/release/madara + target/release/deoxys key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{ github.run_id }} @@ -28,14 +28,11 @@ jobs: if: steps.cache.outputs.cache-hit != 'true' run: rustup show - - name: Setup build deps + - name: Setup check deps run: | sudo apt-get update - sudo apt-get install -y clang llvm libudev-dev protobuf-compiler + sudo apt-get install -y clang llvm libudev-dev protobuf-compiler libasound2-dev - - name: Build the project + - name: Check the project run: | - cargo build --release --workspace - - - name: Run integration tests - run: cargo test --release + cargo check --release --workspace diff --git a/.github/workflows/rustdoc.yml b/.github/workflows/rustdoc.yml deleted file mode 100644 index 9da2810a83..0000000000 --- a/.github/workflows/rustdoc.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Task - Deploy Docs to GitHub Pages - -on: - workflow_dispatch: - workflow_call: - -jobs: - release: - name: GitHub Pages - runs-on: ubuntu-latest - - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - - - name: Set-Up - run: > - sudo apt-get update && sudo apt-get install -y clang llvm libudev-dev - protobuf-compiler - - - name: Setup rust toolchain - run: rustup show - - uses: Swatinem/rust-cache@v2 - - name: Build Documentation - run: cargo doc --all --no-deps - - - name: Prepare index - run: | - echo '' > target/doc/index.html - - - name: Deploy Documentation - uses: peaceiris/actions-gh-pages@v3.9.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_branch: gh-pages - publish_dir: ./target/doc - keep_files: true diff --git a/.github/workflows/starknet-js-tests.yml b/.github/workflows/starknet-js-tests.yml deleted file mode 100644 index c18721cb5c..0000000000 --- a/.github/workflows/starknet-js-tests.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Starknet-js Compatibility Tests - -on: - workflow_dispatch: - workflow_call: - -jobs: - test: - runs-on: ubuntu-latest - env: - BINARY_PATH: ../target/release/madara - steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 - with: - path: | - target/release/madara - key: - ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{ - github.run_id }} - fail-on-cache-miss: true - - name: Setup dev chain - run: | - ./target/release/madara setup --chain=dev --from-local=configs - - name: Run starknet-js test - run: |- - ./target/release/madara --dev & - MADARA_RUN_PID=$! - while ! echo exit | nc localhost 9944; do sleep 1; done - git clone https://github.com/keep-starknet-strange/sequencer-js-compatibility-tests.git - cd sequencer-js-compatibility-tests - npm install - npm test - kill $MADARA_RUN_PID diff --git a/.github/workflows/starknet-rpc-tests.yml b/.github/workflows/starknet-rpc-tests.yml deleted file mode 100644 index f25800a6b6..0000000000 --- a/.github/workflows/starknet-rpc-tests.yml +++ /dev/null @@ -1,55 +0,0 @@ ---- -name: Task - Rpc Tests - -on: - workflow_dispatch: - workflow_call: - -jobs: - rpc-tests: - runs-on: ubuntu-latest - env: - BINARY_PATH: ../target/release/madara - steps: - - uses: actions/checkout@v3 - - uses: Swatinem/rust-cache@v2 - with: - shared-key: "cache" - save-if: false - - uses: actions/cache@v3 - with: - path: | - target/release/madara - key: - ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{ - github.run_id }} - fail-on-cache-miss: true - - uses: software-mansion/setup-scarb@v1 - with: - scarb-version: "2.3.1" - - name: Setup build deps - run: | - sudo apt-get update - sudo apt-get install -y clang llvm libudev-dev protobuf-compiler - - name: Setup dev chain - run: | - ./target/release/madara setup --chain=dev --from-local=configs - - name: Compile contracts for rpc-tests - run: | - cd starknet-rpc-test/contracts && ./generate_declare_contracts.sh 8 - - name: Run rpc test without cache - run: |- - ./target/release/madara --dev --sealing=manual --da-layer=ethereum --da-conf=examples/da-confs/ethereum.json & - MADARA_RUN_PID=$! - while ! echo exit | nc localhost 9944; do sleep 1; done - cd starknet-rpc-test - cargo test - kill $MADARA_RUN_PID - - name: Run rpc test with cache - run: |- - ./target/release/madara --dev --sealing=manual --cache --da-layer=ethereum --da-conf=examples/da-confs/ethereum.json & - MADARA_RUN_PID=$! - while ! echo exit | nc localhost 9944; do sleep 1; done - cd starknet-rpc-test - cargo test - kill $MADARA_RUN_PID diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 33b6f3427b..0000000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -name: Task - Integration Tests - -on: - workflow_dispatch: - workflow_call: - -jobs: - integration-tests: - runs-on: ubuntu-latest - env: - BINARY_PATH: ../target/release/madara - steps: - - uses: actions/checkout@v3 - - uses: Swatinem/rust-cache@v2 - with: - shared-key: "cache" - save-if: false - - name: Setup build deps - run: | - sudo apt-get update - sudo apt-get install -y clang llvm libudev-dev protobuf-compiler - - name: Run crates test - run: cargo test --release From 33fa0cd431daad54f670cc4f58deb19cfeaf6ff3 Mon Sep 17 00:00:00 2001 From: Hithem <0xrequiem1@gmail.com> Date: Mon, 4 Mar 2024 12:18:11 +0100 Subject: [PATCH 2/2] fix(workflows): test with some changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ed40e1cea..80cbbc9e57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ git # Madara Changelog ## Next release +- fix(workflows): Fix deoxys CI - feat(rpc): add_invoke_tx, add_deploy_account_tx, add_declare_tx - feat(rpc): tx_receipt, re-execute tx - feat(script): added CI scripts for starting Deoxys and comparing JSON RPC