diff --git a/hyperfine.yaml b/hyperfine.yaml new file mode 100644 index 00000000000..a6ca4340b8b --- /dev/null +++ b/hyperfine.yaml @@ -0,0 +1,105 @@ +package: + name: hyperfine + version: 1.19.0 + epoch: 0 + description: "A command-line benchmarking tool" + copyright: + - license: MIT OR Apache-2.0 + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - cargo-auditable + - rust + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/sharkdp/hyperfine + tag: v${{package.version}} + expected-commit: 12fec42098642a19855ead34c8cb1e0be28c8ead + + - name: install manpages + runs: | + mkdir -p "${{targets.destdir}}/usr/share/man/man1" + cp doc/hyperfine.1 "${{targets.destdir}}/usr/share/man/man1/" + + - runs: | + # Create directories for shell completions + mkdir -p "${{targets.destdir}}/usr/share/bash-completion/completions" + mkdir -p "${{targets.destdir}}/usr/share/zsh/site-functions" + mkdir -p "${{targets.destdir}}/usr/share/fish/vendor_completions.d" + + export SHELL_COMPLETIONS_DIR="${{targets.destdir}}/usr/share/bash-completion/completions" + + cargo fetch + cargo auditable build --frozen --release + + install -Dm755 target/release/hyperfine "${{targets.destdir}}"/usr/bin/hyperfine + + if [ -f "$SHELL_COMPLETIONS_DIR/hyperfine.bash" ]; then + mv "$SHELL_COMPLETIONS_DIR/hyperfine.bash" "$SHELL_COMPLETIONS_DIR/hyperfine" + fi + if [ -f "$SHELL_COMPLETIONS_DIR/hyperfine.fish" ]; then + mv "$SHELL_COMPLETIONS_DIR/hyperfine.fish" "${{targets.destdir}}/usr/share/fish/vendor_completions.d/hyperfine.fish" + fi + if [ -f "$SHELL_COMPLETIONS_DIR/_hyperfine" ]; then + mv "$SHELL_COMPLETIONS_DIR/_hyperfine" "${{targets.destdir}}/usr/share/zsh/site-functions/_hyperfine" + fi + if [ -f "$SHELL_COMPLETIONS_DIR/hyperfine.zsh" ]; then + mv "$SHELL_COMPLETIONS_DIR/hyperfine.zsh" "${{targets.destdir}}/usr/share/zsh/site-functions/_hyperfine" + fi + + - uses: strip + +subpackages: + - name: ${{package.name}}-doc + pipeline: + - uses: split/manpages + - uses: split/infodir + description: ${{package.name}} docs + test: + pipeline: + - uses: test/docs + +update: + enabled: true + github: + identifier: sharkdp/hyperfine + strip-prefix: v + +test: + environment: + contents: + packages: + - curl + - coreutils + pipeline: + - name: Version and help check + runs: | + hyperfine --version + hyperfine --help + - name: Basic benchmark test + runs: | + echo '#!/bin/sh' > test.sh + echo 'echo "Hello, World!"' >> test.sh + chmod +x test.sh + + hyperfine --warmup 1 --runs 2 './test.sh' + - name: Export formats test + runs: | + hyperfine --warmup 1 --runs 2 --export-json test.json 'echo test' + test -f test.json + hyperfine --warmup 1 --runs 2 --export-markdown test.md 'echo test' + test -f test.md + - name: Parameter test + runs: | + hyperfine --warmup 1 --runs 2 --parameter-scan num_lines 1 10 -D 3 'head -n {num_lines} /etc/passwd' + - name: Check shell completions + runs: | + test -f /usr/share/bash-completion/completions/hyperfine || echo "Bash completion not found" + test -f /usr/share/fish/vendor_completions.d/hyperfine.fish || echo "Fish completion not found" + test -f /usr/share/zsh/site-functions/_hyperfine || echo "Zsh completion not found" diff --git a/tusd.yaml b/tusd.yaml new file mode 100644 index 00000000000..c3df6ef200e --- /dev/null +++ b/tusd.yaml @@ -0,0 +1,61 @@ +package: + name: tusd + version: "2.8.0" + epoch: 0 + description: Reference server implementation in Go of tus, the open protocol for resumable file uploads + copyright: + - license: MIT + +environment: + contents: + packages: + - busybox + - ca-certificates-bundle + - go + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/tus/tusd + tag: v${{package.version}} + expected-commit: 0e52ad650abed02ec961353bb0c3c8bc36650d2c + + - runs: | + go get -require=golang.org/x/crypto@v0.45.0 + go get -require=golang.org/x/net@v0.38.0 + go mod tidy + + - uses: go/build + with: + modroot: . + packages: ./cmd/tusd + output: tusd + ldflags: | + -X github.com/tus/tusd/v2/cmd/tusd/cli.VersionName=${{package.version}} \ + -X github.com/tus/tusd/v2/cmd/tusd/cli.GitCommit=$(git rev-parse --short HEAD) \ + -X github.com/tus/tusd/v2/cmd/tusd/cli.BuildDate=$(date -u -d@${SOURCE_DATE_EPOCH} +'%Y-%m-%dT%H:%M:%SZ') + + - uses: strip + +subpackages: + - name: tusd-doc + description: tusd manpages + pipeline: + - uses: split/manpages + test: + pipeline: + - uses: test/docs + +update: + enabled: true + github: + identifier: tus/tusd + strip-prefix: v + use-tag: true + +test: + pipeline: + - name: version check + runs: | + tusd --version + tusd --help