Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2

updates:
- package-ecosystem: cargo
directory: /
schedule:
interval: weekly

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
6 changes: 5 additions & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
pull_request:
paths:
- benches/**
- tools/scripts/benchmarks.sh
- tools/scripts/compare-fetch.sh
- src/**
- Cargo.lock
- Cargo.toml
Expand All @@ -13,6 +15,8 @@ on:
branches: [forge]
paths:
- benches/**
- tools/scripts/benchmarks.sh
- tools/scripts/compare-fetch.sh
- src/**
- Cargo.lock
- Cargo.toml
Expand Down Expand Up @@ -58,7 +62,7 @@ jobs:
- name: Benchmark each tool
env:
RUNS: ${{ inputs.runs || 100 }}
run: benches/run.sh
run: tools/scripts/benchmarks.sh

- name: Show results
run: cat target/benchmarks/summary.md >> "$GITHUB_STEP_SUMMARY"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

- name: Smoke-test wheel in a clean environment
shell: bash
run: bash scripts/smoke-wheel.sh dist/*.whl
run: bash tools/scripts/smoke-wheel.sh dist/*.whl

style:
name: Rust / style
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
uses: release-plz/action@2eb1d8bcb770b4c48ccfaad919734b38b51958c9 # v0.5.131
with:
command: release
config: tools/config/release-plz.toml
dry_run: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -101,14 +102,15 @@ jobs:
HEAD_REPOSITORY: ${{ github.event.pull_request.head.repo.full_name }}
MERGED: ${{ github.event.pull_request.merged }}
REPOSITORY: ${{ github.repository }}
run: bash scripts/release.sh authorize-release
run: bash tools/scripts/release.sh authorize-release

- name: Create semantic tag and GitHub release
if: steps.authorize.outputs.authorized == 'true'
id: release
uses: release-plz/action@2eb1d8bcb770b4c48ccfaad919734b38b51958c9 # v0.5.131
with:
command: release
config: tools/config/release-plz.toml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -136,7 +138,7 @@ jobs:
env:
MANUAL_TAG: ${{ inputs.tag }}
RELEASES: ${{ needs.semantic.outputs.releases }}
run: bash scripts/release.sh select-tag
run: bash tools/scripts/release.sh select-tag

metadata:
name: Validate release
Expand All @@ -159,7 +161,7 @@ jobs:
shell: bash
env:
TAG: ${{ needs.select.outputs.tag }}
run: bash scripts/release.sh validate-metadata
run: bash tools/scripts/release.sh validate-metadata

wheels:
name: Wheel / ${{ matrix.target }}
Expand Down Expand Up @@ -201,7 +203,7 @@ jobs:

- name: Smoke-test wheel in a clean environment
shell: bash
run: bash scripts/smoke-wheel.sh dist/*.whl
run: bash tools/scripts/smoke-wheel.sh dist/*.whl

- name: Store wheel
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
Expand Down Expand Up @@ -239,15 +241,15 @@ jobs:
shell: bash
env:
VERSION: ${{ needs.metadata.outputs.version }}
run: bash scripts/release.sh write-checksums
run: bash tools/scripts/release.sh write-checksums

- name: Reconcile wheels and checksums
shell: bash
env:
GH_TOKEN: ${{ github.token }}
REPOSITORY: ${{ github.repository }}
TAG: ${{ needs.metadata.outputs.tag }}
run: bash scripts/release.sh reconcile-github
run: bash tools/scripts/release.sh reconcile-github

- name: Attest wheels
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
Expand Down Expand Up @@ -306,7 +308,7 @@ jobs:
shell: bash
env:
VERSION: ${{ needs.metadata.outputs.version }}
run: bash scripts/release.sh verify-pypi
run: bash tools/scripts/release.sh verify-pypi

release-pr:
name: Prepare next semantic release
Expand Down Expand Up @@ -349,4 +351,4 @@ jobs:
BASE_SHA: ${{ github.event.pull_request.merge_commit_sha }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPOSITORY: ${{ github.repository }}
run: bash scripts/release.sh prepare-pr
run: bash tools/scripts/release.sh prepare-pr
2 changes: 1 addition & 1 deletion benches/apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Run the same benchmark used by CI:

```sh
cargo build --release --locked
RUNS=100 WARMUP=20 bash benches/run.sh
RUNS=100 WARMUP=20 bash tools/scripts/benchmarks.sh
```

Hyperfine JSON, Markdown, and stripped binary sizes are written below ignored
Expand Down
4 changes: 2 additions & 2 deletions benches/fetch.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ cmake -S research/fastfetch -B research/fastfetch/build -DCMAKE_BUILD_TYPE=Relea
cmake --build research/fastfetch/build --config Release
cargo build --release --manifest-path research/macchina/Cargo.toml
make -C research/cpufetch
benches/compare-fetch.sh
tools/scripts/compare-fetch.sh
```

Set `FETCH`, `FASTFETCH`, `MACCHINA`, and `CPUFETCH` when binaries live outside
their documented defaults. Results are written below ignored `target/benchmarks`.
The system and combined tables used the default `RUNS=500`; the separately
reported CPU-only comparison used `RUNS=1000 benches/compare-fetch.sh` and its
reported CPU-only comparison used `RUNS=1000 tools/scripts/compare-fetch.sh` and its
`target/benchmarks/cpu.json` result. Build flags and available system libraries
can change competitor features and timings, so compare results only from the
same host and build session.
2 changes: 1 addition & 1 deletion benches/games.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ for eleven game engines and cross-platform terminal input.
Run the same benchmark used by CI:

```sh
RUNS=100 WARMUP=20 bash benches/run.sh
RUNS=100 WARMUP=20 bash tools/scripts/benchmarks.sh
```

Hyperfine JSON, Markdown, and binary sizes are written to
Expand Down
2 changes: 1 addition & 1 deletion benches/lazybox.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Run 100 measured launches after 20 warmups and record all three packaged tools:

```sh
cargo build --release --locked
RUNS=100 WARMUP=20 bash benches/run.sh
RUNS=100 WARMUP=20 bash tools/scripts/benchmarks.sh
```

Results and stripped binary sizes are written below `target/benchmarks/`.
Expand Down
2 changes: 1 addition & 1 deletion benches/science.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Run the same benchmark used by CI:

```sh
cargo build --release --locked
RUNS=100 WARMUP=20 bash benches/run.sh
RUNS=100 WARMUP=20 bash tools/scripts/benchmarks.sh
```

Hyperfine JSON, Markdown, and stripped binary sizes are written below
Expand Down
2 changes: 1 addition & 1 deletion benches/screensaver.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Run the same benchmark used by CI:

```sh
cargo build --release --locked
RUNS=100 WARMUP=20 bash benches/run.sh
RUNS=100 WARMUP=20 bash tools/scripts/benchmarks.sh
```

Hyperfine JSON, Markdown, and stripped binary sizes are written below ignored
Expand Down
4 changes: 2 additions & 2 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ ShellCheck 0.11.0:

```sh
actionlint
shellcheck scripts/*.sh benches/*.sh
shellcheck tools/scripts/*.sh
```

For a performance change, install Hyperfine 1.20.0 and run
`benches/run.sh` on the same host before and after. Include the command,
`tools/scripts/benchmarks.sh` on the same host before and after. Include the command,
sample count, central result, spread, and binary size in the pull request.

## Change rules
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion benches/run.sh → tools/scripts/benchmarks.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail

project=$(CDPATH='' cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)
project=$(CDPATH='' cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)
runs=${RUNS:-100}
warmup=${WARMUP:-20}
output="$project/target/benchmarks"
Expand Down
3 changes: 3 additions & 0 deletions benches/compare-fetch.sh → tools/scripts/compare-fetch.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/usr/bin/env bash
set -euo pipefail

project=$(CDPATH='' cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)
cd "$project"

runs=${RUNS:-500}
fetch=${FETCH:-target/release/fetch}
fastfetch=${FASTFETCH:-research/fastfetch/build/fastfetch}
Expand Down
6 changes: 3 additions & 3 deletions scripts/release.sh → tools/scripts/release.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail

project=$(CDPATH='' cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)
project=$(CDPATH='' cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)
cd "$project"

fail() {
Expand Down Expand Up @@ -134,7 +134,7 @@ prepare_pr() {
local -a open_branches=()
: "${BASE_SHA:?}"
: "${REPOSITORY:?}"
release-plz update --config release-plz.toml \
release-plz update --config tools/config/release-plz.toml \
--repo-url "https://github.com/$REPOSITORY"
if git diff --quiet; then
echo "release: no unreleased changes"
Expand All @@ -159,7 +159,7 @@ prepare_pr() {
git fetch origin "$branch"
git switch -c "$branch" --track "origin/$branch"
git merge --no-edit "$BASE_SHA"
release-plz update --config release-plz.toml \
release-plz update --config tools/config/release-plz.toml \
--repo-url "https://github.com/$REPOSITORY"
elif git ls-remote --exit-code --heads origin "$branch" >/dev/null; then
fail "$branch already exists; reopen its pull request or remove it explicitly"
Expand Down
File renamed without changes.
Loading