Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update .github/workflows/rustdoc.yaml in artichoke/boba #159

Merged

Conversation

lopopolo
Copy link
Member

@lopopolo lopopolo commented Aug 7, 2022

Managed by Terraform.

Contents

---
name: Documentation
"on":
  push:
    branches:
      - trunk
  pull_request:
    branches:
      - trunk
  schedule:
    - cron: "0 0 * * TUE"
concurrency:
  group: docs-${{ github.head_ref }}
jobs:
  rustdoc:
    name: Build Rust API docs
    runs-on: ubuntu-latest
    env:
      RUSTDOCFLAGS: -D warnings -D rustdoc::broken_intra_doc_links --cfg docsrs
      RUST_BACKTRACE: 1

    steps:
      - name: Checkout repository
        uses: actions/checkout@v3

      - name: Install nightly Rust toolchain
        run: |
          echo "::group::rustup toolchain install"
          rustup toolchain install nightly --profile minimal
          echo "::endgroup::"
          echo "::group::set default toolchain"
          rm -rf rust-toolchain
          rustup default nightly
          echo "::endgroup::"
          echo "::group::rustup version"
          rustup -Vv
          echo "::endgroup::"
          echo "::group::rustc version"
          rustc -Vv
          echo "::endgroup::"
          echo "::group::cargo version"
          cargo version --verbose
          echo "::endgroup::"

      - name: Check docs with no default features
        run: cargo doc --workspace --no-default-features

      - name: Clean docs
        run: cargo clean

      - name: Build Documentation
        run: cargo doc --workspace

      # https://github.com/artichoke/artichoke/issues/1826
      - name: Purge sources from out dir
        run: find . -path './target/doc/*/target/debug/build/*' | xargs rm -rf

      - name: Deploy Docs
        uses: peaceiris/actions-gh-pages@v3
        if: github.ref == 'refs/heads/trunk'
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./target/doc
          publish_branch: gh-pages
          user_name: artichoke-ci
          user_email: [email protected]
          # only have the most recent docs in the `gh-pages` branch
          # https://github.com/artichoke/artichoke/issues/1826
          force_orphan: true

@lopopolo lopopolo added C-docs Category: Improvements or additions to documentation. A-build Area: CI build infrastructure. labels Aug 7, 2022
lopopolo added a commit that referenced this pull request Aug 7, 2022
`boba` has a required dependency on the `alloc` crate, but gates the
availability of the `alloc` crate with the `alloc` feature.

`boba` does not build with no default features as a result. The docs
lead me to believe this was intentional, but with new CI steps in #159,
all Artichoke crates must build and pass a docs build with no default
features.

This will require a semver major bump.
@lopopolo lopopolo mentioned this pull request Aug 7, 2022
lopopolo added a commit that referenced this pull request Aug 8, 2022
`boba` has a required dependency on the `alloc` crate, but gates the
availability of the `alloc` crate with the `alloc` feature.

`boba` does not build with no default features as a result. The docs
lead me to believe this was intentional, but with new CI steps in #159,
all Artichoke crates must build and pass a docs build with no default
features.

This will require a semver major bump.
@lopopolo
Copy link
Member Author

lopopolo commented Aug 8, 2022

Blocked by:

lopopolo added a commit that referenced this pull request Aug 8, 2022
`boba` has a required dependency on the `alloc` crate, but gates the
availability of the `alloc` crate with the `alloc` feature.

`boba` does not build with no default features as a result. The docs
lead me to believe this was intentional, but with new CI steps in #159,
all Artichoke crates must build and pass a docs build with no default
features.

This will require a semver major bump.
Managed by Terraform.

## Contents

```
---
name: Documentation
"on":
  push:
    branches:
      - trunk
  pull_request:
    branches:
      - trunk
  schedule:
    - cron: "0 0 * * TUE"
concurrency:
  group: docs-${{ github.head_ref }}
jobs:
  rustdoc:
    name: Build Rust API docs
    runs-on: ubuntu-latest
    env:
      RUSTDOCFLAGS: -D warnings -D rustdoc::broken_intra_doc_links --cfg docsrs
      RUST_BACKTRACE: 1

    steps:
      - name: Checkout repository
        uses: actions/checkout@v3

      - name: Install nightly Rust toolchain
        run: |
          echo "::group::rustup toolchain install"
          rustup toolchain install nightly --profile minimal
          echo "::endgroup::"
          echo "::group::set default toolchain"
          rm -rf rust-toolchain
          rustup default nightly
          echo "::endgroup::"
          echo "::group::rustup version"
          rustup -Vv
          echo "::endgroup::"
          echo "::group::rustc version"
          rustc -Vv
          echo "::endgroup::"
          echo "::group::cargo version"
          cargo version --verbose
          echo "::endgroup::"

      - name: Check docs with no default features
        run: cargo doc --workspace --no-default-features

      - name: Clean docs
        run: cargo clean

      - name: Build Documentation
        run: cargo doc --workspace

      # artichoke/artichoke#1826
      - name: Purge sources from out dir
        run: find . -path './target/doc/*/target/debug/build/*' | xargs rm -rf

      - name: Deploy Docs
        uses: peaceiris/actions-gh-pages@v3
        if: github.ref == 'refs/heads/trunk'
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./target/doc
          publish_branch: gh-pages
          user_name: artichoke-ci
          user_email: [email protected]
          # only have the most recent docs in the `gh-pages` branch
          # artichoke/artichoke#1826
          force_orphan: true
```
@lopopolo lopopolo force-pushed the terraform/update-file-.github-workflows-rustdoc.yaml branch from 62e6d8f to 00a1c3d Compare August 8, 2022 01:20
@lopopolo lopopolo merged commit 102b1ac into trunk Aug 8, 2022
@lopopolo lopopolo deleted the terraform/update-file-.github-workflows-rustdoc.yaml branch August 8, 2022 01:28
@lopopolo lopopolo restored the terraform/update-file-.github-workflows-rustdoc.yaml branch August 8, 2022 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-build Area: CI build infrastructure. C-docs Category: Improvements or additions to documentation.
Development

Successfully merging this pull request may close these issues.

2 participants