From dc298d628e45e0a9e8239251181399f334bb2131 Mon Sep 17 00:00:00 2001 From: Jason Ozias Date: Sat, 27 Mar 2021 13:22:20 -0400 Subject: [PATCH] v5.1.0 (#60) * version bump for next release * rustfmt & clippy only on stable, tweak test * action tweaks * action tweaks * More actions tweaks * cache tweaks --- .github/workflows/main.yml | 105 ++++++++++++++++++++++++------------- Cargo.toml | 4 +- README.md | 6 +++ 3 files changed, 76 insertions(+), 39 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index eb86f497..aacdb49c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,84 +3,120 @@ on: [push, pull_request] name: CI jobs: + rustfmt: + name: โ˜ข๏ธ Formatting โ˜ข๏ธ + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + components: rustfmt + - run: cargo fmt --all -- --check + lints: + name: ๐Ÿ•ณ๏ธ Lints ๐Ÿ•ณ๏ธ + needs: rustfmt + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: + - ubuntu-latest + - macos-latest + - windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + components: clippy + - run: cargo clippy --all -- -D warnings test: name: vergen + needs: lints runs-on: ${{ matrix.os }} strategy: matrix: include: - os: ubuntu-latest rust: stable - other: i686-unknown-linux-gnu + target: i686-unknown-linux-gnu - os: ubuntu-latest rust: stable - other: x86_64-unknown-linux-gnu + target: x86_64-unknown-linux-gnu - os: ubuntu-latest rust: beta - other: i686-unknown-linux-gnu + target: i686-unknown-linux-gnu - os: ubuntu-latest rust: beta - other: x86_64-unknown-linux-gnu + target: x86_64-unknown-linux-gnu - os: ubuntu-latest rust: nightly - other: i686-unknown-linux-gnu + target: i686-unknown-linux-gnu - os: ubuntu-latest rust: nightly - other: x86_64-unknown-linux-gnu + target: x86_64-unknown-linux-gnu - os: macos-latest rust: stable - other: x86_64-apple-darwin + target: x86_64-apple-darwin - os: macos-latest rust: stable - other: x86_64-apple-ios + target: x86_64-apple-ios - os: macos-latest rust: beta - other: x86_64-apple-darwin + target: x86_64-apple-darwin - os: macos-latest rust: beta - other: x86_64-apple-ios + target: x86_64-apple-ios - os: macos-latest rust: nightly - other: x86_64-apple-darwin + target: x86_64-apple-darwin - os: macos-latest rust: nightly - other: x86_64-apple-ios + target: x86_64-apple-ios - os: windows-latest rust: stable-msvc - other: i686-pc-windows-msvc + target: i686-pc-windows-msvc - os: windows-latest rust: stable-msvc - other: x86_64-pc-windows-msvc + target: x86_64-pc-windows-msvc - os: windows-latest rust: beta-msvc - other: i686-pc-windows-msvc + target: i686-pc-windows-msvc - os: windows-latest rust: beta-msvc - other: x86_64-pc-windows-msvc + target: x86_64-pc-windows-msvc - os: windows-latest rust: nightly-msvc - other: i686-pc-windows-msvc + target: i686-pc-windows-msvc - os: windows-latest rust: nightly-msvc - other: x86_64-pc-windows-msvc + target: x86_64-pc-windows-msvc - os: windows-latest rust: stable-gnu - other: i686-pc-windows-gnu + target: i686-pc-windows-gnu - os: windows-latest rust: stable-gnu - other: x86_64-pc-windows-gnu + target: x86_64-pc-windows-gnu - os: windows-latest rust: beta-gnu - other: i686-pc-windows-gnu + target: i686-pc-windows-gnu - os: windows-latest rust: beta-gnu - other: x86_64-pc-windows-gnu + target: x86_64-pc-windows-gnu - os: windows-latest rust: nightly-gnu - other: i686-pc-windows-gnu + target: i686-pc-windows-gnu - os: windows-latest rust: nightly-gnu - other: x86_64-pc-windows-gnu + target: x86_64-pc-windows-gnu steps: - name: โœ”๏ธ Checkout โœ”๏ธ uses: actions/checkout@v2 @@ -92,7 +128,14 @@ jobs: path: | ~/.cargo/bin/cargo-tarpaulin* ~/.cargo/bin/cargo-*-all-features* - key: ${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.toml') }} + key: ${{ runner.os }}-${{ matrix.rust }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.toml') }} + - uses: actions-rs/toolchain@v1 + name: ๐Ÿงฐ Toolchain ๐Ÿงฐ + with: + profile: minimal + toolchain: ${{ matrix.rust }} + target: ${{ matrix.target }} + override: true - name: โœ”๏ธ Checkout (notagsrepo master) โœ”๏ธ run: cd testdata/notagsrepo && git checkout master && cd .. - name: โœ”๏ธ Checkout (tagsrepo master) โœ”๏ธ @@ -116,18 +159,6 @@ jobs: version: latest use-tool-cache: true continue-on-error: true - - name: ๐Ÿ“… Update ๐Ÿ“… - run: rustup update --no-self-update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} - - name: โž• Add โž• - run: rustup component add rustfmt || echo "rustfmt not available" - - name: โž• Add โž• - run: rustup component add clippy || echo "clippy not available" - - name: โ˜ข๏ธ Formatting โ˜ข๏ธ - run: cargo fmt --all -- --check - - name: ๐Ÿ•ณ๏ธ Lints ๐Ÿ•ณ๏ธ - run: cargo clippy --all -- -D warnings - - name: ๐Ÿ—๏ธ Build ๐Ÿ—๏ธ - run: cargo build-all-features - name: ๐Ÿงช Test ๐Ÿงช run: cargo test-all-features - name: ๐Ÿ™Š Code Coverage ๐Ÿ™Š diff --git a/Cargo.toml b/Cargo.toml index 7efa2345..e0723a98 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] authors = ["Jason Ozias "] categories = ["development-tools", "development-tools::build-utils"] -description = "Generate build, git, and rustc related 'cargo:rustc-env' instructions via 'build.rs' for use in your code via the env! macro" +description = "Generate 'cargo:rustc-env' instructions via 'build.rs' for use in your code via the env! macro" documentation = "http://docs.rs/vergen" edition = "2018" homepage = "http://github.com/rustyhorde/vergen" @@ -10,7 +10,7 @@ license = "MIT OR Apache-2.0" name = "vergen" readme = "README.md" repository = "https://github.com/rustyhorde/vergen" -version = "5.0.1" +version = "5.1.0" [features] default = ["build", "cargo", "git", "rustc", "si"] diff --git a/README.md b/README.md index 0c1b4097..78dd8f82 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,12 @@ A full list of environment variables that can be generated are listed in the fol | `VERGEN_CARGO_FEATURES` | git,build | | `VERGEN_CARGO_PROFILE` | debug | | `VERGEN_CARGO_TARGET_TRIPLE` | x86_64-unknown-linux-gnu | +| `VERGEN_SYSINFO_NAME` | Darwin | +| `VERGEN_SYSINFO_OS_VERSION` | MacOS 10.15.7 Catalina | +| `VERGEN_SYSINFO_USER` | Yoda | +| `VERGEN_SYSINFO_TOTAL_MEMORY` | 16 GB | +| `VERGEN_SYSINFO_CPU_VENDOR` | Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz | +| `VERGEN_SYSINFO_CPU_CORE_COUNT` | 4 | ## Contributing See the documentation at [CONTRIBUTING.md](CONTRIBUTING.md)