From 285a883e3b5eb4846fae687b47f6cfe23212e815 Mon Sep 17 00:00:00 2001 From: Jeff Vander Stoep Date: Mon, 3 Apr 2023 11:02:38 +0200 Subject: Upgrade rustversion to 1.0.12 This project was upgraded with external_updater. Usage: tools/external_updater/updater.sh update rust/crates/rustversion For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md Test: TreeHugger Change-Id: Ifee788a5e797e945340e957627b4d319c9210d57 --- .cargo_vcs_info.json | 7 +++--- .github/FUNDING.yml | 1 + .github/workflows/ci.yml | 63 +++++++++++++++++++++++++++++++++++++++++++++--- Android.bp | 2 +- Cargo.toml | 2 +- Cargo.toml.orig | 2 +- LICENSE-APACHE | 25 ------------------- METADATA | 15 +++++++----- src/lib.rs | 1 + 9 files changed, 77 insertions(+), 41 deletions(-) create mode 100644 .github/FUNDING.yml diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index 6895b5b..6f0afbd 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,5 +1,6 @@ { "git": { - "sha1": "ecc07fb53f45a093811484d4ee1ac791144defd7" - } -} + "sha1": "a85f2db274e1367a945a83ed4fe5a7a53d8f4f0e" + }, + "path_in_vcs": "" +} \ No newline at end of file diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..7507077 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: dtolnay diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ba68d6..748c2b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,28 +3,58 @@ name: CI on: push: pull_request: + workflow_dispatch: schedule: [cron: "40 1 * * *"] +permissions: + contents: read + +env: + RUSTFLAGS: -Dwarnings + jobs: + pre_ci: + uses: dtolnay/.github/.github/workflows/pre_ci.yml@master + test: name: Rust ${{matrix.rust}} + needs: pre_ci + if: needs.pre_ci.outputs.continue runs-on: ubuntu-latest strategy: fail-fast: false matrix: - rust: [nightly, beta, stable, 1.31.0] + rust: [nightly, beta, stable, 1.56.0] + timeout-minutes: 45 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@master with: toolchain: ${{matrix.rust}} + - name: Enable type layout randomization + run: echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout >> $GITHUB_ENV + if: matrix.rust == 'nightly' - run: cargo test + msrv: + name: Rust 1.31.0 + needs: pre_ci + if: needs.pre_ci.outputs.continue + runs-on: ubuntu-latest + timeout-minutes: 45 + steps: + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@1.31.0 + - run: cargo check + minimal: name: Minimal versions + needs: pre_ci + if: needs.pre_ci.outputs.continue runs-on: ubuntu-latest + timeout-minutes: 45 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@nightly - run: cargo update -Z minimal-versions - run: cargo test @@ -32,7 +62,32 @@ jobs: clippy: name: Clippy runs-on: ubuntu-latest + if: github.event_name != 'pull_request' + timeout-minutes: 45 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@clippy - run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic + + miri: + name: Miri + needs: pre_ci + if: needs.pre_ci.outputs.continue + runs-on: ubuntu-latest + timeout-minutes: 45 + steps: + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@miri + - run: cargo miri test + env: + MIRIFLAGS: -Zmiri-strict-provenance + + outdated: + name: Outdated + runs-on: ubuntu-latest + if: github.event_name != 'pull_request' + timeout-minutes: 45 + steps: + - uses: actions/checkout@v3 + - uses: dtolnay/install@cargo-outdated + - run: cargo outdated --workspace --exit-code 1 diff --git a/Android.bp b/Android.bp index d45a216..d18f027 100644 --- a/Android.bp +++ b/Android.bp @@ -41,7 +41,7 @@ rust_proc_macro { name: "librustversion", crate_name: "rustversion", cargo_env_compat: true, - cargo_pkg_version: "1.0.11", + cargo_pkg_version: "1.0.12", srcs: ["src/lib.rs"], edition: "2018", product_available: true, diff --git a/Cargo.toml b/Cargo.toml index a75e5e6..073d230 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ edition = "2018" rust-version = "1.31" name = "rustversion" -version = "1.0.11" +version = "1.0.12" authors = ["David Tolnay "] build = "build/build.rs" description = "Conditional compilation according to rustc compiler version" diff --git a/Cargo.toml.orig b/Cargo.toml.orig index 3bd445b..6f5c372 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "rustversion" -version = "1.0.11" +version = "1.0.12" authors = ["David Tolnay "] build = "build/build.rs" categories = ["development-tools::build-utils", "no-std"] diff --git a/LICENSE-APACHE b/LICENSE-APACHE index 16fe87b..1b5ec8b 100644 --- a/LICENSE-APACHE +++ b/LICENSE-APACHE @@ -174,28 +174,3 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/METADATA b/METADATA index 07dcb9f..4dd08e7 100644 --- a/METADATA +++ b/METADATA @@ -1,3 +1,7 @@ +# This project was upgraded with external_updater. +# Usage: tools/external_updater/updater.sh update rust/crates/rustversion +# For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md + name: "rustversion" description: "Conditional compilation according to rustc compiler version" third_party { @@ -7,14 +11,13 @@ third_party { } url { type: ARCHIVE - value: "https://static.crates.io/crates/rustversion/rustversion-1.0.11.crate" + value: "https://static.crates.io/crates/rustversion/rustversion-1.0.12.crate" } - version: "1.0.11" - # Dual-licensed, using the least restrictive per go/thirdpartylicenses#same. + version: "1.0.12" license_type: NOTICE last_upgrade_date { - year: 2022 - month: 12 - day: 19 + year: 2023 + month: 4 + day: 3 } } diff --git a/src/lib.rs b/src/lib.rs index e826b25..1cc9e97 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -145,6 +145,7 @@ //! //!
+#![doc(html_root_url = "https://docs.rs/rustversion/1.0.12")] #![allow( clippy::cast_lossless, clippy::cast_possible_truncation, -- cgit v1.2.3