mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-02 09:01:25 +00:00
1 parent
b2a246c195
commit
699d8ca329
3 files changed
+108
-19
No files matched your search
+18
-13
@@ -1,6 +1,5 @@
|
|||||||
language: rust
|
language: rust
|
||||||
cache: cargo
|
jobs:
|
||||||
matrix:
|
|
||||||
include:
|
include:
|
||||||
# Stable channel.
|
# Stable channel.
|
||||||
- os: linux
|
- os: linux
|
||||||
@@ -18,6 +17,17 @@ matrix:
|
|||||||
- os: osx
|
- os: osx
|
||||||
rust: stable
|
rust: stable
|
||||||
env: TARGET=x86_64-apple-darwin
|
env: TARGET=x86_64-apple-darwin
|
||||||
|
- os: linux
|
||||||
|
rust: stable
|
||||||
|
env:
|
||||||
|
- TARGET=arm-unknown-linux-gnueabihf
|
||||||
|
- CC_arm_unknown_linux_gnueabihf=/usr/bin/arm-linux-gnueabihf-gcc-4.8
|
||||||
|
- CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc-4.8
|
||||||
|
- os: linux
|
||||||
|
rust: stable
|
||||||
|
env:
|
||||||
|
- TARGET=arm-unknown-linux-musleabihf
|
||||||
|
- CARGO_TARGET_ARM_UNKNOWN_LINUX_MUSLEABIHF_LINKER=arm-linux-gnueabihf-gcc-4.8
|
||||||
|
|
||||||
# Minimum Rust supported channel.
|
# Minimum Rust supported channel.
|
||||||
- os: linux
|
- os: linux
|
||||||
@@ -36,13 +46,8 @@ matrix:
|
|||||||
rust: 1.43.0
|
rust: 1.43.0
|
||||||
env: TARGET=x86_64-apple-darwin
|
env: TARGET=x86_64-apple-darwin
|
||||||
|
|
||||||
addons:
|
before_install:
|
||||||
apt:
|
- ci/before_install.bash
|
||||||
packages:
|
|
||||||
# needed for i686-unknown-linux-gnu target
|
|
||||||
- gcc-multilib
|
|
||||||
# needed to build deb packages
|
|
||||||
- fakeroot
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
@@ -59,19 +64,19 @@ install:
|
|||||||
script:
|
script:
|
||||||
# Incorporate TARGET env var to the build and test process
|
# Incorporate TARGET env var to the build and test process
|
||||||
- cargo build --target $TARGET --verbose
|
- cargo build --target $TARGET --verbose
|
||||||
- cargo test --target $TARGET --verbose
|
- '[[ $TARGET == arm-unknown-linux-* ]] || cargo test --target $TARGET --verbose'
|
||||||
|
|
||||||
before_deploy:
|
before_deploy:
|
||||||
- bash ci/before_deploy.bash
|
- bash ci/before_deploy.bash
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: releases
|
provider: releases
|
||||||
# NOTE updating the `api_key.secure`
|
# NOTE updating the `token.secure`
|
||||||
# - go to: https://github.com/settings/tokens/new
|
# - go to: https://github.com/settings/tokens/new
|
||||||
# - generate new token using `public_repo` scope
|
# - generate new token using `public_repo` scope
|
||||||
# - encrypt it using: `travis encrypt API_KEY_HERE`
|
# - encrypt it using: `travis encrypt API_KEY_HERE`
|
||||||
# - paste the output below
|
# - paste the output below
|
||||||
api_key:
|
token:
|
||||||
secure: "U9QfCOQkeozaDNrTV6i2vRocX2puB5p1WSN+w9t/1j33rAtXx6ZhFx67A8nl0+dQ9nvPu/RIsFWXrYzfHQskL1WulKNHm0S5otN+747dEzbSIfMNi1UfysyCiM1SNPq+FX3qOkva83+Fe2Lyd1g4gQObceE4xsgfplfzdm+ebIa6CrfKOypToEuetzP/r8V0WpW4Cp8ojQwvsL1nfHjr1gmvmr443Gr9Yvgq9SS/NAHldrpaJr8mD26W/7jbHdm3lvrNwqLbthYDUTPZsO+2B44h+T/tuhVYbur4fel1KMo4mkIwZwsSKvJbf3Q6Vdcc9dZM+niZU78UGLt0JNEMQNqQLPGYqh+TlFR2B++lcYlybT3LcUaSkt0YIX7C4DAbMLS6sl5Fq2pRNuM/eY2BWdHf0I+K19PDxUEliUifsfSQ3rbfl52aKKLcJa0WPyDJt0qldElagxOaTIk/jn1kKkdkQu9M4gVzKXImIauRQih3CLER7th8ADMxW5Plgq8fvffJBTKlubUznKrGeeR3Mjm8DsRjhkIvFO0Doqmki4sd5zE/BOFI5a/SHg73ms+bLXLuKFK+YzIlHszCHolzkAT44aq7+LEudk8jt+QVtBEocCN/4ew4Q9Qh2tcn22+hU3Aw88lO95PsbZzTzoFtX4X89Sl1fGtpkHFZvvL4ZT0="
|
secure: "U9QfCOQkeozaDNrTV6i2vRocX2puB5p1WSN+w9t/1j33rAtXx6ZhFx67A8nl0+dQ9nvPu/RIsFWXrYzfHQskL1WulKNHm0S5otN+747dEzbSIfMNi1UfysyCiM1SNPq+FX3qOkva83+Fe2Lyd1g4gQObceE4xsgfplfzdm+ebIa6CrfKOypToEuetzP/r8V0WpW4Cp8ojQwvsL1nfHjr1gmvmr443Gr9Yvgq9SS/NAHldrpaJr8mD26W/7jbHdm3lvrNwqLbthYDUTPZsO+2B44h+T/tuhVYbur4fel1KMo4mkIwZwsSKvJbf3Q6Vdcc9dZM+niZU78UGLt0JNEMQNqQLPGYqh+TlFR2B++lcYlybT3LcUaSkt0YIX7C4DAbMLS6sl5Fq2pRNuM/eY2BWdHf0I+K19PDxUEliUifsfSQ3rbfl52aKKLcJa0WPyDJt0qldElagxOaTIk/jn1kKkdkQu9M4gVzKXImIauRQih3CLER7th8ADMxW5Plgq8fvffJBTKlubUznKrGeeR3Mjm8DsRjhkIvFO0Doqmki4sd5zE/BOFI5a/SHg73ms+bLXLuKFK+YzIlHszCHolzkAT44aq7+LEudk8jt+QVtBEocCN/4ew4Q9Qh2tcn22+hU3Aw88lO95PsbZzTzoFtX4X89Sl1fGtpkHFZvvL4ZT0="
|
||||||
# for uploading multiple files
|
# for uploading multiple files
|
||||||
file_glob: true
|
file_glob: true
|
||||||
@@ -83,7 +88,7 @@ deploy:
|
|||||||
- $PROJECT_NAME-$TRAVIS_TAG-$TARGET.*
|
- $PROJECT_NAME-$TRAVIS_TAG-$TARGET.*
|
||||||
- $PROJECT_NAME*.deb
|
- $PROJECT_NAME*.deb
|
||||||
# don't delete artifacts from previous stage
|
# don't delete artifacts from previous stage
|
||||||
skip_cleanup: true
|
cleanup: false
|
||||||
on:
|
on:
|
||||||
# deploy only if we push a tag
|
# deploy only if we push a tag
|
||||||
tags: true
|
tags: true
|
||||||
|
|||||||
Vendored
+64
-6
@@ -11,17 +11,25 @@ pack() {
|
|||||||
local tempdir
|
local tempdir
|
||||||
local out_dir
|
local out_dir
|
||||||
local package_name
|
local package_name
|
||||||
|
local gcc_prefix
|
||||||
|
|
||||||
tempdir=$(mktemp -d 2>/dev/null || mktemp -d -t tmp)
|
tempdir=$(mktemp -d 2>/dev/null || mktemp -d -t tmp)
|
||||||
out_dir=$(pwd)
|
out_dir=$(pwd)
|
||||||
package_name="$PROJECT_NAME-$TRAVIS_TAG-$TARGET"
|
package_name="$PROJECT_NAME-$TRAVIS_TAG-$TARGET"
|
||||||
|
|
||||||
|
if [[ $TARGET == arm-unknown-linux-* ]]; then
|
||||||
|
gcc_prefix="arm-linux-gnueabihf-"
|
||||||
|
else
|
||||||
|
gcc_prefix=""
|
||||||
|
fi
|
||||||
|
|
||||||
# create a "staging" directory
|
# create a "staging" directory
|
||||||
mkdir "$tempdir/$package_name"
|
mkdir "$tempdir/$package_name"
|
||||||
|
mkdir "$tempdir/$package_name/autocomplete"
|
||||||
|
|
||||||
# copying the main binary
|
# copying the main binary
|
||||||
cp "target/$TARGET/release/$PROJECT_NAME" "$tempdir/$package_name/"
|
cp "target/$TARGET/release/$PROJECT_NAME" "$tempdir/$package_name/"
|
||||||
strip "$tempdir/$package_name/$PROJECT_NAME"
|
"${gcc_prefix}"strip "$tempdir/$package_name/$PROJECT_NAME"
|
||||||
|
|
||||||
# manpage, readme and license
|
# manpage, readme and license
|
||||||
cp "doc/$PROJECT_NAME.1" "$tempdir/$package_name"
|
cp "doc/$PROJECT_NAME.1" "$tempdir/$package_name"
|
||||||
@@ -30,7 +38,6 @@ pack() {
|
|||||||
cp LICENSE-APACHE "$tempdir/$package_name"
|
cp LICENSE-APACHE "$tempdir/$package_name"
|
||||||
|
|
||||||
# various autocomplete
|
# various autocomplete
|
||||||
mkdir "$tempdir/$package_name/autocomplete"
|
|
||||||
cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/"$PROJECT_NAME".bash "$tempdir/$package_name/autocomplete/${PROJECT_NAME}.bash-completion"
|
cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/"$PROJECT_NAME".bash "$tempdir/$package_name/autocomplete/${PROJECT_NAME}.bash-completion"
|
||||||
cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/"$PROJECT_NAME".fish "$tempdir/$package_name/autocomplete"
|
cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/"$PROJECT_NAME".fish "$tempdir/$package_name/autocomplete"
|
||||||
cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/_"$PROJECT_NAME" "$tempdir/$package_name/autocomplete"
|
cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/_"$PROJECT_NAME" "$tempdir/$package_name/autocomplete"
|
||||||
@@ -48,17 +55,29 @@ make_deb() {
|
|||||||
local version
|
local version
|
||||||
local dpkgname
|
local dpkgname
|
||||||
local conflictname
|
local conflictname
|
||||||
|
local homepage
|
||||||
|
local maintainer
|
||||||
|
local gcc_prefix
|
||||||
|
|
||||||
|
homepage="https://github.com/sharkdp/$PROJECT_NAME"
|
||||||
|
maintainer="David Peter <mail@david-peter.de>"
|
||||||
|
|
||||||
case $TARGET in
|
case $TARGET in
|
||||||
x86_64*)
|
x86_64*)
|
||||||
architecture=amd64
|
architecture=amd64
|
||||||
|
gcc_prefix=""
|
||||||
;;
|
;;
|
||||||
i686*)
|
i686*)
|
||||||
architecture=i386
|
architecture=i386
|
||||||
|
gcc_prefix=""
|
||||||
|
;;
|
||||||
|
arm*hf)
|
||||||
|
architecture=armhf
|
||||||
|
gcc_prefix="arm-linux-gnueabihf-"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "ERROR: unknown target" >&2
|
echo "make_deb: skipping target '${TARGET}'" >&2
|
||||||
return 1
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
version=${TRAVIS_TAG#v}
|
version=${TRAVIS_TAG#v}
|
||||||
@@ -74,7 +93,7 @@ make_deb() {
|
|||||||
|
|
||||||
# copy the main binary
|
# copy the main binary
|
||||||
install -Dm755 "target/$TARGET/release/$PROJECT_NAME" "$tempdir/usr/bin/$PROJECT_NAME"
|
install -Dm755 "target/$TARGET/release/$PROJECT_NAME" "$tempdir/usr/bin/$PROJECT_NAME"
|
||||||
strip "$tempdir/usr/bin/$PROJECT_NAME"
|
"${gcc_prefix}"strip "$tempdir/usr/bin/$PROJECT_NAME"
|
||||||
|
|
||||||
# manpage
|
# manpage
|
||||||
install -Dm644 "doc/$PROJECT_NAME.1" "$tempdir/usr/share/man/man1/$PROJECT_NAME.1"
|
install -Dm644 "doc/$PROJECT_NAME.1" "$tempdir/usr/share/man/man1/$PROJECT_NAME.1"
|
||||||
@@ -84,6 +103,44 @@ make_deb() {
|
|||||||
install -Dm644 README.md "$tempdir/usr/share/doc/$PROJECT_NAME/README.md"
|
install -Dm644 README.md "$tempdir/usr/share/doc/$PROJECT_NAME/README.md"
|
||||||
install -Dm644 LICENSE-MIT "$tempdir/usr/share/doc/$PROJECT_NAME/LICENSE-MIT"
|
install -Dm644 LICENSE-MIT "$tempdir/usr/share/doc/$PROJECT_NAME/LICENSE-MIT"
|
||||||
install -Dm644 LICENSE-APACHE "$tempdir/usr/share/doc/$PROJECT_NAME/LICENSE-APACHE"
|
install -Dm644 LICENSE-APACHE "$tempdir/usr/share/doc/$PROJECT_NAME/LICENSE-APACHE"
|
||||||
|
cat > "$tempdir/usr/share/doc/$PROJECT_NAME/copyright" <<EOF
|
||||||
|
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||||
|
Upstream-Name: $PROJECT_NAME
|
||||||
|
Source: $homepage
|
||||||
|
|
||||||
|
Files: *
|
||||||
|
Copyright: $maintainer
|
||||||
|
License: Apache-2.0 or MIT
|
||||||
|
|
||||||
|
License: Apache-2.0
|
||||||
|
On Debian systems, the complete text of the Apache-2.0 can be found in the
|
||||||
|
file /usr/share/common-licenses/Apache-2.0.
|
||||||
|
|
||||||
|
License: MIT
|
||||||
|
Permission is hereby granted, free of charge, to any
|
||||||
|
person obtaining a copy of this software and associated
|
||||||
|
documentation files (the "Software"), to deal in the
|
||||||
|
Software without restriction, including without
|
||||||
|
limitation the rights to use, copy, modify, merge,
|
||||||
|
publish, distribute, sublicense, and/or sell copies of
|
||||||
|
the Software, and to permit persons to whom the Software
|
||||||
|
is furnished to do so, subject to the following
|
||||||
|
conditions:
|
||||||
|
.
|
||||||
|
The above copyright notice and this permission notice
|
||||||
|
shall be included in all copies or substantial portions
|
||||||
|
of the Software.
|
||||||
|
.
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
||||||
|
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
||||||
|
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
||||||
|
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||||
|
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
DEALINGS IN THE SOFTWARE.
|
||||||
|
EOF
|
||||||
|
|
||||||
# completions
|
# completions
|
||||||
install -Dm644 target/$TARGET/release/build/$PROJECT_NAME-*/out/$PROJECT_NAME.bash "$tempdir/usr/share/bash-completion/completions/${PROJECT_NAME}"
|
install -Dm644 target/$TARGET/release/build/$PROJECT_NAME-*/out/$PROJECT_NAME.bash "$tempdir/usr/share/bash-completion/completions/${PROJECT_NAME}"
|
||||||
@@ -97,10 +154,11 @@ Package: $dpkgname
|
|||||||
Version: $version
|
Version: $version
|
||||||
Section: utils
|
Section: utils
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: David Peter <mail@david-peter.de>
|
Maintainer: $maintainer
|
||||||
Architecture: $architecture
|
Architecture: $architecture
|
||||||
Provides: $PROJECT_NAME
|
Provides: $PROJECT_NAME
|
||||||
Conflicts: $conflictname
|
Conflicts: $conflictname
|
||||||
|
Homepage: $homepage
|
||||||
Description: A command-line benchmarking tool.
|
Description: A command-line benchmarking tool.
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|||||||
+26
@@ -0,0 +1,26 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
if [ "$TRAVIS_OS_NAME" != linux ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo apt-get update
|
||||||
|
|
||||||
|
# needed to build deb packages
|
||||||
|
sudo apt-get install -y fakeroot
|
||||||
|
|
||||||
|
# needed for i686 linux gnu target
|
||||||
|
if [[ $TARGET == i686-unknown-linux-* ]]; then
|
||||||
|
sudo apt-get install -y gcc-multilib
|
||||||
|
fi
|
||||||
|
|
||||||
|
# needed for cross-compiling for arm
|
||||||
|
if [[ $TARGET == arm-unknown-linux-* ]]; then
|
||||||
|
sudo apt-get install -y \
|
||||||
|
gcc-4.8-arm-linux-gnueabihf \
|
||||||
|
binutils-arm-linux-gnueabihf \
|
||||||
|
libc6-armhf-cross \
|
||||||
|
libc6-dev-armhf-cross
|
||||||
|
fi
|
||||||
Reference in new issue
Block a user