Skip to content

Commit

Permalink
[ci] added dev documentation build, added rust doc build
Browse files Browse the repository at this point in the history
  • Loading branch information
Gianmarco Fraccaroli committed Aug 31, 2022
1 parent d991bd3 commit 72b5752
Showing 1 changed file with 74 additions and 1 deletion.
75 changes: 74 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ jobs:
command: cd documentation/docs && mdbook build
cache_subkey: docs
cache_version: v1
- name: Build development docs
folder: documentation/dev
bucket: namada-dev-static-website
command: cd documentation/dev && mdbook build
cache_subkey: dev
cache_version: v1

env:
CARGO_INCREMENTAL: 0
Expand All @@ -64,7 +70,6 @@ jobs:
# See comment in build-and-test.yml
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
Expand Down Expand Up @@ -121,3 +126,71 @@ jobs:
- name: Stop sccache server
if: always()
run: sccache --stop-server || true

rust-docs:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]

env:
CARGO_INCREMENTAL: 0
RUSTC_WRAPPER: sccache
SCCACHE_CACHE_SIZE: 100G
SCCACHE_BUCKET: namada-sccache-master

steps:
- name: Checkout repo
uses: actions/checkout@v3
if: ${{ github.event_name != 'pull_request_target' }}
- name: Checkout PR
uses: actions/checkout@v3
if: ${{ github.event_name == 'pull_request_target' }}
# See comment in build-and-test.yml
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::375643557360:role/anoma-github-action-ci-master
aws-region: eu-west-1
- name: Install sccache (ubuntu-latest)
if: matrix.os == 'ubuntu-latest'
env:
LINK: https://github.com/mozilla/sccache/releases/download
SCCACHE_VERSION: v0.3.0
run: |
SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl
mkdir -p $HOME/.local/bin
curl -L "$LINK/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz
mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache
chmod +x $HOME/.local/bin/sccache
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install sccache (macos-latest)
if: matrix.os == 'macos-latest'
run: |
brew update
brew install sccache
- name: Setup rust toolchain
uses: oxidecomputer/actions-rs_toolchain@ad3f86084a8a5acf2c09cb691421b31cf8af7a36
with:
profile: default
override: true
- name: Setup rust nightly
uses: oxidecomputer/actions-rs_toolchain@ad3f86084a8a5acf2c09cb691421b31cf8af7a36
with:
toolchain: ${{ matrix.nightly_version }}
profile: default
- name: Show rust toolchain info
run: rustup show
- name: Start sccache server
run: sccache --start-server
- name: Build rust-docs
run: make build-doc
- name: Print sccache stats
if: always()
run: sccache --show-stats
- name: Stop sccache server
if: always()
run: sccache --stop-server || true

0 comments on commit 72b5752

Please sign in to comment.