Skip to content

Commit 2130343

Browse files
committedAug 18, 2023
release upload action fix
1 parent ed18c51 commit 2130343

File tree

4 files changed

+41
-14
lines changed

4 files changed

+41
-14
lines changed
 

‎.github/workflows/release-upload.yml

+33-7
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,41 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout code
17-
uses: actions/checkout@v2
18-
- name: Install mxpy
17+
uses: actions/checkout@v3
18+
19+
- name: Install rust
20+
uses: actions-rust-lang/setup-rust-toolchain@v1
21+
with:
22+
default: true
23+
toolchain: nightly-2023-08-08
24+
target: wasm32-unknown-unknown
25+
26+
- name: Setup the PATH variable
1927
run: |
20-
source .github/workflows/env
21-
pip3 install multiversx-sdk-cli
22-
- name: Install wasm-opt
28+
echo "PATH=$HOME/.local/bin:$HOME/multiversx-sdk/vmtools:$PATH" >> $GITHUB_ENV
29+
30+
- name: Install prerequisites
2331
run: |
24-
mxpy deps install nodejs
25-
mxpy deps install wasm-opt
32+
pip3 install multiversx-sdk-cli==v6.0.0
33+
mkdir $HOME/multiversx-sdk
34+
python3 -m multiversx_sdk_cli.cli deps install vmtools --tag v1.4.60
35+
36+
wget -O binaryen.tar.gz https://github.com/WebAssembly/binaryen/releases/download/version_112/binaryen-version_112-x86_64-linux.tar.gz
37+
tar -xf binaryen.tar.gz
38+
cp binaryen-version_112/bin/wasm-opt $HOME/.local/bin
39+
40+
sudo apt install -y wabt=1.0.27-1
41+
42+
which wasm-opt
43+
which wasm2wat
44+
which run-scenarios
45+
46+
- name: Install libtinfo5
47+
if: inputs.install-libtinfo5
48+
run: |
49+
sudo apt update
50+
sudo apt install -y libtinfo5
51+
2652
- name: Build project example outputs
2753
run: |
2854
./zip-example-wasm.sh

‎.github/workflows/template-test-current.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ jobs:
1515
name: Template tool test - current (unreleased) templates
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v3
18+
- name: Checkout code
19+
uses: actions/checkout@v3
1920

2021
- name: Install rust
2122
uses: actions-rust-lang/setup-rust-toolchain@v1

‎.github/workflows/template-test-released.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ jobs:
1515
name: Template tool test - released templates
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v3
18+
- name: Checkout code
19+
uses: actions/checkout@v3
1920

2021
- name: Install rust
2122
uses: actions-rust-lang/setup-rust-toolchain@v1

‎zip-example-wasm.sh

+4-5
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,18 @@
44
## Used in generating an output artefact for each elrond-wasm release.
55

66
ZIP_OUTPUT="examples-wasm.zip"
7+
TARGET_DIR=$PWD/target
8+
cargo install multiversx-sc-meta
79

810
# start fresh
911
rm -f $ZIP_OUTPUT
1012

11-
set -e
13+
sc-meta all build --target-dir-wasm $TARGET_DIR --path ./contracts/examples || return 1
14+
1215
SMART_CONTRACT_JSONS=$(find contracts/examples -name "multiversx.json")
1316
for smart_contract_json in $SMART_CONTRACT_JSONS
1417
do
1518
smart_contract_folder=$(dirname $smart_contract_json)
16-
echo ""
17-
# build example wasm + ABI
18-
rm -rf $smart_contract_folder/output
19-
(set -x; mxpy --verbose contract build $smart_contract_folder)
2019

2120
# add to zip
2221
zip -ur --junk-paths $ZIP_OUTPUT $smart_contract_folder/output

0 commit comments

Comments
 (0)
Please sign in to comment.