Compare commits

...
Author SHA1 Message Date
David Peter b56dd5cafd Remove --lib option 2021-08-22 15:36:06 +02:00
David Peter 3b00ca9ddb Run cargo fmt 2021-08-22 15:30:13 +02:00
David Peter d2f63be79d Set --locked everywhere 2021-08-22 15:22:49 +02:00
David Peter 360569ec18 Sync CI config with fd 2021-08-22 15:21:56 +02:00
David Peter 72a0ac218d Sync CI config with bat 2021-08-22 15:18:48 +02:00
3 changed files with 24 additions and 15 deletions

No files matched your search

+19 -12
View File
@@ -16,7 +16,7 @@ on:
jobs:
min_version:
name: Minimum supported rust version
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- name: Checkout source code
uses: actions/checkout@v2
@@ -27,16 +27,22 @@ jobs:
toolchain: ${{ env.MIN_SUPPORTED_RUST_VERSION }}
default: true
profile: minimal # minimal component installation (ie, no documentation)
components: clippy
components: clippy, rustfmt
- name: Ensure `cargo fmt` has been run
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
- name: Run clippy (on minimum supported rust version to prevent warnings we can't fix)
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets --all-features
args: --locked --all-targets --all-features
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --locked
build:
name: ${{ matrix.job.os }} (${{ matrix.job.target }})
@@ -45,13 +51,13 @@ jobs:
fail-fast: false
matrix:
job:
- { os: ubuntu-18.04, target: arm-unknown-linux-gnueabihf , use-cross: true }
- { os: ubuntu-18.04, target: arm-unknown-linux-musleabihf, use-cross: true }
- { os: ubuntu-18.04, target: aarch64-unknown-linux-gnu , use-cross: true }
- { os: ubuntu-18.04, target: i686-unknown-linux-gnu , use-cross: true }
- { os: ubuntu-18.04, target: i686-unknown-linux-musl , use-cross: true }
- { os: ubuntu-18.04, target: x86_64-unknown-linux-gnu }
- { os: ubuntu-18.04, target: x86_64-unknown-linux-musl , use-cross: true }
- { os: ubuntu-20.04, target: arm-unknown-linux-gnueabihf , use-cross: true }
- { os: ubuntu-20.04, target: arm-unknown-linux-musleabihf, use-cross: true }
- { os: ubuntu-20.04, target: aarch64-unknown-linux-gnu , use-cross: true }
- { os: ubuntu-20.04, target: i686-unknown-linux-gnu , use-cross: true }
- { os: ubuntu-20.04, target: i686-unknown-linux-musl , use-cross: true }
- { os: ubuntu-20.04, target: x86_64-unknown-linux-gnu }
- { os: ubuntu-20.04, target: x86_64-unknown-linux-musl , use-cross: true }
- { os: macos-10.15 , target: x86_64-apple-darwin }
# - { os: windows-2019, target: i686-pc-windows-gnu } ## disabled; error: linker `i686-w64-mingw32-gcc` not found
- { os: windows-2019, target: i686-pc-windows-msvc }
@@ -100,7 +106,7 @@ jobs:
with:
use-cross: ${{ matrix.job.use-cross }}
command: build
args: --release --target=${{ matrix.job.target }}
args: --locked --release --target=${{ matrix.job.target }}
- name: Strip debug information from executable
id: strip
@@ -142,6 +148,7 @@ jobs:
id: test-options
shell: bash
run: |
# test only library unit tests and binary for arm-type targets
unset CARGO_TEST_OPTIONS
unset CARGO_TEST_OPTIONS ; case ${{ matrix.job.target }} in arm-* | aarch64-*) CARGO_TEST_OPTIONS="--bin ${PROJECT_NAME}" ;; esac;
echo ::set-output name=CARGO_TEST_OPTIONS::${CARGO_TEST_OPTIONS}
@@ -151,7 +158,7 @@ jobs:
with:
use-cross: ${{ matrix.job.use-cross }}
command: test
args: --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}}
args: --locked --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}}
- name: Create tarball
id: package
+3 -1
View File
@@ -343,7 +343,9 @@ pub fn run_benchmark(
format!("Current estimate: {}", mean.to_string().green())
};
progress_bar.as_ref().map(|bar| bar.set_message(msg.to_owned()));
progress_bar
.as_ref()
.map(|bar| bar.set_message(msg.to_owned()));
let (res, status) = time_shell_command(
&options.shell,
+2 -2
View File
@@ -64,8 +64,8 @@ fn compare_mean_time(l: &BenchmarkResult, r: &BenchmarkResult) -> Ordering {
l.mean.partial_cmp(&r.mean).unwrap_or(Ordering::Equal)
}
pub fn compute_relative_speed (
results: & [BenchmarkResult],
pub fn compute_relative_speed(
results: &[BenchmarkResult],
) -> Option<Vec<BenchmarkResultWithRelativeSpeed>> {
let fastest: &BenchmarkResult = results
.iter()