mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-20 11:21:39 +00:00
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b56dd5cafd | ||
|
|
3b00ca9ddb | ||
|
|
d2f63be79d | ||
|
|
360569ec18 | ||
|
|
72a0ac218d |
No files matched your search
+19
-12
@@ -16,7 +16,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
min_version:
|
min_version:
|
||||||
name: Minimum supported rust version
|
name: Minimum supported rust version
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source code
|
- name: Checkout source code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
@@ -27,16 +27,22 @@ jobs:
|
|||||||
toolchain: ${{ env.MIN_SUPPORTED_RUST_VERSION }}
|
toolchain: ${{ env.MIN_SUPPORTED_RUST_VERSION }}
|
||||||
default: true
|
default: true
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
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)
|
- name: Run clippy (on minimum supported rust version to prevent warnings we can't fix)
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: clippy
|
command: clippy
|
||||||
args: --all-targets --all-features
|
args: --locked --all-targets --all-features
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: test
|
command: test
|
||||||
|
args: --locked
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: ${{ matrix.job.os }} (${{ matrix.job.target }})
|
name: ${{ matrix.job.os }} (${{ matrix.job.target }})
|
||||||
@@ -45,13 +51,13 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
job:
|
job:
|
||||||
- { os: ubuntu-18.04, target: arm-unknown-linux-gnueabihf , use-cross: true }
|
- { os: ubuntu-20.04, target: arm-unknown-linux-gnueabihf , use-cross: true }
|
||||||
- { os: ubuntu-18.04, target: arm-unknown-linux-musleabihf, use-cross: true }
|
- { os: ubuntu-20.04, target: arm-unknown-linux-musleabihf, use-cross: true }
|
||||||
- { os: ubuntu-18.04, target: aarch64-unknown-linux-gnu , use-cross: true }
|
- { os: ubuntu-20.04, target: aarch64-unknown-linux-gnu , use-cross: true }
|
||||||
- { os: ubuntu-18.04, target: i686-unknown-linux-gnu , use-cross: true }
|
- { os: ubuntu-20.04, target: i686-unknown-linux-gnu , use-cross: true }
|
||||||
- { os: ubuntu-18.04, target: i686-unknown-linux-musl , use-cross: true }
|
- { os: ubuntu-20.04, target: i686-unknown-linux-musl , use-cross: true }
|
||||||
- { os: ubuntu-18.04, target: x86_64-unknown-linux-gnu }
|
- { os: ubuntu-20.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: x86_64-unknown-linux-musl , use-cross: true }
|
||||||
- { os: macos-10.15 , target: x86_64-apple-darwin }
|
- { 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-gnu } ## disabled; error: linker `i686-w64-mingw32-gcc` not found
|
||||||
- { os: windows-2019, target: i686-pc-windows-msvc }
|
- { os: windows-2019, target: i686-pc-windows-msvc }
|
||||||
@@ -100,7 +106,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
use-cross: ${{ matrix.job.use-cross }}
|
use-cross: ${{ matrix.job.use-cross }}
|
||||||
command: build
|
command: build
|
||||||
args: --release --target=${{ matrix.job.target }}
|
args: --locked --release --target=${{ matrix.job.target }}
|
||||||
|
|
||||||
- name: Strip debug information from executable
|
- name: Strip debug information from executable
|
||||||
id: strip
|
id: strip
|
||||||
@@ -142,6 +148,7 @@ jobs:
|
|||||||
id: test-options
|
id: test-options
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
# test only library unit tests and binary for arm-type targets
|
||||||
unset CARGO_TEST_OPTIONS
|
unset CARGO_TEST_OPTIONS
|
||||||
unset CARGO_TEST_OPTIONS ; case ${{ matrix.job.target }} in arm-* | aarch64-*) CARGO_TEST_OPTIONS="--bin ${PROJECT_NAME}" ;; esac;
|
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}
|
echo ::set-output name=CARGO_TEST_OPTIONS::${CARGO_TEST_OPTIONS}
|
||||||
@@ -151,7 +158,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
use-cross: ${{ matrix.job.use-cross }}
|
use-cross: ${{ matrix.job.use-cross }}
|
||||||
command: test
|
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
|
- name: Create tarball
|
||||||
id: package
|
id: package
|
||||||
|
|||||||
@@ -343,7 +343,9 @@ pub fn run_benchmark(
|
|||||||
format!("Current estimate: {}", mean.to_string().green())
|
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(
|
let (res, status) = time_shell_command(
|
||||||
&options.shell,
|
&options.shell,
|
||||||
|
|||||||
@@ -64,8 +64,8 @@ fn compare_mean_time(l: &BenchmarkResult, r: &BenchmarkResult) -> Ordering {
|
|||||||
l.mean.partial_cmp(&r.mean).unwrap_or(Ordering::Equal)
|
l.mean.partial_cmp(&r.mean).unwrap_or(Ordering::Equal)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn compute_relative_speed (
|
pub fn compute_relative_speed(
|
||||||
results: & [BenchmarkResult],
|
results: &[BenchmarkResult],
|
||||||
) -> Option<Vec<BenchmarkResultWithRelativeSpeed>> {
|
) -> Option<Vec<BenchmarkResultWithRelativeSpeed>> {
|
||||||
let fastest: &BenchmarkResult = results
|
let fastest: &BenchmarkResult = results
|
||||||
.iter()
|
.iter()
|
||||||
|
|||||||
Reference in new issue
Block a user