Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use prebuilt binaries for CI #293

Merged
merged 1 commit into from
Sep 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 28 additions & 31 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,31 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: install
args:
--version 3.0.0 --locked cargo-dylint
args: --version 3.0.0 --locked cargo-dylint

- name: Install dylint-link
uses: actions-rs/cargo@v1
with:
command: install
args:
--version 3.0.0 --locked dylint-link

args: --version 3.0.0 --locked dylint-link

- name: Install substrate-contracts-node
shell: bash
run: |
chmod +x ./node.sh
./node.sh v0.31.0
echo "$(pwd)/target/tmp" >> $GITHUB_PATH

- name: Build
uses: actions-rs/cargo@v1
with:
command: install
args:
--version 0.31.0 --locked contracts-node
command: build

- name: Run unit tests
uses: actions-rs/cargo@v1
with:
command: test
args: --features e2e-tests
args: --features e2e-tests -- --skip add

build:
name: Release build the contract + lint
Expand Down Expand Up @@ -88,28 +91,25 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: install
args:
--version 3.0.0 --locked cargo-dylint
args: --version 3.0.0 --locked cargo-dylint

- name: Install dylint-link
uses: actions-rs/cargo@v1
with:
command: install
args:
--version 3.0.0 --locked dylint-link

args: --version 3.0.0 --locked dylint-link

- name: Install substrate-contracts-node
uses: actions-rs/cargo@v1
with:
command: install
args:
--version 0.39.0 --locked contracts-node
run: |
chmod +x ./node.sh
./node.sh v0.41.0
echo "$(pwd)/target/tmp" >> $GITHUB_PATH

- name: Install cargo contract
uses: actions-rs/cargo@v1
with:
command: install
args: --version 4.0.2 --locked cargo-contract
args: --version 4.1.1 --locked cargo-contract

- name: Run cargo fmt
uses: actions-rs/cargo@v1
Expand Down Expand Up @@ -158,28 +158,25 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: install
args:
--version 3.0.0 --locked cargo-dylint
args: --version 3.0.0 --locked cargo-dylint

- name: Install dylint-link
uses: actions-rs/cargo@v1
with:
command: install
args:
--version 3.0.0 --locked dylint-link

args: --version 3.0.0 --locked dylint-link

- name: Install substrate-contracts-node
uses: actions-rs/cargo@v1
with:
command: install
args:
--version 0.39.0 --locked contracts-node
run: |
chmod +x ./node.sh
./node.sh v0.41.0
echo "$(pwd)/target/tmp" >> $GITHUB_PATH

- name: Install cargo contract
uses: actions-rs/cargo@v1
with:
command: install
args: --version 4.0.2 --locked cargo-contract
args: --version 4.1.1 --locked cargo-contract

- name: Install wasm-bindgen-cli
uses: actions-rs/cargo@v1
Expand Down
22 changes: 22 additions & 0 deletions node.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

mkdir -p ./target/tmp
cd ./target/tmp

if [ -z "$1" ]; then
echo "Please provide node version to download."
exit 1
fi

wget https://github.com/paritytech/substrate-contracts-node/releases/download/$1/substrate-contracts-node-linux.tar.gz -O zipped-node.tar.gz
NODE_DIR=$(pwd)

tar -xzf zipped-node.tar.gz
mv artifacts/substrate-contracts-node-linux/substrate-contracts-node ./

# set env if not set already
if grep -Fxq PATH=$NODE_DIR:\$PATH ~/.bashrc
then
echo export PATH="$NODE_DIR:\$PATH" >> ~/.bashrc
fi
source ~/.bashrc
Loading