forked from StreamSwapProtocol/streamswap-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
340 additions
and
401 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
[alias] | ||
wasm = "build --release --target wasm32-unknown-unknown" | ||
wasm = "build --release --lib --target wasm32-unknown-unknown" | ||
wasm-debug = "build --lib --target wasm32-unknown-unknown" | ||
unit-test = "test --lib" | ||
schema = "run --example schema" | ||
integration-test = "test --test integration" | ||
schema = "run --bin schema" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,49 @@ | ||
version: 2.1 | ||
|
||
executors: | ||
builder: | ||
docker: | ||
- image: buildpack-deps:trusty | ||
|
||
jobs: | ||
docker-image: | ||
executor: builder | ||
build: | ||
docker: | ||
- image: rust:1.64.0 | ||
steps: | ||
- checkout | ||
- setup_remote_docker | ||
docker_layer_caching: true | ||
- run: | ||
name: Build Docker artifact | ||
command: docker build --pull -t "cosmwasm/cw-gitpod-base:${CIRCLE_SHA1}" . | ||
name: Version information | ||
command: rustc --version; cargo --version; rustup --version | ||
- restore_cache: | ||
keys: | ||
- v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }} | ||
- run: | ||
name: Push application Docker image to docker hub | ||
command: | | ||
if [ "${CIRCLE_BRANCH}" = "master" ]; then | ||
docker tag "cosmwasm/cw-gitpod-base:${CIRCLE_SHA1}" cosmwasm/cw-gitpod-base:latest | ||
docker login --password-stdin -u "$DOCKER_USER" \<<<"$DOCKER_PASS" | ||
docker push cosmwasm/cw-gitpod-base:latest | ||
docker logout | ||
fi | ||
docker-tagged: | ||
executor: builder | ||
steps: | ||
- checkout | ||
- setup_remote_docker | ||
docker_layer_caching: true | ||
name: Add wasm32 target | ||
command: rustup target add wasm32-unknown-unknown | ||
- run: | ||
name: Unit tests | ||
env: RUST_BACKTRACE=1 | ||
command: cargo unit-test --locked | ||
- run: | ||
name: Build | ||
command: cargo wasm --locked | ||
- run: | ||
name: Format source code | ||
command: cargo fmt | ||
- run: | ||
name: Push application Docker image to docker hub | ||
name: Build and run schema generator | ||
command: cargo schema --locked | ||
- run: | ||
name: Ensure checked-in source code and schemas are up-to-date | ||
command: | | ||
docker tag "cosmwasm/cw-gitpod-base:${CIRCLE_SHA1}" "cosmwasm/cw-gitpod-base:${CIRCLE_TAG}" | ||
docker login --password-stdin -u "$DOCKER_USER" \<<<"$DOCKER_PASS" | ||
docker push | ||
docker logout | ||
workflows: | ||
version: 2 | ||
test-suite: | ||
jobs: | ||
# this is now a slow process... let's only run on master | ||
- docker-image: | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
- docker-tagged: | ||
filters: | ||
tags: | ||
only: | ||
- /^v.*/ | ||
branches: | ||
ignore: | ||
- /.*/ | ||
requires: | ||
- docker-image | ||
CHANGES_IN_REPO=$(git status --porcelain) | ||
if [[ -n "$CHANGES_IN_REPO" ]]; then | ||
echo "Repository is dirty. Showing 'git status' and 'git --no-pager diff' for debugging now:" | ||
git status && git --no-pager diff | ||
exit 1 | ||
fi | ||
- save_cache: | ||
paths: | ||
- /usr/local/cargo/registry | ||
- target/debug/.fingerprint | ||
- target/debug/build | ||
- target/debug/deps | ||
- target/wasm32-unknown-unknown/release/.fingerprint | ||
- target/wasm32-unknown-unknown/release/build | ||
- target/wasm32-unknown-unknown/release/deps | ||
key: v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }} |
Oops, something went wrong.