Skip to content

Commit

Permalink
Fix kani import error and try to fix MacOS build
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherRabotin committed May 8, 2024
1 parent 0bfb9ad commit 8889f85
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,20 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
target: [x86_64, aarch64]
platform:
- runner: macos-latest
target: x86_64
- runner: macos-14
target: aarch64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.10'
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter -F python
sccache: 'true'
- name: Upload wheels
Expand All @@ -135,10 +139,11 @@ jobs:
name: wheels
path: dist
- name: pytest
if: ${{ !startsWith(matrix.target, 'aarch64') }}
if: ${{ !startsWith(matrix.platform.target, 'aarch64') }}
shell: bash
run: |
set -e
pip debug --verbose
pip install hifitime --find-links dist --force-reinstall --no-index -vv
pip install pytest
pytest
Expand Down
4 changes: 2 additions & 2 deletions src/duration/kani_verif.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

// Here lives all of the formal verification for Duration.

use super::{Duration, Errors};
use super::{Duration, DurationError};
use crate::NANOSECONDS_PER_CENTURY;

use kani::Arbitrary;
Expand Down Expand Up @@ -43,7 +43,7 @@ fn formal_duration_truncated_ns_reciprocity() {
// Then it does not fit on a i64, so this function should return an error
assert_eq!(
dur_from_part.try_truncated_nanoseconds(),
Err(Errors::Overflow)
Err(DurationError::Overflow)
);
} else if centuries == -1 {
// If we are negative by just enough that the centuries is negative, then the truncated seconds
Expand Down

0 comments on commit 8889f85

Please sign in to comment.