Skip to content

Commit

Permalink
template test CI fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-marinica committed Aug 18, 2023
1 parent cabc532 commit ed18c51
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 7 deletions.
36 changes: 33 additions & 3 deletions .github/workflows/template-test-current.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,45 @@ permissions:
pull-requests: write

jobs:
template_test:
template_test_current:
name: Template tool test - current (unreleased) templates
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3

- name: Install rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
default: true
toolchain: nightly-2023-08-08
target: wasm32-unknown-unknown

- name: Setup the PATH variable
run: |
echo "PATH=$HOME/.local/bin:$HOME/multiversx-sdk/vmtools:$PATH" >> $GITHUB_ENV
- name: Install prerequisites
run: |
pip3 install multiversx-sdk-cli==v6.0.0
mkdir $HOME/multiversx-sdk
python3 -m multiversx_sdk_cli.cli deps install vmtools --tag v1.4.60
wget -O binaryen.tar.gz https://github.com/WebAssembly/binaryen/releases/download/version_112/binaryen-version_112-x86_64-linux.tar.gz
tar -xf binaryen.tar.gz
cp binaryen-version_112/bin/wasm-opt $HOME/.local/bin
sudo apt install -y wabt=1.0.27-1
which wasm-opt
which wasm2wat
which run-scenarios
- name: Install libtinfo5
if: inputs.install-libtinfo5
run: |
sudo apt update
sudo apt install -y libtinfo5
- name: Run template tool test
run: |
cd framework/meta
Expand Down
36 changes: 33 additions & 3 deletions .github/workflows/template-test-released.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,45 @@ permissions:
pull-requests: write

jobs:
template_test:
template_test_released:
name: Template tool test - released templates
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3

- name: Install rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
default: true
toolchain: nightly-2023-08-08
target: wasm32-unknown-unknown

- name: Setup the PATH variable
run: |
echo "PATH=$HOME/.local/bin:$HOME/multiversx-sdk/vmtools:$PATH" >> $GITHUB_ENV
- name: Install prerequisites
run: |
pip3 install multiversx-sdk-cli==v6.0.0
mkdir $HOME/multiversx-sdk
python3 -m multiversx_sdk_cli.cli deps install vmtools --tag v1.4.60
wget -O binaryen.tar.gz https://github.com/WebAssembly/binaryen/releases/download/version_112/binaryen-version_112-x86_64-linux.tar.gz
tar -xf binaryen.tar.gz
cp binaryen-version_112/bin/wasm-opt $HOME/.local/bin
sudo apt install -y wabt=1.0.27-1
which wasm-opt
which wasm2wat
which run-scenarios
- name: Install libtinfo5
if: inputs.install-libtinfo5
run: |
sudo apt update
sudo apt install -y libtinfo5
- name: Run template tool test
run: |
cd framework/meta
Expand Down
2 changes: 1 addition & 1 deletion framework/meta/tests/template_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::{
};

const TEMPLATE_TEMP_DIR_NAME: &str = "template-test";
const BUILD_CONTRACTS: bool = false;
const BUILD_CONTRACTS: bool = true;

#[test]
fn test_template_list() {
Expand Down

0 comments on commit ed18c51

Please sign in to comment.