Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions .github/workflows/polkadot-sdk-compatibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Exercises the relevant GH action the same way polkadot-sdk does, but against
# this repo's current working tree and polkadot-sdk's master branch, to catch
# breaking changes before polkadot-sdk bumps the revive-differential-tests commit it pins.
name: Polkadot SDK Compatibility

on:
push:
branches:
- main
paths-ignore:
- "**/*.md"
pull_request:
branches:
- main
paths-ignore:
- "**/*.md"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
resolve-config:
runs-on: ubuntu-24.04
outputs:
image: ${{ steps.config.outputs.image }}
resolc-version: ${{ steps.config.outputs.resolc-version }}
polkadot-sdk-sha: ${{ steps.config.outputs.polkadot-sdk-sha }}
steps:
- name: Checkout the Polkadot SDK CI environment
uses: actions/checkout@v6
with:
repository: paritytech/polkadot-sdk
ref: master
sparse-checkout: .github

- name: Resolve Polkadot SDK configuration
id: config
shell: bash
run: |
set -euo pipefail
source .github/env
echo "image=$IMAGE" >> "$GITHUB_OUTPUT"
echo "resolc-version=$RESOLC_VERSION" >> "$GITHUB_OUTPUT"
echo "polkadot-sdk-sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"

differential-tests:
needs: resolve-config
runs-on: parity-large-persistent
timeout-minutes: 60
container:
image: ${{ needs.resolve-config.outputs.image }}
strategy:
fail-fast: false
matrix:
platform:
- revive-dev-node-revm-solc
- revive-dev-node-polkavm-resolc
steps:
- name: Checkout revive-differential-tests
uses: actions/checkout@v6
with:
path: revive-differential-tests
submodules: recursive

- name: Checkout the Polkadot SDK
uses: actions/checkout@v6
with:
repository: paritytech/polkadot-sdk
ref: ${{ needs.resolve-config.outputs.polkadot-sdk-sha }}
path: polkadot-sdk

- name: Configure forklift
shell: bash
run: |
mkdir -p .forklift
cp polkadot-sdk/.forklift/config.toml .forklift/config.toml

- name: Download resolc
id: resolc
shell: bash
env:
RESOLC_VERSION: ${{ needs.resolve-config.outputs.resolc-version }}
run: |
set -euo pipefail
INSTALL_DIR="/usr/local/bin"
curl -fsSL --retry 3 -o "$INSTALL_DIR/resolc" "https://github.com/paritytech/revive/releases/download/v${RESOLC_VERSION}/resolc-x86_64-unknown-linux-musl"
chmod +x "$INSTALL_DIR/resolc"
resolc --version
echo "resolc-path=$INSTALL_DIR/resolc" >> "$GITHUB_OUTPUT"

- name: Run the differential tests
uses: ./revive-differential-tests/.github/actions/run-differential-tests
with:
platform: ${{ matrix.platform }}
revive-differential-tests-path: revive-differential-tests
polkadot-sdk-path: polkadot-sdk
cargo-command: "forklift cargo"
resolc-path: ${{ steps.resolc.outputs.resolc-path }}
expectations-file-path: polkadot-sdk/.github/assets/${{ matrix.platform }}.json
Loading