Skip to content

Commit

Permalink
Added vergen-lib workflow (#325)
Browse files Browse the repository at this point in the history
* added vergen-lib workflow

* added llvm-cov feature for nightly

* lets try codecove again
  • Loading branch information
CraZySacX authored Mar 7, 2024
1 parent 31ab292 commit 9e75240
Show file tree
Hide file tree
Showing 10 changed files with 175 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pretty.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
workflow_run:
workflows: [🦀 vergen 🦀]
workflows: [🦀 vergen 🦀, 🦀 vergen-lib 🦀]
types:
- completed

Expand Down
File renamed without changes.
165 changes: 165 additions & 0 deletions .github/workflows/vergen_lib.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
on:
push:
branches:
- master
- legacy/*
tags-ignore:
- "*"
pull_request:
branches:
- "*"
schedule:
- cron: "13 3 * * *"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

name: 🦀 vergen-lib 🦀

jobs:
rustfmt:
name: 📌 Formatting 📌
uses: rustyhorde/workflows/.github/workflows/rustfmt.yml@main

lints-linux:
name: 🕳️ Clippy (Linux) 🕳️
needs: rustfmt
uses: rustyhorde/workflows/.github/workflows/clippy-all-features.yml@main
with:
os: ubuntu-latest
channel: nightly
target: x86_64-unknown-linux-gnu
update: true
project: vergen-lib

lints-macos:
name: 🕳️ Clippy (MacOS) 🕳️
needs: rustfmt
uses: rustyhorde/workflows/.github/workflows/clippy-all-features.yml@main
with:
os: macos-latest
channel: nightly
target: x86_64-apple-darwin
update: true
project: vergen-lib

lints-windows:
name: 🕳️ Clippy (Windows) 🕳️
needs: rustfmt
uses: rustyhorde/workflows/.github/workflows/clippy-all-features.yml@main
with:
os: windows-latest
channel: nightly
target: x86_64-pc-windows-gnu
update: true
project: vergen-lib

test-linux:
name: 🧪 Test (Linux) 🧪
needs: lints-linux
strategy:
matrix:
os: [ubuntu-latest]
channel: ["1.70.0", "stable", "beta", "nightly"]
target: [x86_64-unknown-linux-gnu]
uses: rustyhorde/workflows/.github/workflows/test-all-features.yml@main
with:
os: ${{ matrix.os }}
channel: ${{ matrix.channel }}
target: ${{ matrix.target }}
update: true
project: vergen-lib

test-macos:
name: 🧪 Test (MacOS) 🧪
needs: lints-macos
strategy:
matrix:
os: [macos-latest]
channel: ["1.70.0", "stable", "beta", "nightly"]
target: [x86_64-apple-darwin]
uses: rustyhorde/workflows/.github/workflows/test-all-features.yml@main
with:
os: ${{ matrix.os }}
channel: ${{ matrix.channel }}
target: ${{ matrix.target }}
update: true
project: vergen-lib

test-windows-gnu:
name: 🧪 Test (Windows - GNU) 🧪
needs: lints-windows
strategy:
matrix:
os: [windows-latest]
channel: ["1.70.0", "stable", "beta", "nightly"]
target: [x86_64-pc-windows-gnu]
uses: rustyhorde/workflows/.github/workflows/test-all-features.yml@main
with:
os: ${{ matrix.os }}
channel: ${{ matrix.channel }}
target: ${{ matrix.target }}
update: true
project: vergen-lib

test-windows-msvc:
name: 🧪 Test (Windows - MSVC) 🧪
needs: lints-windows
strategy:
matrix:
os: [windows-latest]
channel: ["1.70.0", "stable", "beta", "nightly"]
target: [x86_64-pc-windows-msvc]
uses: rustyhorde/workflows/.github/workflows/test-all-features.yml@main
with:
os: ${{ matrix.os }}
channel: ${{ matrix.channel }}
target: ${{ matrix.target }}
update: true
project: vergen-lib

coverage-linux:
name: 🧱 Coverage (Linux) 🧱
needs: test-linux
uses: rustyhorde/workflows/.github/workflows/coverage.yml@main
with:
os: ubuntu-latest
channel: nightly
target: x86_64-unknown-linux-gnu
lcov: true
html: true
run_cmd: ${{ vars.VERGEN_LIB_RUN_CMD }}
secrets: inherit

coverage-macos:
name: 🧱 Coverage (MacOS) 🧱
needs: test-macos
uses: rustyhorde/workflows/.github/workflows/coverage.yml@main
with:
os: macos-latest
channel: nightly
target: x86_64-apple-darwin
lcov: true
html: true
run_cmd: ${{ vars.VERGEN_LIB_RUN_CMD }}
secrets: inherit

coverage-windows:
name: 🧱 Coverage (Wndows) 🧱
needs: [test-windows-gnu, test-windows-msvc]
strategy:
matrix:
target: [x86_64-pc-windows-gnu, x86_64-pc-windows-msvc]
uses: rustyhorde/workflows/.github/workflows/coverage.yml@main
with:
os: windows-latest
channel: nightly
target: ${{ matrix.target }}
lcov: true
html: true
run_cmd: ${{ vars.VERGEN_LIB_RUN_CMD }}
secrets: inherit
2 changes: 1 addition & 1 deletion vergen-git2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ build = ["vergen/build"]
cargo = ["vergen/cargo"]
emit_and_set = ["vergen-lib/emit_and_set"]
rustc = ["vergen/rustc"]
unstable = ["vergen/unstable"]
unstable = ["vergen/unstable", "vergen-lib/unstable"]
si = ["vergen/si"]

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion vergen-gitcl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ build = ["vergen/build"]
cargo = ["vergen/cargo"]
emit_and_set = ["vergen-lib/emit_and_set"]
rustc = ["vergen/rustc"]
unstable = ["vergen/unstable"]
unstable = ["vergen/unstable", "vergen-lib/unstable"]
si = ["vergen/si"]

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion vergen-gix/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ build = ["vergen/build"]
cargo = ["vergen/cargo"]
emit_and_set = ["vergen-lib/emit_and_set"]
rustc = ["vergen/rustc"]
unstable = ["vergen/unstable"]
unstable = ["vergen/unstable", "vergen-lib/unstable"]
si = ["vergen/si"]

[dependencies]
Expand Down
3 changes: 3 additions & 0 deletions vergen-lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@
all(nightly, feature = "unstable"),
deny(rustdoc::missing_doc_code_examples)
)]
#![cfg_attr(all(doc, nightly), feature(doc_auto_cfg))]
#![cfg_attr(all(docsrs, nightly), feature(doc_cfg))]
#![cfg_attr(coverage_nightly, feature(coverage_attribute))]

#[cfg(test)]
use {temp_env as _, test_util as _};
Expand Down
2 changes: 1 addition & 1 deletion vergen-pretty/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ always_include = ["__vergen_empty_test", "unstable"]

[features]
default = []
unstable = []
unstable = ["vergen-gix/unstable"]
color = ["console", "lazy_static"]
header = ["console", "rand"]
trace = ["tracing"]
Expand Down
1 change: 1 addition & 0 deletions vergen-pretty/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ assert!(!buf.is_empty());
)]
#![cfg_attr(all(doc, nightly), feature(doc_auto_cfg))]
#![cfg_attr(all(docsrs, nightly), feature(doc_cfg))]
#![cfg_attr(coverage_nightly, feature(coverage_attribute))]

#[cfg(feature = "header")]
mod header;
Expand Down
2 changes: 1 addition & 1 deletion vergen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ build = ["time", "vergen-lib/build"]
cargo = ["cargo_metadata", "getset", "regex", "vergen-lib/cargo"]
rustc = ["rustc_version", "vergen-lib/rustc"]
si = ["sysinfo", "vergen-lib/si"]
unstable = []
unstable = ["vergen-lib/unstable"]
emit_and_set = ["vergen-lib/emit_and_set"]

[dependencies]
Expand Down

0 comments on commit 9e75240

Please sign in to comment.