-
Notifications
You must be signed in to change notification settings - Fork 0
121 lines (101 loc) · 4.01 KB
/
main.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
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