Skip to content

Commit e66bf8d

Browse files
v8.0.0-beta.3 (#154)
* version bump for next release * pipeline cache tweaks, it's too big Jim * Allow build output override with environment variable of the same name * rustfmt * Fixed broken tests due to environment variable being set for docs * Tweaks to caching * Some auditing * msrv to 1.64 for git-repository * remove audit action, not find auditdb * try to fix new gitoxide issue creating repo * try to fix clone * Fix lint error * Fix git_output repo creation * Added audit workflow * env var override for cargo, rustc, and sysinfo * Support env overrides for gitcl, git2, and gix * docs update * Docs update, all tests to serial * Moved override tests * Re-order git2 maps entry so sha runs before describe which may fail Co-authored-by: Jason Ozias <[email protected]>
1 parent aeda890 commit e66bf8d

20 files changed

+1255
-334
lines changed

.github/workflows/audit.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
on:
2+
# Trigger the workflow on push to master or any pull request
3+
# Ignore all tags
4+
push:
5+
branches:
6+
- master
7+
tags-ignore:
8+
- "*"
9+
pull_request:
10+
branches:
11+
- "*"
12+
tags-ignore:
13+
- "*"
14+
schedule:
15+
# * is a special character in YAML so you have to quote this string
16+
- cron: "23 3 * * *"
17+
18+
name: 💣 Audit 💣
19+
20+
jobs:
21+
audit-check:
22+
runs-on: ubuntu-latest
23+
name: 💣 Audit 💣
24+
steps:
25+
- name: ✅ Checkout ✅
26+
uses: actions/checkout@v3
27+
- name: 💣 Audit 💣
28+
id: audit
29+
uses: rustyhorde/audit-check@v1
30+
with:
31+
token: ${{ secrets.GITHUB_TOKEN }}
32+
deny: 'warnings'
33+
create_issue: 'true'

.github/workflows/main.yml

+42-51
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,16 @@ on:
1515
# * is a special character in YAML so you have to quote this string
1616
- cron: "13 3 * * *"
1717

18-
name: CI
18+
name: 🦀 Rust 🦀
1919

2020
jobs:
2121
rustfmt:
22-
name: ☢️ Formatting ☢️
22+
name: 📌 Formatting 📌
2323
runs-on: ubuntu-latest
2424
steps:
25-
- uses: actions/checkout@v3
26-
- uses: actions/cache@v3
27-
with:
28-
path: |
29-
~/.cargo/bin/
30-
~/.cargo/registry/index/
31-
~/.cargo/registry/cache/
32-
~/.cargo/git/db/
33-
target/
34-
key: ${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
35-
- name: ☢️ Rustfmt Check ☢️
25+
- name: ✅ Checkout ✅
26+
uses: actions/checkout@v3
27+
- name: ⭕ Rustfmt Check ⭕
3628
run: cargo fmt --all -- --check
3729
lints-linux:
3830
name: 🕳️ Lints Linux 🕳️
@@ -42,26 +34,26 @@ jobs:
4234
matrix:
4335
include:
4436
- os: ubuntu-latest
45-
rust: "1.62.0"
37+
rust: "1.64.0"
4638
- os: ubuntu-latest
4739
rust: stable
4840
- os: ubuntu-latest
4941
rust: beta
5042
- os: ubuntu-latest
5143
rust: nightly
5244
steps:
53-
- uses: actions/checkout@v3
54-
- uses: actions/cache@v3
45+
- name: ✅ Checkout ✅
46+
uses: actions/checkout@v3
47+
- name: 💵 Cache 💵
48+
uses: actions/cache@v3
5549
with:
5650
path: |
5751
~/.cargo/bin/
5852
~/.cargo/registry/index/
5953
~/.cargo/registry/cache/
6054
~/.cargo/git/db/
6155
target/
62-
key: ${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}
63-
restore-keys: |
64-
${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
56+
key: ${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock', '**/main.yml') }}
6557
- name: 🧰 Toolchain 🧰
6658
run: |
6759
rustup toolchain remove ${{ matrix.rust }}
@@ -70,7 +62,7 @@ jobs:
7062
rm -f ~/.cargo/bin/cargo-clippy
7163
rustup toolchain install ${{ matrix.rust }} --profile default
7264
rustup default ${{ matrix.rust }}
73-
- name: Clippy
65+
- name: 📎 Clippy 📎
7466
run: |
7567
cargo clippy -p vergen --all-targets --features build,cargo,git,gitcl,rustc,si -- -Dwarnings
7668
cargo clippy -p vergen --all-targets --features build,cargo,git,git2,rustc,si -- -Dwarnings
@@ -84,31 +76,32 @@ jobs:
8476
matrix:
8577
include:
8678
- os: macos-latest
87-
rust: "1.62.0"
79+
rust: "1.64.0"
8880
- os: macos-latest
8981
rust: stable
9082
- os: macos-latest
9183
rust: beta
9284
- os: macos-latest
9385
rust: nightly
9486
steps:
95-
- uses: actions/checkout@v3
96-
- uses: actions/cache@v3
87+
- name: ✅ Checkout ✅
88+
uses: actions/checkout@v3
89+
- name: 💵 Cache 💵
90+
uses: actions/cache@v3
9791
with:
9892
path: |
9993
~/.cargo/bin/
10094
~/.cargo/registry/index/
10195
~/.cargo/registry/cache/
10296
~/.cargo/git/db/
103-
key: ${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}
104-
restore-keys: |
105-
${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
97+
target/
98+
key: ${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock', '**/main.yml') }}
10699
- name: 🧰 Toolchain 🧰
107100
run: |
108101
rustup toolchain remove ${{ matrix.rust }}
109102
rustup toolchain install ${{ matrix.rust }} --profile default
110103
rustup default ${{ matrix.rust }}
111-
- name: Clippy
104+
- name: 📎 Clippy 📎
112105
run: |
113106
cargo clippy -p vergen --all-targets --features build,cargo,git,gitcl,rustc,si -- -Dwarnings
114107
cargo clippy -p vergen --all-targets --features build,cargo,git,git2,rustc,si -- -Dwarnings
@@ -130,23 +123,24 @@ jobs:
130123
- os: windows-latest
131124
rust: nightly
132125
steps:
133-
- uses: actions/checkout@v3
134-
- uses: actions/cache@v3
126+
- name: ✅ Checkout ✅
127+
uses: actions/checkout@v3
128+
- name: 💵 Cache 💵
129+
uses: actions/cache@v3
135130
with:
136131
path: |
137132
~/.cargo/bin/
138133
~/.cargo/registry/index/
139134
~/.cargo/registry/cache/
140135
~/.cargo/git/db/
141-
key: ${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}
142-
restore-keys: |
143-
${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
136+
target/
137+
key: ${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock', '**/main.yml') }}
144138
- name: 🧰 Toolchain 🧰
145139
run: |
146140
rustup toolchain remove ${{ matrix.rust }}
147141
rustup toolchain install ${{ matrix.rust }} --profile default
148142
rustup default ${{ matrix.rust }}
149-
- name: Clippy
143+
- name: 📎 Clippy 📎
150144
run: |
151145
cargo clippy -p vergen --all-targets --features build,cargo,git,gitcl,rustc,si -- -Dwarnings
152146
cargo clippy -p vergen --all-targets --features build,cargo,git,git2,rustc,si -- -Dwarnings
@@ -160,7 +154,7 @@ jobs:
160154
matrix:
161155
include:
162156
- os: ubuntu-latest
163-
rust: "1.62.0"
157+
rust: "1.64.0"
164158
target: x86_64-unknown-linux-gnu
165159
- os: ubuntu-latest
166160
rust: stable
@@ -172,7 +166,7 @@ jobs:
172166
rust: nightly
173167
target: x86_64-unknown-linux-gnu
174168
steps:
175-
- name: ✔️ Checkout ✔️
169+
- name: Checkout
176170
uses: actions/checkout@v3
177171
- name: 💵 Cache 💵
178172
uses: actions/cache@v3
@@ -182,11 +176,10 @@ jobs:
182176
~/.cargo/registry/index/
183177
~/.cargo/registry/cache/
184178
~/.cargo/git/db/
185-
target/
186-
key: ${{ runner.os }}-${{ matrix.rust }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
179+
target/coverage
180+
key: ${{ runner.os }}-${{ matrix.rust }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock', '**/main.yml') }}
187181
restore-keys: |
188-
${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}
189-
${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
182+
${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock', '**/main.yml') }}
190183
- name: 🧰 Toolchain 🧰
191184
run: |
192185
rustup toolchain remove ${{ matrix.rust }}-${{ matrix.target }}
@@ -198,7 +191,7 @@ jobs:
198191
cargo binstall -V || cargo install cargo-binstall
199192
rustup override remove
200193
- name: 💾 Install (tarpaulin, all-features) 💾
201-
run: cargo binstall --no-confirm --no-symlinks --force cargo-tarpaulin cargo-all-features
194+
run: cargo binstall --no-confirm --no-symlinks cargo-tarpaulin cargo-all-features
202195
- name: 🧪 Test 🧪
203196
run: |
204197
cargo test-all-features
@@ -229,7 +222,7 @@ jobs:
229222
matrix:
230223
include:
231224
- os: macos-latest
232-
rust: "1.62.0"
225+
rust: "1.64.0"
233226
target: x86_64-apple-darwin
234227
- os: macos-latest
235228
rust: stable
@@ -241,7 +234,7 @@ jobs:
241234
rust: nightly
242235
target: x86_64-apple-darwin
243236
steps:
244-
- name: ✔️ Checkout ✔️
237+
- name: Checkout
245238
uses: actions/checkout@v3
246239
- name: 💵 Cache 💵
247240
uses: actions/cache@v3
@@ -251,10 +244,9 @@ jobs:
251244
~/.cargo/registry/index/
252245
~/.cargo/registry/cache/
253246
~/.cargo/git/db/
254-
key: ${{ runner.os }}-${{ matrix.rust }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
247+
key: ${{ runner.os }}-${{ matrix.rust }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock', '**/main.yml') }}
255248
restore-keys: |
256-
${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}
257-
${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
249+
${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock', '**/main.yml') }}
258250
- name: 🧰 Toolchain 🧰
259251
run: |
260252
rustup toolchain remove ${{ matrix.rust }}-${{ matrix.target }}
@@ -266,7 +258,7 @@ jobs:
266258
cargo binstall -V || cargo install cargo-binstall
267259
rustup override remove
268260
- name: 💾 Install (all-features) 💾
269-
run: cargo binstall --no-confirm --no-symlinks --force cargo-all-features
261+
run: cargo binstall --no-confirm --no-symlinks cargo-all-features
270262
- name: 🧪 Test 🧪
271263
run: |
272264
cargo test-all-features
@@ -313,7 +305,7 @@ jobs:
313305
rust: nightly
314306
target: x86_64-pc-windows-gnu
315307
steps:
316-
- name: ✔️ Checkout ✔️
308+
- name: Checkout
317309
uses: actions/checkout@v3
318310
- name: 💵 Cache 💵
319311
uses: actions/cache@v3
@@ -323,10 +315,9 @@ jobs:
323315
~/.cargo/registry/index/
324316
~/.cargo/registry/cache/
325317
~/.cargo/git/db/
326-
key: ${{ runner.os }}-${{ matrix.rust }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
318+
key: ${{ runner.os }}-${{ matrix.rust }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock', '**/main.yml') }}
327319
restore-keys: |
328-
${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}
329-
${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
320+
${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock', '**/main.yml') }}
330321
- name: 🧰 Toolchain 🧰
331322
run: |
332323
rustup toolchain remove ${{ matrix.rust }}-${{ matrix.target }}
@@ -338,7 +329,7 @@ jobs:
338329
cargo binstall -V || cargo install cargo-binstall
339330
rustup override remove
340331
- name: 💾 Install (all-features) 💾
341-
run: cargo binstall --no-confirm --no-symlinks --force cargo-all-features
332+
run: cargo binstall --no-confirm --no-symlinks cargo-all-features
342333
- name: 🧪 Test 🧪
343334
run: |
344335
cargo test-all-features

.pants-ignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"ignore": [{ "id": "sonatype-2021-1715", "reason": "This was fixed" }]
3+
}

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"rust-analyzer.cargo.features": [
3-
"build","cargo","git","gitcl","rustc","si","color","serde","trace"
3+
"build","cargo","git","gix","rustc","si","color","serde","trace"
44
]
55
}

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Special thanks to the sponsors of this project
3434
If you wish to refer to version 7 you can find that branch [`here`](https://github.com/rustyhorde/vergen/tree/legacy/v7)
3535

3636
## MSRV
37-
The current minimum supported rust version is 1.62.0 for non-Windows platforms
37+
The current minimum supported rust version is 1.64.0 for non-Windows platforms
3838
The current minimum supported rust version is 1.64.0 for Windows platforms
3939

4040
## Example Usage

vergen-pretty/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ tracing = { version = "0.1.37", features = [
3737
[build-dependencies]
3838
anyhow = "1.0.68"
3939
rustversion = "1.0.11"
40-
vergen = { version = "8.0.0-beta.0", path = "../vergen", features = [
40+
vergen = { version = "8.0.0-beta.3", path = "../vergen", features = [
4141
"build",
4242
"cargo",
4343
"git",

vergen/Cargo.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ license = "MIT OR Apache-2.0"
1010
name = "vergen"
1111
readme = "README.md"
1212
repository = "https://github.com/rustyhorde/vergen"
13-
version = "8.0.0-beta.2"
13+
version = "8.0.0-beta.3"
1414

1515
[package.metadata.cargo-all-features]
1616
denylist = [
@@ -40,9 +40,9 @@ si = ["sysinfo"]
4040
[dependencies]
4141
anyhow = "1.0.68"
4242
git2-rs = { version = "0.16.0", package = "git2", optional = true, default-features = false }
43-
git-repository = { version = "0.31.0", optional = true, default-features = false }
43+
git-repository = { version = "0.33.0", optional = true, default-features = false }
4444
rustc_version = { version = "0.4.0", optional = true }
45-
sysinfo = { version = "0.27.2", optional = true, default-features = false }
45+
sysinfo = { version = "0.27.5", optional = true, default-features = false }
4646
time = { version = "0.3.17", features = [
4747
"formatting",
4848
"parsing",
@@ -52,11 +52,11 @@ time = { version = "0.3.17", features = [
5252
rustversion = "1.0.11"
5353

5454
[dev-dependencies]
55-
git-repository = { version = "0.31.0", default-features = false, features = [
55+
git-repository = { version = "0.33.0", default-features = false, features = [
5656
"blocking-network-client",
5757
] }
5858
lazy_static = "1.4.0"
59-
regex = "1.7.0"
59+
regex = "1.7.1"
6060
serial_test = "0.10.0"
6161

6262
[package.metadata.docs.rs]

vergen/build.rs

-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
pub fn main() {
22
println!("cargo:rerun-if-changed=build.rs");
3-
// These are set for some documentation tests
4-
println!("cargo:rustc-env=VERGEN_BUILD_TIMESTAMP=2022-12-28T21:56:23.764785796Z");
5-
println!("cargo:rustc-env=VERGEN_GIT_DESCRIBE=7.4.4-16-g2f35555");
63
nightly();
74
beta();
85
stable();

vergen/src/emitter.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ pub(crate) mod test {
647647
}
648648

649649
#[test]
650-
#[serial_test::parallel]
650+
#[serial_test::serial]
651651
fn default_is_no_emit() -> Result<()> {
652652
let mut stdout_buf = vec![];
653653
let _ = EmitBuilder::builder().emit_to(&mut stdout_buf)?;
@@ -656,7 +656,7 @@ pub(crate) mod test {
656656
}
657657

658658
#[test]
659-
#[serial_test::parallel]
659+
#[serial_test::serial]
660660
fn gen_is_ok() -> Result<()> {
661661
assert!(EmitBuilder::builder().emit().is_ok());
662662
Ok(())

0 commit comments

Comments
 (0)