Skip to content

Commit 0462cf4

Browse files
committed
Merge remote-tracking branch 'upstream/main' into clean-comment
2 parents fc4e8fe + 886618c commit 0462cf4

380 files changed

Lines changed: 9337 additions & 5722 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cargo/config.toml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,35 @@
11
# Copyright Kani Contributors
22
# SPDX-License-Identifier: Apache-2.0 OR MIT
33

4+
# Command aliases
5+
[alias]
6+
# Build kani with development configuration.
7+
build-dev = "run -p build-kani -- build-dev"
8+
# Build kani release bundle.
9+
bundle = "run -p build-kani -- bundle"
10+
11+
# Constants used by different processes.
12+
# These constants should be evaluated during compilation via `env!()`.
13+
[env]
14+
# Path to the repository root.
15+
KANI_REPO_ROOT={value = "", relative = true}
16+
# Path to the sysroot build. This folder will contain a bin/ and a lib/ folder.
17+
KANI_SYSROOT ={value = "target/kani", relative = true}
18+
# Target for building Kani's libraries. Their configuration is different than the binary build, so we must use
19+
# something different than regular `target/`.
20+
KANI_BUILD_LIBS ={value = "target/build-libs", relative = true}
21+
# Build Kani library without `build-std`.
22+
KANI_LEGACY_LIBS ={value = "target/legacy-libs", relative = true}
23+
424
[target.'cfg(all())']
525
rustflags = [ # Global lints/warnings. Need to use underscore instead of -.
626

727
# Purposefully disabled lints
828
"-Aclippy::expect_fun_call",
929
"-Aclippy::or_fun_call",
1030
"-Aclippy::new_without_default",
31+
32+
# New lints that we are not compliant yet
33+
"-Aclippy::needless-borrow",
34+
"-Aclippy::bool-to-int-with-if",
1135
]

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
---
22
name: Bug Report
33
about: Create a bug report for Kani
4-
labels: bug
4+
title: ''
5+
labels: "[C] Bug"
6+
assignees: ''
7+
58
---
9+
610
<!--
711
If this is a security issue, please report it following the
812
[security reporting procedure](https://github.com/model-checking/kani/security/policy).
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
name: Dev Improvement
3+
about: 'Internal issues that track improvements that don''t affect Kani users. E.g.:
4+
CI, refactoring.'
5+
title: ''
6+
labels: "[C] Internal"
7+
assignees: ''
8+
9+
---
10+
11+
**Proposed change:**
12+
13+
**Motivation:**

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
---
22
name: Feature Request
3-
about: Create a feature request for Kani
4-
labels:
3+
about: Request a new feature or improvement for Kani
4+
title: ''
5+
labels: "[C] Feature / Enhancement"
6+
assignees: ''
7+
58
---
9+
610
<!--
711
If this is a security issue, please report it following the
812
[security reporting procedure](https://github.com/model-checking/kani/security/policy).

.github/actions/setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ runs:
1717
shell: bash
1818

1919
- name: Install cbmc-viewer
20-
run: ./scripts/setup/install_viewer.sh
20+
run: ./scripts/setup/${{ inputs.os }}/install_viewer.sh
2121
shell: bash
2222

2323
- name: Install Rust toolchain

.github/workflows/audit.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55
# 2. Checks Rust-Sec registry for security advisories.
66

77
name: Cargo Audit
8-
on: [pull_request]
8+
on:
9+
pull_request:
10+
push:
11+
# Run on changes to branches but not tags.
12+
branches:
13+
- '**'
914

1015
jobs:
1116
audit:

.github/workflows/format-check.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
# Copyright Kani Contributors
22
# SPDX-License-Identifier: Apache-2.0 OR MIT
33
name: Kani Format Check
4-
on: pull_request
4+
on:
5+
pull_request:
6+
push:
7+
# Not just any push, as that includes tags.
8+
# We don't want to re-trigger this workflow when tagging an existing commit.
9+
branches:
10+
- '**'
511

612
jobs:
713
format-check:
@@ -13,7 +19,9 @@ jobs:
1319
- name: Execute copyright check
1420
run: ./scripts/ci/run-copyright-check.sh
1521

22+
# Ignore failures here for now until we can pindown a version.
1623
- name: Check C code formatting
24+
continue-on-error: true
1725
run: ./scripts/run-clang-format.sh -d
1826

1927
- name: Check Python code formatting

.github/workflows/kani.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
os: ${{ matrix.os }}
2929

3030
- name: Build Kani
31-
run: cargo build
31+
run: cargo build-dev
3232

3333
- name: Execute Kani regression
3434
run: ./scripts/kani-regression.sh
@@ -47,7 +47,7 @@ jobs:
4747
os: ubuntu-20.04
4848

4949
- name: Build Kani
50-
run: cargo build
50+
run: cargo build-dev
5151

5252
- name: Execute Kani regression
5353
run: ./scripts/kani-regression.sh
@@ -64,7 +64,7 @@ jobs:
6464
os: ubuntu-20.04
6565

6666
- name: Build Kani using release mode
67-
run: cargo build --release
67+
run: cargo build-dev -- --release
6868

6969
- name: Execute Kani performance tests
7070
run: ./scripts/kani-perf.sh
@@ -83,7 +83,7 @@ jobs:
8383
os: ubuntu-20.04
8484

8585
- name: Build Kani
86-
run: cargo build
86+
run: cargo build-dev
8787

8888
- name: Install book runner dependencies
8989
run: ./scripts/setup/install_bookrunner_deps.sh
@@ -133,7 +133,7 @@ jobs:
133133

134134
- name: Build release bundle
135135
run: |
136-
cargo run -p make-kani-release -- latest
136+
cargo bundle -- latest
137137
cargo package -p kani-verifier
138138
139139
- name: Build container test
@@ -154,6 +154,8 @@ jobs:
154154
docker run -w /tmp/kani/tests/cargo-kani/build-rs-works $tag cargo kani
155155
docker run $tag cargo-kani setup --use-local-bundle ./${{ matrix.artifact }}
156156
done
157+
# While the above test OS issues, now try testing with nightly as default:
158+
docker run -w /tmp/kani/tests/cargo-kani/simple-lib kani-20-04 bash -c "rustup default nightly && cargo kani"
157159
158160
# We can't run macos in a container, so we can only test locally.
159161
# Hopefully any dependency issues won't be unique to macos.

.github/workflows/release.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ jobs:
3636
echo "Git tag ${{env.TAG_VERSION}} did not match crate version ${{env.CRATE_VERSION}}"
3737
exit 1
3838
fi
39-
# Check the action script's tag.
40-
if ! grep -F "image: docker://ghcr.io/model-checking/kani-ubuntu-20.04:${{ env.TAG_VERSION }}" action.yml; then
41-
echo "Git tag ${{env.TAG_VERSION}} did not match version in action.yml"
42-
exit 1;
43-
fi
4439
4540
- name: Create release
4641
id: create_release
@@ -80,7 +75,7 @@ jobs:
8075

8176
- name: Build release bundle
8277
run: |
83-
cargo run -p make-kani-release -- ${{ needs.Release.outputs.version }}
78+
cargo bundle
8479
8580
- name: Upload artifact
8681
uses: actions/upload-release-asset@v1
@@ -113,7 +108,7 @@ jobs:
113108

114109
- name: 'Build release bundle'
115110
run: |
116-
cargo run -p make-kani-release -- ${{ needs.Release.outputs.version }}
111+
cargo bundle
117112
cargo package -p kani-verifier
118113
119114
- name: 'Login to GitHub Container Registry'

.github/workflows/slow-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
os: ${{ matrix.os }}
2525

2626
- name: Build Kani
27-
run: cargo build
27+
run: cargo build-dev
2828

2929
- name: Run Kani's slow tests
3030
run: ./scripts/kani-slow-tests.sh

0 commit comments

Comments
 (0)