diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2023-05-15 22:46:54 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-16 10:46:54 +0800 |
commit | fb0606fd74d01efd319d9f98e0221bed1b45fa2a (patch) | |
tree | 4c15bb228a353eb9c42ebe28898c3495635c79d8 | |
parent | 983b4617fe9668d03f6c58de56fadd1cbc296e64 (diff) | |
download | cryptography-fb0606fd74d01efd319d9f98e0221bed1b45fa2a.tar.gz |
Stop using cargo-binutils (#8935)
Just find the copy of llvm-profdata/llvm-cov from rustc itself
-rw-r--r-- | .github/actions/cache/action.yml | 2 | ||||
-rw-r--r-- | .github/workflows/ci.yml | 20 |
2 files changed, 7 insertions, 15 deletions
diff --git a/.github/actions/cache/action.yml b/.github/actions/cache/action.yml index 47414c0f4..4581770f9 100644 --- a/.github/actions/cache/action.yml +++ b/.github/actions/cache/action.yml @@ -43,7 +43,7 @@ runs: ~/.cargo/registry/cache/ src/rust/target/ ${{ inputs.additional-paths }} - key: cargo-pip-${{ runner.os }}-${{ runner.arch }}-${{ inputs.key }}-4-${{ hashFiles('**/Cargo.lock', '**/*.rs') }}-${{ steps.rust-version.version }} + key: cargo-pip-${{ runner.os }}-${{ runner.arch }}-${{ inputs.key }}-5-${{ hashFiles('**/Cargo.lock', '**/*.rs') }}-${{ steps.rust-version.version }} - name: Size of cache items run: | du -sh ~/.cargo/registry/index/ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af52faacc..cbd679da0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -276,17 +276,10 @@ jobs: timeout-minutes: 2 with: key: coverage - additional-paths: | - ~/.cargo/bin/cargo-cov - ~/.cargo/bin/cargo-profdata - ~/.cargo/bin/rust-cov - ~/.cargo/bin/rust-profdata - name: Setup python uses: actions/setup-python@v4.6.0 with: python-version: ${{ matrix.PYTHON }} - - run: cargo install cargo-binutils - if: steps.cargo-cache.outputs.cache-hit != 'true' - name: Clone wycheproof timeout-minutes: 2 @@ -304,19 +297,18 @@ jobs: - name: Process coverage data run: | set -xe - cd src/rust/ - cargo profdata -- merge -sparse $(find ../.. -iname "*.profraw") -o rust-cov.profdata + "$(rustc --print target-libdir)/../bin/llvm-profdata" merge -sparse $(find . -iname "*.profraw") -o rust-cov.profdata COV_UUID=$(python3 -c "import uuid; print(uuid.uuid4())") - cargo cov -- export \ - ../../.nox/tests/lib/python${{ matrix.PYTHON }}/site-packages/cryptography/hazmat/bindings/_rust.abi3.so \ - $(cat ../../rust-tests.txt | awk '{print "-object " $0}') \ + "$(rustc --print target-libdir)/../bin/llvm-cov" export \ + .nox/tests/lib/python${{ matrix.PYTHON }}/site-packages/cryptography/hazmat/bindings/_rust.abi3.so \ + $(cat rust-tests.txt | awk '{print "-object " $0}') \ -instr-profile=rust-cov.profdata \ --ignore-filename-regex='/.cargo/' \ --ignore-filename-regex='/rustc/' \ - --ignore-filename-regex='/.rustup/toolchains/' --format=lcov > "../../${COV_UUID}.lcov" + --ignore-filename-regex='/.rustup/toolchains/' --format=lcov > "${COV_UUID}.lcov" - sed -E -i 's/SF:(.*)\/src\/rust\/(.*)/SF:src\/rust\/\2/g' "../../${COV_UUID}.lcov" + sed -E -i 's/SF:(.*)\/src\/rust\/(.*)/SF:src\/rust\/\2/g' "${COV_UUID}.lcov" - uses: ./.github/actions/upload-coverage macos: |