Skip to content

Commit 401f77a

Browse files
committed
Big refactor
1 parent 6655e48 commit 401f77a

File tree

17 files changed

+869
-486
lines changed

17 files changed

+869
-486
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
day: tuesday

.github/renovate.json5

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"schedule": "every 6 weeks on tuesday",
4+
"customManagers": [
5+
{
6+
"customType": "regex",
7+
"fileMatch": [
8+
"Cargo.toml$"
9+
],
10+
"matchStrings": [
11+
"rust-version = \"(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)\""
12+
],
13+
"depNameTemplate": "rust-version",
14+
"packageNameTemplate": "rust-lang/rust",
15+
"datasourceTemplate": "github-releases"
16+
}
17+
],
18+
"packageRules": [
19+
{
20+
"commitMessageTopic": "bump rust-version",
21+
"matchManagers": [
22+
"custom.regex"
23+
],
24+
"matchPackageNames": [
25+
"rust-version"
26+
],
27+
"extractVersion": "^(?<version>\\d+\\.\\d+)", // drop patch version
28+
"schedule": [
29+
"* * * * *"
30+
],
31+
"minimumReleaseAge": "6 months",
32+
"internalChecksFilter": "strict"
33+
}
34+
]
35+
}

.github/workflows/automerge.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Auto-merge safe bot PRs
2+
on: pull_request
3+
4+
permissions:
5+
contents: write
6+
pull-requests: write
7+
8+
jobs:
9+
dependabot:
10+
runs-on: ubuntu-latest
11+
if: github.actor == 'dependabot[bot]'
12+
steps:
13+
- name: Enable auto-merge
14+
run: gh pr merge --auto --merge "$PR_URL"
15+
env:
16+
PR_URL: ${{github.event.pull_request.html_url}}
17+
18+
renovate:
19+
runs-on: ubuntu-latest
20+
if: github.actor == 'renovate[bot]'
21+
steps:
22+
- name: Enable auto-merge
23+
run: gh pr merge --auto --merge "$PR_URL"
24+
env:
25+
PR_URL: ${{github.event.pull_request.html_url}}

.github/workflows/ci.yaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: CI
2+
on:
3+
pull_request:
4+
merge_group:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
tests:
11+
name: Tests
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
toolchain: ["stable", "stable 6 months ago"]
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
- name: Install Rust toolchain
20+
uses: dtolnay/rust-toolchain@stable
21+
with:
22+
toolchain: ${{ matrix.toolchain }}
23+
- name: Build tests
24+
run: cargo test --workspace --no-run
25+
- name: Run tests
26+
run: cargo test --workspace
27+
28+
style:
29+
name: Style
30+
runs-on: ubuntu-latest
31+
env:
32+
RUSTFLAGS: -Dwarnings
33+
RUSTDOCFLAGS: -Dwarnings
34+
steps:
35+
- name: Checkout repository
36+
uses: actions/checkout@v4
37+
- name: Install Rust toolchain
38+
uses: dtolnay/rust-toolchain@nightly
39+
with:
40+
components: rustfmt, clippy
41+
- name: Install cargo-docs-rs
42+
uses: dtolnay/install@cargo-docs-rs
43+
- name: Check docs
44+
run: cargo docs-rs
45+
- name: Check lints
46+
run: cargo clippy
47+
- name: Check fmt
48+
run: cargo fmt -- --check
49+
50+
semver:
51+
name: API
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Checkout repository
55+
uses: actions/checkout@v4
56+
- name: Semver checks
57+
uses: obi1kenobi/cargo-semver-checks-action@v2
58+
with:
59+
package: build-rs

.github/workflows/publish.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Publish
2+
on:
3+
push:
4+
tags:
5+
- 'v*'
6+
7+
jobs:
8+
publish:
9+
name: Publish
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
- name: Install Rust toolchain
15+
uses: dtolnay/rust-toolchain@stable
16+
- name: Publish
17+
run: cargo publish
18+
env:
19+
CARGO_REGISTRY_TOKEN: ${{secrets.CARGO_REGISTRY_TOKEN}}

.github/workflows/publish.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
/target
2-
/Cargo.lock

Cargo.lock

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
[package]
22
name = "build-rs"
3-
version = "0.1.2"
3+
version = "0.2.0"
44
edition = "2021"
5+
rust-version = "1.70"
6+
publish = false
57

6-
description = "Convenience wrapper for cargo buildscript input/output"
7-
repository = "https://github.com/cad97/build-rs"
8-
license = "MIT OR Apache-2.0 OR 0BSD OR CC0-1.0 OR CDDL-1.0 OR MIT-0 OR Unlicense OR WTFPL"
9-
keywords = ["buildscript","build-script","cargo"]
10-
categories = ["development-tools::build-utils"]
8+
[features]
119

12-
[lib]
13-
name = "build"
10+
## Experimental API. This feature flag is **NOT** semver stable.
11+
unstable = []
12+
13+
[workspace]
14+
members = ["test-lib"]

README.md

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)