aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-04-04 02:59:20 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-04-04 02:59:20 +0000
commitf2b4c68ae5a7b16b0c8f1ffd4f9378f47111deaf (patch)
treed1b307b141634c64710226695aca99d28b4c377f
parent91e6bf03d21e1861f4b2b75fb9d5d7ad59494c99 (diff)
parenteeed96ed557f6c2504938b77918fa356ec16b8c0 (diff)
downloadrustversion-android14-tests-release.tar.gz
Change-Id: I5211c05899942fdf238844a92c76175dd8175087
-rw-r--r--.cargo_vcs_info.json7
-rw-r--r--.github/FUNDING.yml1
-rw-r--r--.github/workflows/ci.yml63
-rw-r--r--Android.bp2
-rw-r--r--Cargo.toml2
-rw-r--r--Cargo.toml.orig2
-rw-r--r--LICENSE-APACHE25
-rw-r--r--METADATA15
-rw-r--r--src/lib.rs1
9 files changed, 77 insertions, 41 deletions
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 <dtolnay@gmail.com>"]
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 <dtolnay@gmail.com>"]
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 @@
//!
//! <br>
+#![doc(html_root_url = "https://docs.rs/rustversion/1.0.12")]
#![allow(
clippy::cast_lossless,
clippy::cast_possible_truncation,