Skip to content

Commit 6ce9a04

Browse files
celinvaltedinski
authored andcommitted
Move bookrunner and doc to its own job (rust-lang#783)
* Move bookrunner and doc to its own job Hopefully this will speed up our CI. * Remove unused permission The regression job no longer needs write permission. That was required by the step that published the docs which we move the bookrunner job.
1 parent 6168ddc commit 6ce9a04

File tree

3 files changed

+58
-28
lines changed

3 files changed

+58
-28
lines changed

.github/actions/build/action.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
# SPDX-License-Identifier: Apache-2.0 OR MIT
3+
name: Build Kani
4+
description: Install dependencies and build kani binaries
5+
inputs:
6+
os:
7+
description: In which Operating System is this running
8+
required: true
9+
default: ubuntu-20.04
10+
runs:
11+
using: composite
12+
steps:
13+
- name: Install dependencies
14+
run: ./scripts/setup/${{ inputs.os }}/install_deps.sh
15+
shell: bash
16+
17+
- name: Install CBMC
18+
run: ./scripts/setup/${{ inputs.os }}/install_cbmc.sh
19+
shell: bash
20+
21+
- name: Install cbmc-viewer
22+
run: ./scripts/setup/install_viewer.sh 2.6
23+
shell: bash
24+
25+
- name: Install Rust toolchain
26+
run: ./scripts/setup/install_rustup.sh
27+
shell: bash
28+
29+
- name: Update submodules
30+
run: |
31+
git submodule update --init --depth 1
32+
shell: bash
33+
34+
- name: Build Kani and Kani Library
35+
run: |
36+
export RUST_BACKTRACE=1
37+
cargo build -p kani-compiler
38+
shell: bash
39+

.github/workflows/format-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
# SPDX-License-Identifier: Apache-2.0 OR MIT
3-
name: Kani CI
3+
name: Kani Format Check
44
on: pull_request
55

66
jobs:

.github/workflows/kani.yml

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,58 +9,49 @@ jobs:
99
strategy:
1010
matrix:
1111
os: [macos-10.15, ubuntu-18.04, ubuntu-20.04]
12-
permissions:
13-
contents: write
1412
steps:
1513
- name: Checkout Kani
1614
uses: actions/checkout@v2
1715

18-
- name: Install dependencies
19-
run: ./scripts/setup/${{ matrix.os }}/install_deps.sh
20-
21-
- name: Install CBMC
22-
run: ./scripts/setup/${{ matrix.os }}/install_cbmc.sh
23-
24-
- name: Install cbmc-viewer
25-
run: ./scripts/setup/install_viewer.sh 2.6
26-
27-
- name: Install Rust toolchain
28-
run: ./scripts/setup/install_rustup.sh
29-
30-
- name: Update submodules
31-
run: |
32-
git submodule update --init --depth 1
33-
34-
- name: Build Kani and Kani Library
35-
run: |
36-
export RUST_BACKTRACE=1
37-
cargo build -p kani-compiler
16+
- name: Build Kani
17+
uses: ./.github/actions/build
18+
with:
19+
os: ${{ matrix.os }}
3820

3921
- name: Execute Kani regression
4022
run: ./scripts/kani-regression.sh
4123

24+
bookrunner:
25+
runs-on: ubuntu-20.04
26+
permissions:
27+
contents: write
28+
steps:
29+
- name: Checkout Kani
30+
uses: actions/checkout@v2
31+
32+
- name: Build Kani
33+
uses: ./.github/actions/build
34+
with:
35+
os: ubuntu-20.04
36+
4237
- name: Install book runner dependencies
43-
if: ${{ matrix.os == 'ubuntu-20.04' }}
4438
run: ./scripts/setup/install_bookrunner_deps.sh
4539

4640
- name: Generate book runner report
47-
if: ${{ matrix.os == 'ubuntu-20.04' }}
4841
run: cargo run -p bookrunner
4942
env:
5043
DOC_RUST_LANG_ORG_CHANNEL: nightly
5144

5245
- name: Print book runner text results
53-
if: ${{ matrix.os == 'ubuntu-20.04' }}
5446
run: cat build/output/latest/html/bookrunner.txt
5547

5648
# On one OS only, build the documentation, too.
5749
- name: Build Documentation
58-
if: ${{ matrix.os == 'ubuntu-20.04' }}
5950
run: ./docs/build-docs.sh
6051

6152
# When we're pushed to main branch, only then actually publish the docs.
6253
- name: Publish Documentation
63-
if: ${{ matrix.os == 'ubuntu-20.04' && github.event_name == 'push' && startsWith('refs/heads/main', github.ref) }}
54+
if: ${{ github.event_name == 'push' && startsWith('refs/heads/main', github.ref) }}
6455
uses: JamesIves/[email protected]
6556
with:
6657
branch: gh-pages

0 commit comments

Comments
 (0)