-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(toml): Use taplo for toml formatting
- Loading branch information
Showing
8 changed files
with
70 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[formatting] | ||
indent_string = " " | ||
reorder_arrays = true | ||
reorder_keys = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,28 +5,28 @@ resolver = "2" | |
|
||
[workspace.package] | ||
authors = ["Arne Beer <[email protected]>"] | ||
edition = "2021" | ||
homepage = "https://github.com/nukesor/pueue" | ||
repository = "https://github.com/nukesor/pueue" | ||
license = "MIT OR Apache-2.0" | ||
edition = "2021" | ||
repository = "https://github.com/nukesor/pueue" | ||
rust-version = "1.70" | ||
|
||
[workspace.dependencies] | ||
# Chrono version is hard pinned to a specific version. | ||
# See https://github.com/Nukesor/pueue/issues/534 | ||
anyhow = "1" | ||
better-panic = "0.3" | ||
chrono = { version = "0.4", features = ["serde"] } | ||
command-group = "5" | ||
handlebars = "5.1" | ||
log = "0.4" | ||
pretty_assertions = "1" | ||
serde = { version = "1.0", features = ["derive"] } | ||
serde_json = "1.0" | ||
serde_yaml = "0.9" | ||
snap = "1.1" | ||
strum = { version = "0.26", features = ["derive"] } | ||
tokio = { version = "1.36", features = ["rt-multi-thread", "time", "io-std"] } | ||
handlebars = "5.1" | ||
anyhow = "1" | ||
better-panic = "0.3" | ||
pretty_assertions = "1" | ||
tokio = { version = "1.36", features = ["io-std", "rt-multi-thread", "time"] } | ||
|
||
[profile.release] | ||
codegen-units = 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,28 @@ | ||
[target.x86_64-unknown-linux-musl] | ||
image = "ghcr.io/cross-rs/x86_64-unknown-linux-musl:main" | ||
pre-build = [ | ||
""" | ||
pre-build = [""" | ||
dpkg --add-architecture amd64 && \ | ||
apt-get update && \ | ||
apt-get install --assume-yes lld clang | ||
""" | ||
] | ||
"""] | ||
|
||
[target.aarch64-unknown-linux-musl] | ||
image = "ghcr.io/cross-rs/aarch64-unknown-linux-musl:main" | ||
pre-build = [ | ||
""" | ||
pre-build = [""" | ||
apt-get update && \ | ||
apt-get install --assume-yes lld clang | ||
""" | ||
] | ||
"""] | ||
|
||
[target.armv7-unknown-linux-musleabihf] | ||
image = "ghcr.io/cross-rs/armv7-unknown-linux-musleabihf:main" | ||
pre-build = [ | ||
""" | ||
pre-build = [""" | ||
apt-get update && \ | ||
apt-get install --assume-yes lld clang | ||
""" | ||
] | ||
"""] | ||
|
||
[target.arm-unknown-linux-musleabihf] | ||
image = "ghcr.io/cross-rs/arm-unknown-linux-musleabihf:main" | ||
pre-build = [ | ||
""" | ||
pre-build = [""" | ||
apt-get update && \ | ||
apt-get install --assume-yes lld clang | ||
""" | ||
] | ||
"""] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,39 @@ | ||
# Bump all deps, including incompatible version upgrades | ||
bump: | ||
just ensure_installed upgrade | ||
just ensure-command cargo-upgrade | ||
cargo update | ||
cargo upgrade --incompatible | ||
cargo test --workspace | ||
|
||
# Run the test suite with nexttest | ||
# Run the test suite with nextest | ||
nextest: | ||
just ensure_installed nextest | ||
just ensure-command cargo-nextest | ||
cargo nextest run --workspace | ||
|
||
# If you change anything in here, make sure to also adjust the lint CI job! | ||
lint: | ||
just ensure_installed sort | ||
just ensure-command cargo-nextest | ||
cargo fmt --all -- --check | ||
cargo sort --workspace --check | ||
taplo format --check | ||
cargo clippy --tests --workspace -- -D warnings | ||
|
||
format: | ||
just ensure_installed sort | ||
just ensure-command taplo | ||
cargo fmt | ||
cargo sort --workspace | ||
|
||
ensure_installed *args: | ||
#!/bin/bash | ||
cargo --list | grep -q {{ args }} | ||
if [[ $? -ne 0 ]]; then | ||
echo "error: cargo-{{ args }} is not installed" | ||
exit 1 | ||
fi | ||
taplo format | ||
|
||
|
||
# Ensures that one or more required commands are installed | ||
ensure-command +command: | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
read -r -a commands <<< "{{ command }}" | ||
|
||
for cmd in "${commands[@]}"; do | ||
if ! command -v "$cmd" > /dev/null 2>&1 ; then | ||
printf "Couldn't find required executable '%s'\n" "$cmd" >&2 | ||
exit 1 | ||
fi | ||
done | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters