Skip to content

Commit

Permalink
Add ci/tests/000-cargo-clean.sh
Browse files Browse the repository at this point in the history
Remove Cargo.lock and run cargo clean. This is only useful for ci/devtools/run_locally.sh.
CI jobs will always run on a clean clone. Cargo.lock will only be deleted if it's included in .gitignore.
  • Loading branch information
cronicc committed Jun 7, 2021
1 parent df53534 commit ee0c9dc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ script: ci/script.sh
jobs:
include:
- name: bionic_rust-1.51.0_latest
env: IMAGE_TAG=bionic_rust-1.51.0_latest TESTS='001,002'
env: IMAGE_TAG=bionic_rust-1.51.0_latest TESTS='000,001,002'
- name: bionic_rust-1.51.0_latest_asm
env: IMAGE_TAG=bionic_rust-1.51.0_latest TESTS='001,002' RUSTFLAGS='--emit=asm'
env: IMAGE_TAG=bionic_rust-1.51.0_latest TESTS='000,001,002' RUSTFLAGS='--emit=asm'
- name: bionic_rust-1.51.0_latest_asm_target-feature
env: IMAGE_TAG=bionic_rust-1.51.0_latest TESTS='001,002' RUSTFLAGS='-C target-feature=+bmi2,+adx --emit=asm'
env: IMAGE_TAG=bionic_rust-1.51.0_latest TESTS='000,001,002' RUSTFLAGS='-C target-feature=+bmi2,+adx --emit=asm'
- name: bionic_rust-nightly-2021-04-25_latest
env: IMAGE_TAG=bionic_rust-nightly-2021-04-25_latest TESTS='*' CARGOARGS='+nightly-2021-04-25'
11 changes: 11 additions & 0 deletions ci/tests/000-cargo-clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

set -xeo pipefail

if grep -q 'Cargo.lock' .gitignore &> /dev/null; then
rm -f Cargo.lock
fi

# shellcheck disable=SC2086
cargo $CARGOARGS clean

0 comments on commit ee0c9dc

Please sign in to comment.