Skip to content

WIP: debugging

WIP: debugging #20

Workflow file for this run

name: Daily Workflow
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
push:
branches:
- feat/cicd
jobs:
check-polkadot:
runs-on: ubuntu-latest
outputs:
new_release: ${{ steps.set.outputs.new_release }}
steps:
- uses: oprypin/find-latest-tag@v1
with:
repository: paritytech/polkadot # The repository to scan.
releases-only: true # We know that all relevant tags have a GitHub release for them.
id: polkadot-binary-release-tag # The step ID to refer to later.
- run: echo "Polkadot binary is at version ${{ steps.polkadot-binary-release-tag.outputs.tag }}"
- name: Compare polkadot binary with cached release
id: set
run: |
if [ -f latest_release_polkadot.txt ]; then
CACHED_RELEASE=$(cat latest_release_polkadot.txt)
else
CACHED_RELEASE=""
fi
if [ "${{ steps.polkadot-binary-release-tag.outputs.tag }}" != "$CACHED_RELEASE" ]; then
echo "${{ steps.polkadot-binary-release-tag.outputs.tag }}" > latest_release_polkadot.txt
echo "new_release=true" >> "$GITHUB_OUTPUT"
fi
- name: Cache latest Polkadot binary release tag
uses: actions/cache@v3
with:
path: latest_release_polkadot.txt
key: latest_release_polkadot.txt
check-cumulus:
runs-on: ubuntu-latest
outputs:
new_release: ${{ steps.set.outputs.new_release }}
tag: ${{ steps.cumulus-binary-release-tag.outputs.tag }}
steps:
- uses: oprypin/find-latest-tag@v1
with:
repository: paritytech/cumulus # The repository to scan.
releases-only: true # We know that all relevant tags have a GitHub release for them.
prefix: 'v'
id: cumulus-binary-release-tag # The step ID to refer to later.
- run: echo "Cumulus binary is at version ${{ steps.cumulus-binary-release-tag.outputs.tag }}"
- name: Compare cumulus binary with cached release
id: set
run: |
if [ -f latest_release_cumulus.txt ]; then
CACHED_RELEASE=$(cat latest_release_cumulus.txt)
else
CACHED_RELEASE=""
fi
if [ "${{ steps.cumulus-binary-release-tag.outputs.tag }}" != "$CACHED_RELEASE" ]; then
echo "${{ steps.cumulus-binary-release-tag.outputs.tag }}" > latest_release_cumulus.txt
echo "new_release=true" >> "$GITHUB_OUTPUT"
fi
- name: Cache latest Cumulus binary release tag
uses: actions/cache@v3
with:
path: latest_release_cumulus.txt
key: latest_release_cumulus.txt
check-cumulus-wasm:
runs-on: ubuntu-latest
outputs:
new_release: ${{ steps.set.outputs.new_release }}
tag: ${{ steps.cumulus-wasm-release-tag.outputs.tag }}
steps:
- uses: oprypin/find-latest-tag@v1
with:
repository: paritytech/cumulus # The repository to scan.
releases-only: true # We know that all relevant tags have a GitHub release for them.
prefix: 'parachains'
id: cumulus-wasm-release-tag # The step ID to refer to later.
- run: echo "Cumulus WASM is at version ${{ steps.cumulus-wasm-release-tag.outputs.tag }}"
- name: Compare cumulus binary with cached release
id: set
run: |
if [ -f latest_release_cumulus_wasm.txt ]; then
CACHED_RELEASE=$(cat latest_release_cumulus_wasm.txt)
else
CACHED_RELEASE=""
fi
if [ "${{ steps.cumulus-wasm-release-tag.outputs.tag }}" != "$CACHED_RELEASE" ]; then
echo "${{ steps.cumulus-wasm-release-tag.outputs.tag }}" > latest_release_cumulus_wasm.txt
echo "new_release=true" >> "$GITHUB_OUTPUT"
fi
- name: Cache latest Cumulus wasm release tag
uses: actions/cache@v3
with:
path: latest_release_cumulus_wasm.txt
key: latest_release_cumulus_wasm.txt
check-kagome:
runs-on: ubuntu-latest
outputs:
new_release: ${{ steps.set.outputs.new_release }}
steps:
- uses: oprypin/find-latest-tag@v1
with:
repository: soramitsu/kagome # The repository to scan.
releases-only: true # We know that all relevant tags have a GitHub release for them.
id: kagome-release-tag # The step ID to refer to later.
- name: Compare with cached release
id: set
run: |
if [ -f latest_release_kagome.txt ]; then
CACHED_RELEASE=$(cat latest_release_kagome.txt)
else
CACHED_RELEASE=""
fi
if [ "${{ steps.kagome-release-tag.outputs.tag }}" != "$CACHED_RELEASE" ]; then
echo "${{ steps.kagome-release-tag.outputs.tag }}" > latest_release_kagome.txt
echo "new_release=true" >> "$GITHUB_OUTPUT"
fi
- name: Cache latest release
uses: actions/cache@v3
with:
path: latest_release_kagome.txt
key: latest_release_kagome.txt
check-zombienet:
runs-on: ubuntu-latest
outputs:
new_release: ${{ steps.set.outputs.new_release }}
steps:
- uses: oprypin/find-latest-tag@v1
with:
repository: paritytech/zombienet # The repository to scan.
releases-only: true # We know that all relevant tags have a GitHub release for them.
id: zombienet-release-tag # The step ID to refer to later.
- name: Compare with cached release
id: set
run: |
if [ -f latest_release_zombienet.txt ]; then
CACHED_RELEASE=$(cat latest_release_zombienet.txt)
else
CACHED_RELEASE=""
fi
if [ "${{ steps.zombienet-release-tag.outputs.tag }}" != "$CACHED_RELEASE" ]; then
echo "${{ steps.zombienet-release-tag.outputs.tag }}" > latest_release_zombienet.txt
echo "new_release=true" >> "$GITHUB_OUTPUT"
fi
- name: Cache latest release
uses: actions/cache@v3
with:
path: latest_release_zombienet.txt
key: latest_release_zombienet.txt
fetch-zombienet:
runs-on: ubuntu-latest
needs: check-zombienet
if: needs.check-zombienet.outputs.new_release == 'true'
steps:
- name: Fetch Github Release Asset from zombienet
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: "paritytech/zombienet"
file: "zombienet-linux-x64"
target: "zombienet"
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: Cache latest release
uses: actions/cache@v3
with:
path: zombienet
key: zombienet
fetch-polkadot-binary:
runs-on: ubuntu-latest
needs: check-polkadot
if: needs.check-polkadot.outputs.new_release == 'true'
steps:
- name: Fetch Github Release Asset from polkadot
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: "paritytech/polkadot"
file: "polkadot"
target: "polkadot"
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: Cache latest release
uses: actions/cache@v3
with:
path: polkadot
key: polkadot
fetch-cumulus-binary:
runs-on: ubuntu-latest
needs: check-cumulus
if: needs.check-cumulus.outputs.new_release == 'true'
steps:
- name: Fetch Github Release Asset from polkadot-parachain
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: "paritytech/cumulus"
file: "polkadot-parachain"
target: "polkadot-parachain"
version: "tags/${{ needs.check-cumulus.outputs.tag }}"
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: Cache latest release
uses: actions/cache@v3
with:
path: polkadot-parachain
key: polkadot-parachain
fetch-cumulus-wasm-binary:
runs-on: ubuntu-latest
needs: check-cumulus-wasm
if: needs.check-cumulus-wasm.outputs.new_release == 'true'
steps:
- name: Fetch Github Release Asset from cumulus
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: "paritytech/cumulus"
file: "rococo-parachain_runtime(.*)wasm"
version: "tags/${{needs.check-cumulus-wasm.outputs.tag}}"
target: "./fetched.wasm"
regex: true
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: Cache latest release
uses: actions/cache@v3
with:
path: fetched.wasm
key: fetched.wasm
run-tests:
runs-on: ubuntu-latest
needs: [fetch-polkadot-binary, fetch-cumulus-binary, fetch-cumulus-wasm-binary, fetch-zombienet]
if: always()
steps:
- name: Debugging
run: |
echo "Current directory:"
pwd
echo "List files:"
ls -la
echo "GITHUB_WORKSPACE value:"
echo "$GITHUB_WORKSPACE"
- name: Add binaries to PATH
run: |
echo "$GITHUB_WORKSPACE" >> $GITHUB_PATH
chmod +x polkadot
chmod +x polkadot-parachain
chmod +x zombienet
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
- run: mv fetched.wasm ./target/debug/test.wasm'
- name: Run wasm_injector
run: |
./target/debug/wasm_injector nothing ./target/debug/test.wasm ./wasm/orig.wasm.hex --hexified
./target/debug/wasm_injector stack-overflow ./target/debug/test.wasm ./wasm/stack-overflow.wasm.hex --hexified
./target/debug/wasm_injector heap-overflow ./target/debug/test.wasm ./wasm/heap-overflow.wasm.hex --hexified
./target/debug/wasm_injector infinite-loop ./target/debug/test.wasm ./wasm/infinite-loop.wasm.hex --hexified
- name: Set up Julia
uses: julia-actions/setup-julia@v1
with:
version: '1.9.1'
- name: Run Julia script
run: julia scripts/runTests.jl