fix: kagome workspace #55
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: Daily Workflow | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * *' | |
push: | |
branches: | |
- feat/cicd | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- 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 }}" | |
- 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 polkadot | |
uses: dsaltares/fetch-gh-release-asset@master | |
with: | |
repo: "paritytech/polkadot" | |
file: "polkadot" | |
target: "polkadot" | |
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
- 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: 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: 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 }} | |
- run: find . -type f -regex '.*/rococo-parachain_runtime.*wasm' -exec mv {} fetched.wasm \; | |
- name: Fetch kagome | |
run: | | |
docker run -v $GITHUB_WORKSPACE:/workspace --rm soramitsu/kagome:latest cp /usr/local/bin/kagome /workspace/kagome | |
- name: Debugging | |
run: | | |
echo "Current directory:" | |
pwd | |
echo "List files:" | |
ls -la | |
ls -la kagome | |
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 | |
chmod +x kagome | |
- 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 |