Skip to content

fix(scripts): Fix julia script #5

fix(scripts): Fix julia script

fix(scripts): Fix julia script #5

Workflow file for this run

name: Daily Workflow
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
push:
branches:
- feat/cicd
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- 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 }}
- 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: 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/${{ steps.cumulus-binary-release-tag.outputs.tag }}"
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: Add binaries to PATH
run: |
echo "$GITHUB_WORKSPACE" >> $GITHUB_PATH
chmod +x polkadot
chmod +x polkadot-parachain
- 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: Fetch Github Release Asset from cumulus
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: "paritytech/cumulus"
file: "rococo-parachain_runtime(.*)wasm"
version: "tags/${{steps.cumulus-wasm-release-tag.outputs.tag}}"
target: "./"
regex: true
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
- name: Move test.wasm
run: |
find . -type f -regextype posix-extended -regex '.*/rococo-parachain_runtime.*wasm' -exec bash -c 'mv "$0" ./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
./target/debug/wasm_injector noops ./target/debug/test.wasm ./wasm/noops.wasm.hex --hexified
- name: Checkout zombienet repository
uses: actions/checkout@v2
with:
repository: paritytech/zombienet
path: zombienet
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 'latest'
- name: Build and install zombienet
run: |
cd zombienet/javascript
npm install
npm run build
- name: Set up Julia
uses: julia-actions/setup-julia@v1
with:
version: '1.9.1'
- name: Run Julia script
run: julia scripts/runTests.jl
# - name: Spawn zombienet and run test after 60 seconds wait for spawn to complete
# run: |
# node zombienet/javascript/packages/cli/dist/cli.js --provider native spawn tests/0003-parachains-pvf-memory-allocation-bad.toml &
# sleep 60
# node zombienet/javascript/packages/cli/dist/cli.js --provider native test tests/0003-parachains-pvf-memory-allocation-bad.zndsl