Skip to content

Commit c5b61b7

Browse files
authored
Version 9 (#300)
* version bump for next release * Fixed lint from stable * fix tarpaulin config * fix tarpaulin run command * work on vergen-gix tests * fixed lint issue * Some refactors to help with broken tests with default feature set * Renamed repo_util to test_util * Work on rustc implementation * Added come test coverage * sysinfo implementation * Re-export vergen from vergen-gix * Converted vergen-pretty to use vergen-gix to test * More test coverage * vergen-git2 initial implementation * Fix tarpaulin for vergen-git2 * Updated the tarpauling commands to be more concise * removed tarpaulin.toml from vergen-lib * test coverage for vergen-git2 * Fixed tarpaulin command for vergen-pretty * Updated gix to latest, more coverage tweaks * keys coverage * Forgot to add vergen-lib cobertura.xml to upload * vergen-gitcl implementaion * Upload vergen-gitcl cobertura.xml * Add CODECOV_TOKEN to see if fixes broken upload * Lets try v4 * Back to v3 * Moved coverage to own job * code coverage switch to llvm-cov * rustfmt * code coverage work * Fix lints, fix broken windows test * Fixed broken windows tests * Removed tarpaulin references, fix report command * Fixed unstable feature issue * Code coverage work * lint fix * redundant clone in test * More coverage work * removed unused lint fix * More coverage tweaks * Fix keys test import for stable,beta * Fixed keys when not using build,cargo feature * Fixed vergen-pretty tests, updated keys coverage * Fix to color feature test in vergen-pretty * Update main.yml to include all coverage tasks * More coverage * Changed coverage output to get better reporting in codecov * Update thresholds * Updated github actions to latest versions * Documentation, added support for custom instruction generation * Some test for custom instruction generation * Added empty tests for vergen-pretty * vergen-lib docs * vergen-pretty docs * Fixed doc issue when color feature not enabled. * docs, vergen-git2 tweaks * vergen-gi* docs pass, tweaks to builder * Fixed bug in vergen-pretty * Workflow stuff * Try pages update at end of coverage * Changed if condition, removed cache wasn't working. * comment out the pages stuff * documentation, re-export AddCustomEntries, license files in each library * added vergen-lib README.md * tweaks to Cargo.toml * prepare vergen-git2 for publish * prepare vergen-gitcl for publish * prepare vergen-gix for publish * more README.md work * more README.md work
1 parent 375d671 commit c5b61b7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+11053
-6026
lines changed

.github/codecov.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
# basic
6+
target: 90%
7+
threshold: 10%
8+
if_ci_failed: error

.github/workflows/main.yml

+117-105
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ concurrency:
1717
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1818
cancel-in-progress: true
1919

20+
# permissions:
21+
# contents: read
22+
# pages: write
23+
# id-token: write
24+
2025
env:
2126
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
2227

@@ -28,7 +33,7 @@ jobs:
2833
runs-on: ubuntu-latest
2934
steps:
3035
- name: ✅ Checkout ✅
31-
uses: actions/checkout@v3
36+
uses: actions/checkout@v4
3237
- name: ⭕ Rustfmt Check ⭕
3338
run: cargo fmt --all -- --check
3439
lints-linux:
@@ -48,17 +53,7 @@ jobs:
4853
rust: nightly
4954
steps:
5055
- name: ✅ Checkout ✅
51-
uses: actions/checkout@v3
52-
- name: 💵 Cache 💵
53-
uses: actions/cache@v3
54-
with:
55-
path: |
56-
~/.cargo/bin/
57-
~/.cargo/registry/index/
58-
~/.cargo/registry/cache/
59-
~/.cargo/git/db/
60-
target/
61-
key: ${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock', '**/main.yml') }}
56+
uses: actions/checkout@v4
6257
- name: 🧰 Toolchain 🧰
6358
run: |
6459
rustup toolchain remove ${{ matrix.rust }}
@@ -70,11 +65,13 @@ jobs:
7065
- name: 📎 Clippy 📎
7166
run: |
7267
cargo update
73-
cargo clippy -p vergen --all-targets --features build,cargo,git,gitcl,rustc,si -- -Dwarnings
74-
cargo clippy -p vergen --all-targets --features build,cargo,git,git2,rustc,si -- -Dwarnings
75-
cargo clippy -p vergen --all-targets --features build,cargo,git,gix,rustc,si -- -Dwarnings
76-
cargo clippy -p vergen-pretty --all-targets --all-features -- -Dwarnings
77-
cargo clippy -p repo_util --all-targets --all-features -- -Dwarnings
68+
cargo clippy -p test_util --all-targets -- -Dwarnings
69+
cargo clippy -p vergen-lib --all-targets --features build,cargo,git,rustc,si -- -Dwarnings
70+
cargo clippy -p vergen --all-targets --features build,cargo,rustc,si -- -Dwarnings
71+
cargo clippy -p vergen-gix --all-targets --features build,cargo,rustc,si -- -Dwarnings
72+
cargo clippy -p vergen-git2 --all-targets --features build,cargo,rustc,si -- -Dwarnings
73+
cargo clippy -p vergen-gitcl --all-targets --features build,cargo,rustc,si -- -Dwarnings
74+
cargo clippy -p vergen-pretty --all-targets --features color,header,trace -- -Dwarnings
7875
lints-macos:
7976
name: 🕳️ Lints MacOS 🕳️
8077
needs: rustfmt
@@ -92,17 +89,7 @@ jobs:
9289
rust: nightly
9390
steps:
9491
- name: ✅ Checkout ✅
95-
uses: actions/checkout@v3
96-
- name: 💵 Cache 💵
97-
uses: actions/cache@v3
98-
with:
99-
path: |
100-
~/.cargo/bin/
101-
~/.cargo/registry/index/
102-
~/.cargo/registry/cache/
103-
~/.cargo/git/db/
104-
target/
105-
key: ${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock', '**/main.yml') }}
92+
uses: actions/checkout@v4
10693
- name: 🧰 Toolchain 🧰
10794
run: |
10895
rustup toolchain remove ${{ matrix.rust }}
@@ -111,11 +98,13 @@ jobs:
11198
- name: 📎 Clippy 📎
11299
run: |
113100
cargo update
114-
cargo clippy -p vergen --all-targets --features build,cargo,git,gitcl,rustc,si -- -Dwarnings
115-
cargo clippy -p vergen --all-targets --features build,cargo,git,git2,rustc,si -- -Dwarnings
116-
cargo clippy -p vergen --all-targets --features build,cargo,git,gix,rustc,si -- -Dwarnings
117-
cargo clippy -p vergen-pretty --all-targets --all-features -- -Dwarnings
118-
cargo clippy -p repo_util --all-targets --all-features -- -Dwarnings
101+
cargo clippy -p test_util --all-targets -- -Dwarnings
102+
cargo clippy -p vergen-lib --all-targets --features build,cargo,git,rustc,si -- -Dwarnings
103+
cargo clippy -p vergen --all-targets --features build,cargo,rustc,si -- -Dwarnings
104+
cargo clippy -p vergen-gix --all-targets --features build,cargo,rustc,si -- -Dwarnings
105+
cargo clippy -p vergen-git2 --all-targets --features build,cargo,rustc,si -- -Dwarnings
106+
cargo clippy -p vergen-gitcl --all-targets --features build,cargo,rustc,si -- -Dwarnings
107+
cargo clippy -p vergen-pretty --all-targets --features color,header,trace -- -Dwarnings
119108
lints-windows:
120109
name: 🕳️ Lints Windows 🕳️
121110
needs: rustfmt
@@ -133,17 +122,7 @@ jobs:
133122
rust: nightly
134123
steps:
135124
- name: ✅ Checkout ✅
136-
uses: actions/checkout@v3
137-
- name: 💵 Cache 💵
138-
uses: actions/cache@v3
139-
with:
140-
path: |
141-
~/.cargo/bin/
142-
~/.cargo/registry/index/
143-
~/.cargo/registry/cache/
144-
~/.cargo/git/db/
145-
target/
146-
key: ${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock', '**/main.yml') }}
125+
uses: actions/checkout@v4
147126
- name: 🧰 Toolchain 🧰
148127
run: |
149128
rustup toolchain remove ${{ matrix.rust }}
@@ -152,11 +131,13 @@ jobs:
152131
- name: 📎 Clippy 📎
153132
run: |
154133
cargo update
155-
cargo clippy -p vergen --all-targets --features build,cargo,git,gitcl,rustc,si -- -Dwarnings
156-
cargo clippy -p vergen --all-targets --features build,cargo,git,git2,rustc,si -- -Dwarnings
157-
cargo clippy -p vergen --all-targets --features build,cargo,git,gix,rustc,si -- -Dwarnings
158-
cargo clippy -p vergen-pretty --all-targets --all-features -- -Dwarnings
159-
cargo clippy -p repo_util --all-targets --all-features -- -Dwarnings
134+
cargo clippy -p test_util --all-targets -- -Dwarnings
135+
cargo clippy -p vergen-lib --all-targets --features build,cargo,git,rustc,si -- -Dwarnings
136+
cargo clippy -p vergen --all-targets --features build,cargo,rustc,si -- -Dwarnings
137+
cargo clippy -p vergen-gix --all-targets --features build,cargo,rustc,si -- -Dwarnings
138+
cargo clippy -p vergen-git2 --all-targets --features build,cargo,rustc,si -- -Dwarnings
139+
cargo clippy -p vergen-gitcl --all-targets --features build,cargo,rustc,si -- -Dwarnings
140+
cargo clippy -p vergen-pretty --all-targets --features color,header,trace -- -Dwarnings
160141
test-linux:
161142
name: 🧪 Linux 🧪
162143
needs: lints-linux
@@ -178,37 +159,21 @@ jobs:
178159
target: x86_64-unknown-linux-gnu
179160
steps:
180161
- name: ✅ Checkout ✅
181-
uses: actions/checkout@v3
182-
- name: 💵 Cache 💵
183-
uses: actions/cache@v3
184-
with:
185-
path: |
186-
~/.cargo/bin/
187-
~/.cargo/registry/index/
188-
~/.cargo/registry/cache/
189-
~/.cargo/git/db/
190-
target/coverage
191-
key: ${{ runner.os }}-${{ matrix.rust }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock', '**/main.yml') }}
192-
restore-keys: |
193-
${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock', '**/main.yml') }}
162+
uses: actions/checkout@v4
194163
- name: 🧰 Toolchain 🧰
195164
run: |
196165
rustup toolchain remove ${{ matrix.rust }}-${{ matrix.target }}
197166
rustup toolchain add ${{ matrix.rust }}-${{ matrix.target }} --profile minimal
198167
rustup default ${{ matrix.rust }}
199168
- name: 💾 Install (cargo-binstall) 💾
200169
uses: cargo-bins/cargo-binstall@main
201-
- name: 💾 Install (tarpaulin, all-features) 💾
170+
- name: 💾 Install (all-features) 💾
202171
continue-on-error: true
203-
run: cargo binstall --no-confirm --no-symlinks cargo-tarpaulin cargo-all-features
172+
run: cargo binstall --no-confirm --no-symlinks cargo-all-features
204173
- name: 🧪 Test 🧪
205174
run: |
206175
cargo update
207176
cargo test-all-features
208-
cargo test -p vergen -F build,cargo,git,gitcl,rustc,si
209-
cargo test -p vergen -F build,cargo,git,git2,rustc,si
210-
cargo test -p vergen -F build,cargo,git,gix,rustc,si
211-
cargo test -p vergen -F build,cargo,git,gitcl,git2,gitoxide,rustc,si
212177
cargo test -p vergen-pretty -F __vergen_test
213178
cargo test -p vergen-pretty -F __vergen_test,color
214179
cargo test -p vergen-pretty -F __vergen_test,trace
@@ -217,14 +182,91 @@ jobs:
217182
cargo test -p vergen-pretty -F __vergen_test,color,trace
218183
cargo test -p vergen-pretty -F __vergen_test,trace,serde
219184
cargo test -p vergen-pretty -F __vergen_test,color,serde,trace
220-
- name: 🙊 Code Coverage (vergen) 🙊
221-
run: cargo tarpaulin --config vergen/tarpaulin.toml --exclude-files vergen/src/lib.rs --exclude-files vergen-pretty/* --out xml --output-dir vergen --skip-clean --target-dir target/coverage
222-
- name: 🙊 Code Coverage (vergen-pretty) 🙊
223-
run: cargo tarpaulin --config vergen-pretty/tarpaulin.toml --exclude-files vergen-pretty/src/lib.rs --exclude-files vergen/* --out xml --output-dir vergen-pretty --skip-clean --target-dir target/coverage
185+
coverage:
186+
# environment:
187+
# name: github-pages
188+
# url: ${{ steps.deployment.outputs.page_url }}
189+
name: 🧱 Code Coverage 🧱
190+
needs: test-linux
191+
runs-on: ${{ matrix.os }}
192+
strategy:
193+
matrix:
194+
include:
195+
- os: ubuntu-latest
196+
rust: "1.70.0"
197+
target: x86_64-unknown-linux-gnu
198+
- os: ubuntu-latest
199+
rust: stable
200+
target: x86_64-unknown-linux-gnu
201+
- os: ubuntu-latest
202+
rust: beta
203+
target: x86_64-unknown-linux-gnu
204+
- os: ubuntu-latest
205+
rust: nightly
206+
target: x86_64-unknown-linux-gnu
207+
steps:
208+
- name: ✅ Checkout ✅
209+
uses: actions/checkout@v4
210+
- name: 🧰 Toolchain 🧰
211+
run: |
212+
rustup toolchain remove ${{ matrix.rust }}-${{ matrix.target }}
213+
rustup toolchain add ${{ matrix.rust }}-${{ matrix.target }} --profile minimal
214+
rustup default ${{ matrix.rust }}
215+
- name: 💾 Install (cargo-binstall) 💾
216+
uses: cargo-bins/cargo-binstall@main
217+
- name: 💾 Install (llvm-cov) 💾
218+
continue-on-error: true
219+
run: cargo binstall --no-confirm --no-symlinks cargo-llvm-cov
220+
- name: 🙊 Clean Workspace 🙊
221+
run: cargo llvm-cov clean --workspace
222+
- name: 🙊 Code Coverage (vergen-lib - default) 🙊
223+
run: cargo llvm-cov -p vergen-lib -F unstable --no-report
224+
- name: 🙊 Code Coverage (vergen-lib - all) 🙊
225+
run: cargo llvm-cov -p vergen-lib -F unstable,build,cargo,git,rustc,si --no-report
226+
- name: 🙊 Code Coverage (vergen - default) 🙊
227+
run: cargo llvm-cov -p vergen -F unstable --no-report
228+
- name: 🙊 Code Coverage (vergen - all) 🙊
229+
run: cargo llvm-cov -p vergen -F unstable,build,cargo,rustc,si --no-report
230+
- name: 🙊 Code Coverage (vergen-gix - default) 🙊
231+
run: cargo llvm-cov -p vergen-gix -F unstable --no-report
232+
- name: 🙊 Code Coverage (vergen-gix - all) 🙊
233+
run: cargo llvm-cov -p vergen-gix -F unstable,build,cargo,rustc,si --no-report
234+
- name: 🙊 Code Coverage (vergen-git2 - default) 🙊
235+
run: cargo llvm-cov -p vergen-git2 -F unstable --no-report
236+
- name: 🙊 Code Coverage (vergen-git2 - all) 🙊
237+
run: cargo llvm-cov -p vergen-git2 -F unstable,build,cargo,rustc,si --no-report
238+
- name: 🙊 Code Coverage (vergen-gitcl - default) 🙊
239+
run: cargo llvm-cov -p vergen-gitcl -F unstable --no-report
240+
- name: 🙊 Code Coverage (vergen-gitcl - all) 🙊
241+
run: cargo llvm-cov -p vergen-gitcl -F unstable,build,cargo,rustc,si --no-report
242+
- name: 🙊 Code Coverage (vergen-pretty - default) 🙊
243+
run: cargo llvm-cov -p vergen-pretty -F __vergen_test --no-report
244+
- name: 🙊 Code Coverage (vergen-pretty - all) 🙊
245+
run: cargo llvm-cov -p vergen-pretty -F __vergen_test,color,header,serde,trace --no-report
246+
- name: 🙊 Code Coverage (vergen-pretty - empty default) 🙊
247+
run: cargo llvm-cov -p vergen-pretty -F __vergen_empty_test --no-report
248+
- name: 🙊 Code Coverage (vergen-pretty - empty all) 🙊
249+
run: cargo llvm-cov -p vergen-pretty -F __vergen_empty_test,color,header,serde,trace --no-report
250+
- name: 🙊 Code Coverage Report (LCOV) 🙊
251+
run: cargo llvm-cov report --lcov --output-path lcov.info
252+
- name: 🙊 Code Coverage Report (HTML) 🙊
253+
run: cargo llvm-cov report --html
224254
- name: 🙊 Upload Code Coverage 🙊
225255
uses: codecov/codecov-action@v3
226256
with:
227-
files: ./vergen/cobertura.xml,./vergen-pretty/cobertura.xml
257+
files: ./lcov.info
258+
# - name: Setup Pages
259+
# uses: actions/configure-pages@v4
260+
# if: ${{ matrix.rust == 'nightly' }}
261+
# - name: Upload artifact
262+
# uses: actions/upload-pages-artifact@v3
263+
# if: ${{ matrix.rust == 'nightly' }}
264+
# with:
265+
# path: 'target/llvm-cov/html'
266+
# - name: Deploy to GitHub Pages
267+
# id: deployment
268+
# if: ${{ matrix.rust == 'nightly' }}
269+
# uses: actions/deploy-pages@v4
228270
test-macos:
229271
name: 🧪 MacOS 🧪
230272
needs: lints-macos
@@ -246,18 +288,7 @@ jobs:
246288
target: x86_64-apple-darwin
247289
steps:
248290
- name: ✅ Checkout ✅
249-
uses: actions/checkout@v3
250-
- name: 💵 Cache 💵
251-
uses: actions/cache@v3
252-
with:
253-
path: |
254-
~/.cargo/bin/
255-
~/.cargo/registry/index/
256-
~/.cargo/registry/cache/
257-
~/.cargo/git/db/
258-
key: ${{ runner.os }}-${{ matrix.rust }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock', '**/main.yml') }}
259-
restore-keys: |
260-
${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock', '**/main.yml') }}
291+
uses: actions/checkout@v4
261292
- name: 🧰 Toolchain 🧰
262293
run: |
263294
rustup toolchain remove ${{ matrix.rust }}-${{ matrix.target }}
@@ -272,10 +303,6 @@ jobs:
272303
run: |
273304
cargo update
274305
cargo test-all-features
275-
cargo test -p vergen -F build,cargo,git,gitcl,rustc,si
276-
cargo test -p vergen -F build,cargo,git,git2,rustc,si
277-
cargo test -p vergen -F build,cargo,git,gix,rustc,si
278-
cargo test -p vergen -F build,cargo,git,gitcl,git2,gitoxide,rustc,si
279306
cargo test -p vergen-pretty -F __vergen_test
280307
cargo test -p vergen-pretty -F __vergen_test,color
281308
cargo test -p vergen-pretty -F __vergen_test,trace
@@ -317,18 +344,7 @@ jobs:
317344
target: x86_64-pc-windows-gnu
318345
steps:
319346
- name: ✅ Checkout ✅
320-
uses: actions/checkout@v3
321-
- name: 💵 Cache 💵
322-
uses: actions/cache@v3
323-
with:
324-
path: |
325-
~/.cargo/bin/
326-
~/.cargo/registry/index/
327-
~/.cargo/registry/cache/
328-
~/.cargo/git/db/
329-
key: ${{ runner.os }}-${{ matrix.rust }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock', '**/main.yml') }}
330-
restore-keys: |
331-
${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock', '**/main.yml') }}
347+
uses: actions/checkout@v4
332348
- name: 🧰 Toolchain 🧰
333349
run: |
334350
rustup toolchain remove ${{ matrix.rust }}-${{ matrix.target }}
@@ -343,10 +359,6 @@ jobs:
343359
run: |
344360
cargo update
345361
cargo test-all-features
346-
cargo test -p vergen -F build,cargo,git,gitcl,rustc,si
347-
cargo test -p vergen -F build,cargo,git,git2,rustc,si
348-
cargo test -p vergen -F build,cargo,git,gix,rustc,si
349-
cargo test -p vergen -F build,cargo,git,gitcl,git2,gitoxide,rustc,si
350362
cargo test -p vergen-pretty -F __vergen_test
351363
cargo test -p vergen-pretty -F __vergen_test,color
352364
cargo test -p vergen-pretty -F __vergen_test,trace

0 commit comments

Comments
 (0)