Unverified Commit 5115146d authored by Michael Müller's avatar Michael Müller Committed by GitHub
Browse files

[ci] Test workspace docs (#602)

* Revert me: Provoke doc failures

* [ci] Test workspace docs

* Revert "Revert me: Provoke doc failures"

This reverts commit cbc45cf0.

* Fix spaces

* Revert me: Provoke doc failures and see if `exit 1` can be removed

* Revert "Revert me: Provoke doc failures and see if `exit 1` can be removed"

This reverts commit d0e0878e.

* Supply `--all-features` to make artifacts reusable

* Use `RUSTDOCFLAGS=-Dwarnings`

* Revert me: Provoke doc failures

* Revert "Revert me: Provoke doc failures"

This reverts commit e0152681.

* Reuse artifacts of `docs` job for `publish-docs`

* Two spaces

* Two spaces

* Remove `test`, needs already covers this

* Revert me: Test if `publish-docs` job works

* Fix target dir path

* Revert "Revert me: Test if `publish-docs` job works"

This reverts commit 7554b987.

* Revert me: Publish for testing

* Revert "Revert me: Publish for testing"

This reverts commit 3b0ba224.
parent 1758e45a
Pipeline #116217 failed with stages
in 7 minutes and 7 seconds
......@@ -123,6 +123,25 @@ test:
script:
- cargo test --verbose --all-features --no-fail-fast --workspace
docs:
stage: workspace
<<: *docker-env
variables:
RUSTDOCFLAGS: -Dwarnings
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}-doc"
when: on_success
expire_in: 7 days
paths:
- ./crate-docs/
script:
- cargo doc --no-deps --all-features
-p scale-info -p ink_metadata
-p ink_env -p ink_storage -p ink_storage_derive
-p ink_primitives -p ink_prelude
-p ink_lang -p ink_lang_macro -p ink_lang_ir -p ink_lang_codegen
- mv ${CARGO_TARGET_DIR}/doc ./crate-docs
codecov:
stage: workspace
<<: *docker-env
......@@ -250,8 +269,12 @@ examples-contract-build:
publish-docs:
stage: publish
<<: *docker-env
needs:
- job: docs
artifacts: true
variables:
GIT_DEPTH: 0
GIT_STRATEGY: none
rules:
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PIPELINE_SOURCE == "schedule"
......@@ -267,14 +290,8 @@ publish-docs:
- git config remote.origin.url "https://${GITHUB_TOKEN}@github.com/paritytech/ink.git"
- git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
- git fetch origin gh-pages
# Generating Docs
- time cargo doc --no-deps --all-features
-p scale-info -p ink_metadata
-p ink_env -p ink_storage -p ink_storage_derive
-p ink_primitives -p ink_prelude
-p ink_lang -p ink_lang_macro -p ink_lang_ir -p ink_lang_codegen
# saving README and docs
- mv target/doc/ /tmp/
- cp -r ./crate-docs/ /tmp/doc/
- cp README.md /tmp/doc/
- git checkout gh-pages
- mv _config.yml /tmp/doc/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment