pax_global_header 0000666 0000000 0000000 00000000064 14243636706 0014525 g ustar 00root root 0000000 0000000 52 comment=58a5b52d80ea315ea8ce709c708597dcdac3f5fa
cargo-contract-58a5b52d80ea315ea8ce709c708597dcdac3f5fa/ 0000775 0000000 0000000 00000000000 14243636706 0021664 5 ustar 00root root 0000000 0000000 cargo-contract-58a5b52d80ea315ea8ce709c708597dcdac3f5fa/.editorconfig 0000664 0000000 0000000 00000000431 14243636706 0024337 0 ustar 00root root 0000000 0000000 # EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org
root = true
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4
cargo-contract-58a5b52d80ea315ea8ce709c708597dcdac3f5fa/.github/ 0000775 0000000 0000000 00000000000 14243636706 0023224 5 ustar 00root root 0000000 0000000 cargo-contract-58a5b52d80ea315ea8ce709c708597dcdac3f5fa/.github/dependabot.yml 0000664 0000000 0000000 00000000154 14243636706 0026054 0 ustar 00root root 0000000 0000000 version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "daily"
cargo-contract-58a5b52d80ea315ea8ce709c708597dcdac3f5fa/.github/workflows/ 0000775 0000000 0000000 00000000000 14243636706 0025261 5 ustar 00root root 0000000 0000000 cargo-contract-58a5b52d80ea315ea8ce709c708597dcdac3f5fa/.github/workflows/dependabot-auto-merge.yml 0000664 0000000 0000000 00000000445 14243636706 0032157 0 ustar 00root root 0000000 0000000 name: auto-merge
on:
pull_request:
jobs:
auto-merge:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ahmadnassri/action-dependabot-auto-merge@v2
with:
target: patch
github-token: ${{ secrets.DEPENDABOT_AUTO_MERGE_TOKEN }} cargo-contract-58a5b52d80ea315ea8ce709c708597dcdac3f5fa/.github/workflows/macos.yml 0000664 0000000 0000000 00000003352 14243636706 0027111 0 ustar 00root root 0000000 0000000 name: continuous-intergration/macos
on:
pull_request:
push:
branches:
- master
tags:
- v*
paths-ignore:
- 'README.md'
- '.gitlab-ci.yml'
jobs:
check:
name: build-contract-template
strategy:
matrix:
platform:
- macos-latest
toolchain:
- nightly
runs-on: ${{ matrix.platform }}
env:
RUST_BACKTRACE: full
steps:
- name: Checkout sources & submodules
uses: actions/checkout@v2
with:
fetch-depth: 1
submodules: recursive
- uses: actions/setup-node@v2
- run: npm install wasm-opt -g
- name: Install toolchain
id: toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
components: rust-src
override: true
- name: Install cargo-dylint
uses: baptiste0928/cargo-install@v1
with:
crate: cargo-dylint
version: 1
- name: Install dylint-link
uses: baptiste0928/cargo-install@v1
with:
crate: dylint-link
version: 1
- name: Rust Cache
uses: Swatinem/rust-cache@v1.3.0
- name: Build contract template on ${{ matrix.platform }}-${{ matrix.toolchain }}
run: |
wasm-opt --version
cargo -vV
cargo dylint --version
cargo run -- contract --version
cargo run -- contract new foobar
echo "[workspace]" >> foobar/Cargo.toml
cargo run -- contract build --manifest-path=foobar/Cargo.toml
cargo run -- contract check --manifest-path=foobar/Cargo.toml
cargo run -- contract test --manifest-path=foobar/Cargo.toml cargo-contract-58a5b52d80ea315ea8ce709c708597dcdac3f5fa/.github/workflows/main.yml 0000664 0000000 0000000 00000001262 14243636706 0026731 0 ustar 00root root 0000000 0000000 name: Pushes release updates to a Matrix room
on:
release:
types:
- edited
- prereleased
- published
jobs:
ping_matrix:
runs-on: ubuntu-latest
steps:
- name: send message
uses: s3krit/matrix-message-action@v0.0.2
with:
room_id: ${{ secrets.MATRIX_ROOM_ID }}
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
message: "**${{github.event.repository.full_name}}:** A release has been ${{github.event.action}}
Release version [${{github.event.release.tag_name}}](${{github.event.release.html_url}})
***Description:***
${{github.event.release.body}}
"
server: "matrix.parity.io"
cargo-contract-58a5b52d80ea315ea8ce709c708597dcdac3f5fa/.github/workflows/windows.yml 0000664 0000000 0000000 00000004564 14243636706 0027507 0 ustar 00root root 0000000 0000000 name: continuous-intergration/windows
on:
pull_request:
push:
branches:
- master
tags:
- v*
paths-ignore:
- 'README.md'
- '.gitlab-ci.yml'
jobs:
check:
name: build-contract-template
strategy:
matrix:
platform:
- windows-latest
toolchain:
- nightly
runs-on: ${{ matrix.platform }}
env:
RUST_BACKTRACE: full
steps:
- uses: engineerd/configurator@v0.0.6
with:
name: "wasm-opt.exe"
url: "https://github.com/WebAssembly/binaryen/releases/download/version_103/binaryen-version_103-x86_64-windows.tar.gz"
pathInArchive: "binaryen-/bin/wasm-opt.exe"
- name: Checkout sources & submodules
uses: actions/checkout@v2
with:
fetch-depth: 1
submodules: recursive
- name: Install toolchain
id: toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
components: rust-src
override: true
- name: Install cargo-dylint
uses: baptiste0928/cargo-install@v1
with:
crate: cargo-dylint
version: 1
- name: Install dylint-link
uses: baptiste0928/cargo-install@v1
with:
crate: dylint-link
version: 1
- name: Rust Cache
uses: Swatinem/rust-cache@v1.3.0
- name: Build contract template on ${{ matrix.platform }}-${{ matrix.toolchain }}
run: |
wasm-opt --version
cargo -vV
cargo dylint --version
cargo run -- contract --version
cargo run -- contract new foobar
echo "[workspace]" >> foobar/Cargo.toml
cargo run -- contract build --manifest-path=foobar/Cargo.toml
cargo run -- contract check --manifest-path=foobar/Cargo.toml
cargo run -- contract test --manifest-path=foobar/Cargo.toml
# This stage has to be deactivated until https://github.com/Vurich/crunchy/pull/10
# is merged and released.
# - name: Run tests on {{ matrix.platform }}-${{ matrix.toolchain }}
# # The tests take a long time in the GitHub Actions runner (~30 mins),
# # hence we run them only on `master`.
# if: github.ref == 'refs/heads/master'
# run: |
# cargo test --verbose --workspace --all-features
cargo-contract-58a5b52d80ea315ea8ce709c708597dcdac3f5fa/.gitignore 0000664 0000000 0000000 00000000023 14243636706 0023647 0 ustar 00root root 0000000 0000000 /target
**/*.rs.bk
cargo-contract-58a5b52d80ea315ea8ce709c708597dcdac3f5fa/.gitlab-ci.yml 0000664 0000000 0000000 00000016104 14243636706 0024322 0 ustar 00root root 0000000 0000000 # .gitlab-ci.yml
#
# cargo-contract
#
# pipelines can be triggered manually in the web
stages:
- check
- test
- build
- notify
variables:
GIT_STRATEGY: fetch
GIT_DEPTH: "100"
RUST_LIB_BACKTRACE: "0"
# this var is changed to "-:staging" when the CI image gets rebuilt
# read more https://github.com/paritytech/cargo-contract/pull/115
CI_IMAGE: "paritytech/contracts-ci-linux:production"
RUSTY_CACHIER_SINGLE_BRANCH: master
RUSTY_CACHIER_DONT_OPERATE_ON_MAIN_BRANCH: "true"
workflow:
rules:
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH
.collect-artifacts: &collect-artifacts
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
when: on_success
expire_in: 7 days
paths:
- artifacts/
.rusty-cachier:
before_script:
- curl -s https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.parity.io/parity/infrastructure/ci_cd/rusty-cachier/client/-/raw/release/util/install.sh | bash
- rusty-cachier environment check --gracefully
- $(rusty-cachier environment inject)
- rusty-cachier project mtime
after_script:
- rusty-cachier snapshot destroy
.docker-env: &docker-env
image:
name: "${CI_IMAGE}"
entrypoint: ['bash', '-c', 'exec unshare -m -r bash']
before_script:
- cargo -vV
- rustc -vV
- rustup show
- cargo dylint --version
- bash --version
# global RUSTFLAGS overrides the linker args so this way is better to pass the flags
- printf '[build]\nrustflags = ["-C", "link-dead-code"]\n' > ${CARGO_HOME}/config
- sccache -s
- git show
- !reference [.rusty-cachier, before_script]
after_script:
- !reference [.rusty-cachier, after_script]
rules:
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_REF_NAME == "master"
- if: $CI_COMMIT_REF_NAME == "tags"
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
dependencies: []
interruptible: true
retry:
max: 2
when:
- runner_system_failure
- unknown_failure
- api_failure
tags:
- linux-docker
#### stage: check
# be aware that the used image has cargo-contract installed
fmt:
stage: check
<<: *docker-env
script:
- cargo fmt --verbose --all -- --check
clippy:
stage: check
<<: *docker-env
script:
- rusty-cachier snapshot create
- cargo clippy --verbose --all-targets --all-features -- -D warnings;
- rusty-cachier cache upload
#### stage: test (all features)
test-dylint:
stage: test
<<: *docker-env
script:
- rusty-cachier snapshot create
- cd ink_linting/
- mv _Cargo.toml Cargo.toml
# Installing these components here is necessary because
# `ink_linting/` has a fixed `rust-toolchain` file.
# We can't move this line to the Docker container, since
# that would then make it impossible to upgrade the
# `ink_linting/rust-toolchain` file while still having
# this CI job succeed.
- rustup component add rustfmt clippy rust-src
- cargo check --verbose
- cargo fmt --verbose --all -- --check
- cargo clippy --verbose -- -D warnings;
# Needed until https://github.com/mozilla/sccache/issues/1000 is fixed.
- unset RUSTC_WRAPPER
- cargo test --verbose --all-features
- rusty-cachier cache upload
test:
stage: test
<<: *docker-env
script:
- rusty-cachier snapshot create
- cargo test --verbose --workspace --all-features
- rusty-cachier cache upload
test-new-project-template:
stage: test
<<: *docker-env
script:
- rusty-cachier snapshot create
- cargo run -- contract new new_project
# needed because otherwise:
# `error: current package believes it's in a workspace when it's not`
- echo "[workspace]" >> new_project/Cargo.toml
- cargo run --all-features -- contract build --manifest-path new_project/Cargo.toml
- cargo run --all-features -- contract check --manifest-path new_project/Cargo.toml
- cargo run --all-features -- contract test --manifest-path new_project/Cargo.toml
- cd new_project
- cargo check --verbose
- cargo test --verbose --all
- cargo fmt --verbose --all -- --check
- cargo clippy --verbose --manifest-path Cargo.toml -- -D warnings;
- rusty-cachier cache upload
# With the introduction of `ink_linting` in `build.rs` the installation process
# is more elaborate now and as part of it the `ink_linting` crate is built locally.
# We introduced this CI job to make sure that publishing to a registry and installing
# from it will work correctly.
test-registry-publish-install:
stage: test
<<: *docker-env
before_script:
- !reference [.rusty-cachier, before_script]
# Set up a local registry.
- mkdir -p ./estuary/crates/ ./estuary/indices/
- estuary --base-url=http://0.0.0.0:7878 --crate-dir ./estuary/crates/ --index-dir ./estuary/indices &
- mkdir .cargo
- echo -e '[registries]\nestuary = { index = "http://0.0.0.0:7878/git/index" }' > .cargo/config.toml
- echo 0000 | cargo login --registry estuary
script:
- rusty-cachier snapshot create
- cargo publish --registry estuary
- cargo install cargo-contract --index http://0.0.0.0:7878/git/index
# Simple smoke testing to check if basic `check` functionality works.
- cargo run -- contract new new_project
- echo "[workspace]" >> new_project/Cargo.toml
- cargo run --all-features -- contract check --manifest-path new_project/Cargo.toml
- rusty-cachier cache upload
#### stage: build (default features)
build:
stage: build
<<: *docker-env
<<: *collect-artifacts
rules:
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_REF_NAME == "master"
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
script:
- rusty-cachier snapshot create
- cargo build --verbose --release
- rusty-cachier cache upload
after_script:
- !reference [.rusty-cachier, after_script]
- mkdir -p ./artifacts/cargo-contract/
- cp ${CARGO_TARGET_DIR}/release/cargo-contract ./artifacts/cargo-contract/
#### stage: notify (rusty-cachier notification about the latest revision)
rusty-cachier-notify:
stage: notify
<<: *docker-env
script:
- rusty-cachier cache notify
cargo-contract-58a5b52d80ea315ea8ce709c708597dcdac3f5fa/.images/ 0000775 0000000 0000000 00000000000 14243636706 0023207 5 ustar 00root root 0000000 0000000 cargo-contract-58a5b52d80ea315ea8ce709c708597dcdac3f5fa/.images/cargo-contract.svg 0000664 0000000 0000000 00000012744 14243636706 0026646 0 ustar 00root root 0000000 0000000
cargo-contract-58a5b52d80ea315ea8ce709c708597dcdac3f5fa/.images/ink-squid.svg 0000664 0000000 0000000 00000014417 14243636706 0025643 0 ustar 00root root 0000000 0000000