-
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
1 parent
87d4d2e
commit 70c7b2c
Showing
53 changed files
with
34,599 additions
and
3,085 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
52 changes: 52 additions & 0 deletions
52
contracts/external/snip721-reference-impl/.circleci/config.yml
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
version: 2.1 | ||
|
||
jobs: | ||
build: | ||
docker: | ||
- image: rust:1.65 | ||
steps: | ||
- checkout | ||
- run: | ||
name: Version information | ||
command: rustc --version; cargo --version; rustup --version | ||
- restore_cache: | ||
keys: | ||
- v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }} | ||
- run: | ||
name: Add wasm32 target | ||
command: rustup target add wasm32-unknown-unknown | ||
- run: | ||
name: Build | ||
command: cargo wasm --locked | ||
- run: | ||
name: Unit tests | ||
env: RUST_BACKTRACE=1 | ||
command: cargo unit-test --locked | ||
- run: | ||
name: Integration tests | ||
command: cargo integration-test --locked | ||
- run: | ||
name: Format source code | ||
command: cargo fmt | ||
- run: | ||
name: Build and run schema generator | ||
command: cargo schema --locked | ||
- run: | ||
name: Ensure checked-in source code and schemas are up-to-date | ||
command: | | ||
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" }} |
81 changes: 81 additions & 0 deletions
81
contracts/external/snip721-reference-impl/.github/workflows/Basic.yml
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 |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Based on https://github.com/actions-rs/example/blob/master/.github/workflows/quickstart.yml | ||
|
||
on: [push, pull_request] | ||
|
||
name: Basic | ||
|
||
jobs: | ||
|
||
test: | ||
name: Test Suite | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: 1.65.0 | ||
target: wasm32-unknown-unknown | ||
override: true | ||
|
||
- name: Run unit tests | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: unit-test | ||
args: --locked | ||
env: | ||
RUST_BACKTRACE: 1 | ||
|
||
- name: Compile WASM contract | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: wasm | ||
args: --locked | ||
env: | ||
RUSTFLAGS: "-C link-arg=-s" | ||
|
||
- name: Run integration tests | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: integration-test | ||
args: --locked | ||
|
||
|
||
lints: | ||
name: Lints | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: 1.65.0 | ||
override: true | ||
components: rustfmt, clippy | ||
|
||
- name: Run cargo fmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
- name: Run cargo clippy | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: -- -D warnings | ||
|
||
# TODO: we should check | ||
# CHANGES_IN_REPO=$(git status --porcelain) | ||
# after this, but I don't know how | ||
- name: Generate Schema | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: schema | ||
args: --locked |
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
Oops, something went wrong.