cosmjs/.circleci/config.yml

613 lines
25 KiB
YAML
Raw Normal View History

2021-10-06 14:57:54 +02:00
version: 2.1
orbs:
browser-tools: circleci/browser-tools@1.2.2
2020-01-25 19:51:23 +01:00
workflows:
version: 2
workflow:
2020-07-28 13:10:26 +02:00
# Keep those job names in sync with .mergify.yml
2020-01-25 19:51:23 +01:00
jobs:
- build
- docs-build:
requires:
- build
2020-07-02 10:13:53 +02:00
- docs-deploy:
requires:
- docs-build
- build
- lint
2020-07-02 13:22:34 +02:00
filters:
branches:
2021-01-19 23:37:10 +01:00
only: main
- lint:
requires:
- build
2022-01-27 22:57:51 +01:00
- test-backends:
requires:
- build
2021-10-22 11:47:37 +02:00
matrix:
parameters:
simapp: ["simapp42", "simapp44"]
2022-01-27 22:57:51 +01:00
- test-node:
2021-01-19 17:13:10 +00:00
requires:
- build
2022-01-27 22:57:51 +01:00
matrix:
parameters:
node-version: ["12", "14", "16"]
2020-06-05 11:13:02 +02:00
- test-chrome:
requires:
- build
- coverage:
requires:
- build
2020-01-25 19:51:23 +01:00
jobs:
build:
docker:
2022-01-27 23:17:45 +01:00
- image: circleci/node:16.13-bullseye
2020-01-25 19:51:23 +01:00
steps:
2020-06-28 23:25:04 +02:00
- run:
name: Install Git Large File Storage (LFS)
command: sudo apt-get install git-lfs
2020-01-25 19:51:23 +01:00
- checkout
- run:
name: Version information
command: echo "node $(node --version)"; echo "yarn $(yarn --version)"
2020-10-06 14:32:49 +02:00
- run:
name: Install libusb
command: sudo apt-get install libusb-1.0-0-dev
2020-01-25 19:51:23 +01:00
- run:
2020-01-29 17:10:21 +01:00
name: Install Dependencies
2021-05-25 14:12:59 +02:00
command: yarn install --immutable --immutable-cache --check-cache
2020-01-25 19:51:23 +01:00
- run:
command: yarn build
- persist_to_workspace:
root: .
paths:
- packages/*/build/*
2022-01-27 22:57:51 +01:00
test-backends:
2021-10-22 11:47:37 +02:00
parameters:
simapp:
type: string
2020-02-03 12:45:49 +01:00
machine:
# We can't use a containerized environment since it requires remote docker to start custom containers.
# However, we can't access the remote docker's network from the primary container. This is a
# feature, as documented in https://circleci.com/docs/2.0/building-docker-images/#separation-of-environments
# As a consequence, we cannot use the circleci CLI for this job because "You cannot use the machine
# executor in local jobs." (https://circleci.com/docs/2.0/local-cli/#limitations-of-running-jobs-locally)
2020-05-20 15:43:55 +02:00
#
# Available images: https://circleci.com/docs/2.0/configuration-reference/#available-machine-images
2021-10-06 14:09:30 +02:00
image: ubuntu-2004:202107-02
2020-02-03 08:55:59 +01:00
steps:
2020-06-28 23:25:04 +02:00
- run:
name: Install Git Large File Storage (LFS)
2020-11-19 09:41:02 +01:00
# In the current image, `sudo apt install git-lfs` requires `sudo apt update` which is too slow
2020-06-28 23:25:04 +02:00
command: |
2020-11-19 09:41:02 +01:00
wget -O "$HOME/git-lfs.deb" https://packagecloud.io/github/git-lfs/packages/ubuntu/focal/git-lfs_2.12.1_amd64.deb/download.deb
2020-06-28 23:25:04 +02:00
sudo dpkg -i "$HOME/git-lfs.deb"
2020-02-03 08:55:59 +01:00
- checkout
- run: # start early for less wait time below
name: Start launchpad
command: ./scripts/launchpad/start.sh
background: true
2020-11-19 15:01:12 +01:00
- run: # start early for less wait time below
name: Start wasmd
command: ./scripts/wasmd/start.sh
background: true
2020-07-02 13:06:53 +02:00
- run:
name: Start simapp
2021-10-22 11:47:37 +02:00
command: ./scripts/<< parameters.simapp >>/start.sh
2020-07-02 13:06:53 +02:00
background: true
2021-04-08 13:02:45 +02:00
- run:
name: Start slow simapp
2021-10-22 11:47:37 +02:00
command: ./scripts/<< parameters.simapp >>/slow_start.sh
2021-04-08 13:02:45 +02:00
background: true
- run:
name: Start Tendermint blockchains
command: ./scripts/tendermint/all_start.sh
background: true
- attach_workspace:
at: /tmp/builds
- run:
name: Merge build folders into project (merge with hardlinks)
command: cp --recursive --link /tmp/builds/* .
2020-02-03 12:48:32 +01:00
- run:
2021-10-06 14:10:27 +02:00
# The images comes with preinstalled nvm, which does not work well with non-login shells
2020-02-03 12:48:32 +01:00
name: Uninstall nvm
# Moving to trash is faster than deleting (gvfs-trash is not installed on this image)
2021-10-06 14:10:27 +02:00
command: |
nvm --version && nvm ls
mkdir -p ~/.local/share/Trash && mv "$NVM_DIR" ~/.npm ~/.local/share/Trash
2020-02-03 12:48:32 +01:00
- run:
name: Install nodejs
2020-11-19 18:20:37 +01:00
# In the current image, `sudo apt install nodejs` requires `sudo apt update` which is too slow
2020-02-03 12:48:32 +01:00
command: |
2021-06-09 15:44:05 +02:00
wget -O "$HOME/nodejs.deb" https://deb.nodesource.com/node_12.x/pool/main/n/nodejs/nodejs_12.22.1-deb-1nodesource1_amd64.deb
sudo dpkg -i "$HOME/nodejs.deb"
- run:
name: Install yarn
command: |
2021-10-06 14:12:53 +02:00
wget -O "$HOME/yarn.deb" https://dl.yarnpkg.com/debian/pool/main/y/yarn/yarn_1.22.15_all.deb
sudo dpkg -i "$HOME/yarn.deb"
2020-02-03 08:55:59 +01:00
- run:
name: Version information
command: echo "node $(node --version)"; echo "yarn $(yarn --version)"
2020-10-06 14:32:49 +02:00
- run:
name: Install libusb
2020-11-19 22:32:11 +01:00
# In the current image, `sudo apt install libusb-1.0-0-dev` requires `sudo apt update` which is too slow
2020-10-06 14:32:49 +02:00
command: |
2020-11-19 09:33:55 +01:00
wget -O "$HOME/libusb.deb" http://de.archive.ubuntu.com/ubuntu/pool/main/libu/libusb-1.0/libusb-1.0-0-dev_1.0.23-2build1_amd64.deb
2020-10-06 14:32:49 +02:00
sudo dpkg -i "$HOME/libusb.deb"
2020-01-26 15:54:47 +01:00
- run:
2020-02-03 08:55:59 +01:00
name: Install Dependencies
2021-05-25 14:12:59 +02:00
command: yarn install --immutable --immutable-cache --check-cache
- run:
name: Initialize launchpad (deploy contracts and friends)
command: ./scripts/launchpad/init.sh
2020-11-19 15:01:12 +01:00
- run:
name: Initialize wasmd (deploy contracts and friends)
command: ./scripts/wasmd/init.sh
- run:
name: Start socket server
command: ./scripts/socketserver/start.sh
2020-02-03 08:55:59 +01:00
- run:
2021-10-22 11:47:37 +02:00
name: Run tests
2020-02-03 09:29:15 +01:00
environment:
LAUNCHPAD_ENABLED: 1
TENDERMINT_ENABLED: 1
SOCKETSERVER_ENABLED: 1
SKIP_BUILD: 1
2020-11-19 15:01:12 +01:00
WASMD_ENABLED: 1
2021-10-22 11:47:37 +02:00
command: |
[ "<< parameters.simapp >>" = "simapp42" ] && export SIMAPP42_ENABLED=1 SLOW_SIMAPP42_ENABLED=1
[ "<< parameters.simapp >>" = "simapp44" ] && export SIMAPP44_ENABLED=1 SLOW_SIMAPP44_ENABLED=1
yarn test --stream
2020-02-06 15:44:36 +01:00
- run:
name: Run CLI selftest
working_directory: packages/cli
environment:
SKIP_BUILD: 1
command: yarn selftest
2020-08-03 07:49:26 +02:00
- run:
name: Run CLI examples
working_directory: packages/cli
environment:
SKIP_BUILD: 1
command: |
2021-07-22 14:01:00 +02:00
yarn node ./bin/cosmwasm-cli --init examples/cosmwasm.ts --code "process.exit(0)"
yarn node ./bin/cosmwasm-cli --init examples/delegate.ts --code "process.exit(0)"
yarn node ./bin/cosmwasm-cli --init examples/faucet_addresses.ts --code "process.exit(0)"
yarn node ./bin/cosmwasm-cli --init examples/generate_address.ts --code "process.exit(0)"
yarn node ./bin/cosmwasm-cli --init examples/local_faucet.ts --code "process.exit(0)"
yarn node ./bin/cosmwasm-cli --init examples/mask.ts --code "process.exit(0)"
2021-01-19 17:13:10 +00:00
- run:
name: Stop chains
command: |
./scripts/socketserver/stop.sh
./scripts/tendermint/all_stop.sh
2021-10-22 11:47:37 +02:00
./scripts/<< parameters.simapp >>/stop.sh
./scripts/<< parameters.simapp >>/slow_stop.sh
2021-01-19 17:13:10 +00:00
./scripts/wasmd/stop.sh
./scripts/launchpad/stop.sh
2022-01-27 22:57:51 +01:00
test-node:
parameters:
node-version:
type: string
2021-01-19 17:13:10 +00:00
machine:
# We can't use a containerized environment since it requires remote docker to start custom containers.
# However, we can't access the remote docker's network from the primary container. This is a
# feature, as documented in https://circleci.com/docs/2.0/building-docker-images/#separation-of-environments
# As a consequence, we cannot use the circleci CLI for this job because "You cannot use the machine
# executor in local jobs." (https://circleci.com/docs/2.0/local-cli/#limitations-of-running-jobs-locally)
#
# Available images: https://circleci.com/docs/2.0/configuration-reference/#available-machine-images
2021-10-06 14:09:30 +02:00
image: ubuntu-2004:202107-02
2021-01-19 17:13:10 +00:00
steps:
- run:
name: Install Git Large File Storage (LFS)
# In the current image, `sudo apt install git-lfs` requires `sudo apt update` which is too slow
command: |
wget -O "$HOME/git-lfs.deb" https://packagecloud.io/github/git-lfs/packages/ubuntu/focal/git-lfs_2.12.1_amd64.deb/download.deb
sudo dpkg -i "$HOME/git-lfs.deb"
- checkout
- run: # start early for less wait time below
name: Start launchpad
command: ./scripts/launchpad/start.sh
background: true
- run: # start early for less wait time below
name: Start wasmd
command: ./scripts/wasmd/start.sh
background: true
- run:
name: Start simapp
2021-10-21 23:17:16 +02:00
command: ./scripts/simapp42/start.sh
2021-01-19 17:13:10 +00:00
background: true
2021-04-08 13:02:45 +02:00
- run:
name: Start slow simapp
2021-10-21 23:17:16 +02:00
command: ./scripts/simapp42/slow_start.sh
2021-04-08 13:02:45 +02:00
background: true
2021-01-19 17:13:10 +00:00
- run:
name: Start Tendermint blockchains
command: ./scripts/tendermint/all_start.sh
background: true
- attach_workspace:
at: /tmp/builds
- run:
name: Merge build folders into project (merge with hardlinks)
command: cp --recursive --link /tmp/builds/* .
- run:
2021-10-06 14:10:27 +02:00
# The images comes with preinstalled nvm, which does not work well with non-login shells
2021-01-19 17:13:10 +00:00
name: Uninstall nvm
# Moving to trash is faster than deleting (gvfs-trash is not installed on this image)
2021-10-06 14:10:27 +02:00
command: |
nvm --version && nvm ls
mkdir -p ~/.local/share/Trash && mv "$NVM_DIR" ~/.npm ~/.local/share/Trash
2021-01-19 17:13:10 +00:00
- run:
name: Install nodejs
# In the current image, `sudo apt install nodejs` requires `sudo apt update` which is too slow
command: |
2022-01-27 22:57:51 +01:00
declare -A node_links=(
["12"]="https://deb.nodesource.com/node_12.x/pool/main/n/nodejs/nodejs_12.22.1-deb-1nodesource1_amd64.deb"
["14"]="https://deb.nodesource.com/node_14.x/pool/main/n/nodejs/nodejs_14.18.0-deb-1nodesource1_amd64.deb"
["16"]="https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_16.13.2-deb-1nodesource1_amd64.deb"
)
wget -O "$HOME/nodejs.deb" "${node_links[<< parameters.node-version >>]}"
2021-01-19 17:13:10 +00:00
sudo dpkg -i "$HOME/nodejs.deb"
- run:
name: Install yarn
command: |
2021-10-06 14:12:53 +02:00
wget -O "$HOME/yarn.deb" https://dl.yarnpkg.com/debian/pool/main/y/yarn/yarn_1.22.15_all.deb
2021-01-19 17:13:10 +00:00
sudo dpkg -i "$HOME/yarn.deb"
- run:
name: Version information
command: echo "node $(node --version)"; echo "yarn $(yarn --version)"
- run:
name: Install libusb
# In the current image, `sudo apt install libusb-1.0-0-dev` requires `sudo apt update` which is too slow
command: |
wget -O "$HOME/libusb.deb" http://de.archive.ubuntu.com/ubuntu/pool/main/libu/libusb-1.0/libusb-1.0-0-dev_1.0.23-2build1_amd64.deb
sudo dpkg -i "$HOME/libusb.deb"
- run:
name: Install Dependencies
2021-05-25 14:12:59 +02:00
command: yarn install --immutable --immutable-cache --check-cache
2021-01-19 17:13:10 +00:00
- run:
name: Initialize launchpad (deploy contracts and friends)
command: ./scripts/launchpad/init.sh
- run:
name: Initialize wasmd (deploy contracts and friends)
command: ./scripts/wasmd/init.sh
- run:
name: Start socket server
command: ./scripts/socketserver/start.sh
- run:
environment:
LAUNCHPAD_ENABLED: 1
SIMAPP42_ENABLED: 1
SLOW_SIMAPP42_ENABLED: 1
2021-01-19 17:13:10 +00:00
TENDERMINT_ENABLED: 1
SOCKETSERVER_ENABLED: 1
SKIP_BUILD: 1
WASMD_ENABLED: 1
SES_ENABLED: 1
command: yarn test --stream
- run:
name: Run CLI selftest
working_directory: packages/cli
environment:
SKIP_BUILD: 1
command: yarn selftest
- run:
name: Run CLI examples
working_directory: packages/cli
environment:
LAUNCHPAD_ENABLED: 1
SIMAPP42_ENABLED: 1
SLOW_SIMAPP42_ENABLED: 1
TENDERMINT_ENABLED: 1
SOCKETSERVER_ENABLED: 1
2021-01-19 17:13:10 +00:00
SKIP_BUILD: 1
WASMD_ENABLED: 1
2021-02-10 15:36:38 +01:00
command: ./run_examples.sh
2020-02-03 08:55:59 +01:00
- run:
2020-11-19 15:01:12 +01:00
name: Stop chains
command: |
./scripts/socketserver/stop.sh
./scripts/tendermint/all_stop.sh
2021-10-21 23:17:16 +02:00
./scripts/simapp42/stop.sh
./scripts/simapp42/slow_stop.sh
2020-11-19 15:01:12 +01:00
./scripts/wasmd/stop.sh
./scripts/launchpad/stop.sh
2020-06-05 11:13:02 +02:00
test-chrome:
machine:
# We can't use a containerized environment since it requires remote docker to start custom containers.
# However, we can't access the remote docker's network from the primary container. This is a
# feature, as documented in https://circleci.com/docs/2.0/building-docker-images/#separation-of-environments
# As a consequence, we cannot use the circleci CLI for this job because "You cannot use the machine
# executor in local jobs." (https://circleci.com/docs/2.0/local-cli/#limitations-of-running-jobs-locally)
#
# Available images: https://circleci.com/docs/2.0/configuration-reference/#available-machine-images
2021-10-06 14:09:30 +02:00
image: ubuntu-2004:202107-02
2020-06-05 11:13:02 +02:00
steps:
2021-10-06 14:57:54 +02:00
- browser-tools/install-chrome # Slow because apt update but what can you do 🤷‍
2020-06-28 23:25:04 +02:00
- run:
name: Install Git Large File Storage (LFS)
2020-11-19 09:41:02 +01:00
# In the current image, `sudo apt install git-lfs` requires `sudo apt update` which is too slow
2020-06-28 23:25:04 +02:00
command: |
2020-11-19 09:41:02 +01:00
wget -O "$HOME/git-lfs.deb" https://packagecloud.io/github/git-lfs/packages/ubuntu/focal/git-lfs_2.12.1_amd64.deb/download.deb
2020-06-28 23:25:04 +02:00
sudo dpkg -i "$HOME/git-lfs.deb"
2020-06-05 11:13:02 +02:00
- checkout
- run: # start early for less wait time below
name: Start launchpad
command: ./scripts/launchpad/start.sh
2020-06-05 11:13:02 +02:00
background: true
2020-11-19 15:01:12 +01:00
- run: # start early for less wait time below
name: Start wasmd
command: ./scripts/wasmd/start.sh
background: true
2020-07-02 13:06:53 +02:00
- run:
name: Start simapp
2021-10-21 23:17:16 +02:00
command: ./scripts/simapp42/start.sh
2020-07-02 13:06:53 +02:00
background: true
2021-04-08 13:02:45 +02:00
- run:
name: Start slow simapp
2021-10-21 23:17:16 +02:00
command: ./scripts/simapp42/slow_start.sh
2021-04-08 13:02:45 +02:00
background: true
- run:
name: Start Tendermint blockchains
command: ./scripts/tendermint/all_start.sh
background: true
2020-06-05 11:13:02 +02:00
- attach_workspace:
at: /tmp/builds
- run:
name: Merge build folders into project (merge with hardlinks)
command: cp --recursive --link /tmp/builds/* .
- run:
2021-10-06 14:10:27 +02:00
# The images comes with preinstalled nvm, which does not work well with non-login shells
2020-06-05 11:13:02 +02:00
name: Uninstall nvm
# Moving to trash is faster than deleting (gvfs-trash is not installed on this image)
2021-10-06 14:10:27 +02:00
command: |
nvm --version && nvm ls
mkdir -p ~/.local/share/Trash && mv "$NVM_DIR" ~/.npm ~/.local/share/Trash
2020-06-05 11:13:02 +02:00
- run:
name: Install nodejs
2020-11-19 18:20:37 +01:00
# In the current image, `sudo apt install nodejs` requires `sudo apt update` which is too slow
command: |
2021-06-09 15:44:05 +02:00
wget -O "$HOME/nodejs.deb" https://deb.nodesource.com/node_12.x/pool/main/n/nodejs/nodejs_12.22.1-deb-1nodesource1_amd64.deb
sudo dpkg -i "$HOME/nodejs.deb"
- run:
name: Install yarn
2020-06-05 11:13:02 +02:00
command: |
2021-10-06 14:12:53 +02:00
wget -O "$HOME/yarn.deb" https://dl.yarnpkg.com/debian/pool/main/y/yarn/yarn_1.22.15_all.deb
sudo dpkg -i "$HOME/yarn.deb"
2020-06-05 11:13:02 +02:00
- run:
name: Version information
command: echo "node $(node --version)"; echo "yarn $(yarn --version)"
2020-10-06 14:32:49 +02:00
- run:
name: Install libusb
2020-11-19 22:32:11 +01:00
# In the current image, `sudo apt install libusb-1.0-0-dev` requires `sudo apt update` which is too slow
2020-10-06 14:32:49 +02:00
command: |
2020-11-19 09:33:55 +01:00
wget -O "$HOME/libusb.deb" http://de.archive.ubuntu.com/ubuntu/pool/main/libu/libusb-1.0/libusb-1.0-0-dev_1.0.23-2build1_amd64.deb
2020-10-06 14:32:49 +02:00
sudo dpkg -i "$HOME/libusb.deb"
2020-06-05 11:13:02 +02:00
- run:
name: Install Dependencies
2021-05-25 14:12:59 +02:00
command: yarn install --immutable --immutable-cache --check-cache
2020-06-05 11:13:02 +02:00
- run:
name: Initialize launchpad (deploy contracts and friends)
command: ./scripts/launchpad/init.sh
2020-11-19 15:01:12 +01:00
- run:
name: Initialize wasmd (deploy contracts and friends)
command: ./scripts/wasmd/init.sh
- run:
name: Start socket server
command: ./scripts/socketserver/start.sh
2020-06-05 11:13:02 +02:00
- run:
environment:
LAUNCHPAD_ENABLED: 1
SIMAPP42_ENABLED: 1
SLOW_SIMAPP42_ENABLED: 1
TENDERMINT_ENABLED: 1
SOCKETSERVER_ENABLED: 1
2020-06-05 11:13:02 +02:00
SKIP_BUILD: 1
2020-11-19 15:01:12 +01:00
WASMD_ENABLED: 1
2020-06-05 11:13:02 +02:00
command: yarn test-chrome
- run:
2020-11-19 15:01:12 +01:00
name: Stop chains
command: |
./scripts/socketserver/stop.sh
./scripts/tendermint/all_stop.sh
2021-10-21 23:17:16 +02:00
./scripts/simapp42/stop.sh
./scripts/simapp42/slow_stop.sh
2020-11-19 15:01:12 +01:00
./scripts/wasmd/stop.sh
./scripts/launchpad/stop.sh
coverage:
machine:
# We can't use a containerized environment since it requires remote docker to start custom containers.
# However, we can't access the remote docker's network from the primary container. This is a
# feature, as documented in https://circleci.com/docs/2.0/building-docker-images/#separation-of-environments
# As a consequence, we cannot use the circleci CLI for this job because "You cannot use the machine
# executor in local jobs." (https://circleci.com/docs/2.0/local-cli/#limitations-of-running-jobs-locally)
#
# Available images: https://circleci.com/docs/2.0/configuration-reference/#available-machine-images
2021-10-06 14:09:30 +02:00
image: ubuntu-2004:202107-02
steps:
2020-06-28 23:25:04 +02:00
- run:
name: Install Git Large File Storage (LFS)
2020-11-19 09:41:02 +01:00
# In the current image, `sudo apt install git-lfs` requires `sudo apt update` which is too slow
2020-06-28 23:25:04 +02:00
command: |
2020-11-19 09:41:02 +01:00
wget -O "$HOME/git-lfs.deb" https://packagecloud.io/github/git-lfs/packages/ubuntu/focal/git-lfs_2.12.1_amd64.deb/download.deb
2020-06-28 23:25:04 +02:00
sudo dpkg -i "$HOME/git-lfs.deb"
- checkout
- run: # start early for less wait time below
name: Start launchpad
command: ./scripts/launchpad/start.sh
background: true
2020-11-19 15:01:12 +01:00
- run: # start early for less wait time below
name: Start wasmd
command: ./scripts/wasmd/start.sh
background: true
2020-07-02 13:06:53 +02:00
- run:
name: Start simapp
2021-10-21 23:17:16 +02:00
command: ./scripts/simapp42/start.sh
2020-07-02 13:06:53 +02:00
background: true
2021-04-08 13:02:45 +02:00
- run:
name: Start slow simapp
2021-10-21 23:17:16 +02:00
command: ./scripts/simapp42/slow_start.sh
2021-04-08 13:02:45 +02:00
background: true
- run:
name: Start Tendermint blockchains
command: ./scripts/tendermint/all_start.sh
background: true
- attach_workspace:
at: /tmp/builds
- run:
name: Merge build folders into project (merge with hardlinks)
command: cp --recursive --link /tmp/builds/* .
- run:
2021-10-06 14:10:27 +02:00
# The images comes with preinstalled nvm, which does not work well with non-login shells
name: Uninstall nvm
# Moving to trash is faster than deleting (gvfs-trash is not installed on this image)
2021-10-06 14:10:27 +02:00
command: |
nvm --version && nvm ls
mkdir -p ~/.local/share/Trash && mv "$NVM_DIR" ~/.npm ~/.local/share/Trash
- run:
name: Install nodejs
2020-11-19 18:20:37 +01:00
# In the current image, `sudo apt install nodejs` requires `sudo apt update` which is too slow
command: |
2021-06-09 15:44:05 +02:00
wget -O "$HOME/nodejs.deb" https://deb.nodesource.com/node_12.x/pool/main/n/nodejs/nodejs_12.22.1-deb-1nodesource1_amd64.deb
sudo dpkg -i "$HOME/nodejs.deb"
- run:
name: Install yarn
command: |
2021-10-06 14:12:53 +02:00
wget -O "$HOME/yarn.deb" https://dl.yarnpkg.com/debian/pool/main/y/yarn/yarn_1.22.15_all.deb
sudo dpkg -i "$HOME/yarn.deb"
- run:
name: Version information
command: echo "node $(node --version)"; echo "yarn $(yarn --version)"
2020-10-06 14:32:49 +02:00
- run:
name: Install libusb
2020-11-19 22:32:11 +01:00
# In the current image, `sudo apt install libusb-1.0-0-dev` requires `sudo apt update` which is too slow
2020-10-06 14:32:49 +02:00
command: |
2020-11-19 09:33:55 +01:00
wget -O "$HOME/libusb.deb" http://de.archive.ubuntu.com/ubuntu/pool/main/libu/libusb-1.0/libusb-1.0-0-dev_1.0.23-2build1_amd64.deb
2020-10-06 14:32:49 +02:00
sudo dpkg -i "$HOME/libusb.deb"
- run:
name: Install Dependencies
2021-05-25 14:12:59 +02:00
command: yarn install --immutable --immutable-cache --check-cache
- run:
name: Initialize launchpad (deploy contracts and friends)
command: ./scripts/launchpad/init.sh
2020-11-19 15:01:12 +01:00
- run:
name: Initialize wasmd (deploy contracts and friends)
command: ./scripts/wasmd/init.sh
- run:
name: Start socket server
command: ./scripts/socketserver/start.sh
- run:
environment:
LAUNCHPAD_ENABLED: 1
SIMAPP42_ENABLED: 1
SLOW_SIMAPP42_ENABLED: 1
TENDERMINT_ENABLED: 1
SOCKETSERVER_ENABLED: 1
SKIP_BUILD: 1
2020-11-19 15:01:12 +01:00
WASMD_ENABLED: 1
command: yarn coverage
2020-06-25 12:56:54 +02:00
- run:
name: Upload coverage report
command: npx codecov
- run:
2020-11-19 15:01:12 +01:00
name: Stop chains
command: |
./scripts/socketserver/stop.sh
./scripts/tendermint/all_stop.sh
2021-10-21 23:17:16 +02:00
./scripts/simapp42/stop.sh
./scripts/simapp42/slow_stop.sh
2020-11-19 15:01:12 +01:00
./scripts/wasmd/stop.sh
./scripts/launchpad/stop.sh
2020-07-02 10:13:53 +02:00
docs-build:
2020-07-02 08:23:27 +02:00
docker:
2022-01-27 23:17:45 +01:00
- image: circleci/node:16.13-bullseye
2020-07-02 08:23:27 +02:00
steps:
- run:
name: Install Git Large File Storage (LFS)
command: sudo apt-get install git-lfs
2020-07-02 08:23:27 +02:00
- checkout
- attach_workspace:
at: /tmp/builds
- run:
name: Merge build folders into project (merge with hardlinks)
command: cp --recursive --link /tmp/builds/* .
2020-07-02 08:23:27 +02:00
- run:
name: Version information
command: echo "node $(node --version)"; echo "yarn $(yarn --version)"
2020-10-06 14:32:49 +02:00
- run:
name: Install libusb
command: sudo apt-get install libusb-1.0-0-dev
2020-07-02 08:23:27 +02:00
- run:
name: Install Dependencies
2021-05-25 14:12:59 +02:00
command: yarn install --immutable --immutable-cache --check-cache
2020-07-02 08:23:27 +02:00
- run:
2020-07-02 10:04:05 +02:00
name: Build package docs
2020-07-02 08:23:27 +02:00
command: yarn docs
2020-07-02 10:04:05 +02:00
- run:
name: Copy docs into deployment folder
command: ./scripts/docs/copy_docs.sh
2020-07-02 10:13:53 +02:00
- persist_to_workspace:
root: .
paths: docs_deployment
docs-deploy:
docker:
2022-01-27 23:17:45 +01:00
- image: circleci/node:16.13-bullseye
2020-07-02 10:13:53 +02:00
steps:
- attach_workspace:
at: .
2020-07-02 13:12:10 +02:00
- add_ssh_keys:
fingerprints:
- "a7:b3:94:4a:9e:e1:30:fa:ca:22:d1:db:a1:78:d6:e4"
2020-07-02 12:53:59 +02:00
- run:
name: Add GitHub to known hosts
command: |
mkdir -p ~/.ssh
echo 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==' >> ~/.ssh/known_hosts
2020-07-02 10:13:53 +02:00
- run:
name: Deploy to GitHub pages
2020-07-02 11:30:04 +02:00
# Version pinned to 3.0.0 because of https://github.com/tschaub/gh-pages/issues/354
2021-01-19 23:29:59 +01:00
command: npx gh-pages@3.0.0 --message "Update docs [skip ci]" --dist docs_deployment --user "CI deployment <ci@cosmwasm.com>" --repo "git@github.com:cosmos/cosmjs.git"
2020-01-26 16:04:14 +01:00
lint:
docker:
2022-01-27 23:17:45 +01:00
- image: circleci/node:16.13-bullseye
2020-01-26 16:04:14 +01:00
steps:
2021-05-05 16:34:16 +02:00
- run:
name: Install Git Large File Storage (LFS)
command: sudo apt-get install git-lfs
2020-01-26 16:04:14 +01:00
- checkout
- attach_workspace:
at: /tmp/builds
- run:
name: Merge build folders into project (merge with hardlinks)
command: cp --recursive --link /tmp/builds/* .
2020-12-08 10:56:48 +01:00
- run:
name: Install shfmt
command: |
sudo wget https://github.com/mvdan/sh/releases/download/v3.2.1/shfmt_v3.2.1_linux_amd64 -O /usr/local/bin/shfmt
sudo chmod +x /usr/local/bin/shfmt
shfmt --version
2020-01-26 16:04:14 +01:00
- run:
name: Version information
command: echo "node $(node --version)"; echo "yarn $(yarn --version)"
2020-10-06 14:32:49 +02:00
- run:
name: Install libusb
command: sudo apt-get install libusb-1.0-0-dev
2020-01-26 16:04:14 +01:00
- run:
2020-01-29 17:10:21 +01:00
name: Install Dependencies
2021-05-25 14:12:59 +02:00
command: yarn install --immutable --immutable-cache --check-cache
2020-01-26 16:04:14 +01:00
- run:
name: Lint
2020-01-26 16:04:14 +01:00
command: yarn lint
- run:
name: Format text
command: yarn format-text
- run:
name: Format shell scripts
command: yarn format-shell