Skip to content

Commit

Permalink
Declare a rust-version, and test it in CI
Browse files Browse the repository at this point in the history
This is _not_ a MSRV policy, e.g. bumping the MSRV is still NOT a breaking change
  • Loading branch information
madsmtm committed Jan 8, 2023
1 parent c2b39e6 commit cfdca93
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,39 @@ jobs:
- name: cargo clippy
run: cargo clippy --all-targets ${{ matrix.args }}

msrv:
name: Check MSRV
runs-on: ubuntu-latest

env:
CARGO_BUILD_TARGET: x86_64-apple-darwin

steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: '1.60'
profile: minimal
override: true
target: x86_64-apple-darwin

- name: Cache Cargo
uses: actions/cache@v3
with:
path: ${{ env.CARGO_CACHE_PATH }}
key: cargo-${{ github.job }}-${{ matrix.name }}-${{ hashFiles('**/Cargo.lock') }}

- name: cargo check
run: >-
cargo check
$PUBLIC_CRATES
--features=$INTERESTING_FEATURES
--features=unstable-frameworks-macos-12
ui:
name: Compiler UI
runs-on: macos-latest
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,17 @@ so on, with every following release.
[#32]: https://github.com/madsmtm/objc2/issues/32


## Minimum Supported Rust Version (MSRV)

The _currently_ minimum supported Rust version is `1.60`; this is _not_
defined by policy, though, so it may change in at any time in a patch
release.

Help us define a policy over in [#203].

[#203]: https://github.com/madsmtm/objc2/issues/203


## License

This project is licensed under the MIT license, see [`LICENSE.txt`].
Expand Down
1 change: 1 addition & 0 deletions crates/block-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name = "block-sys"
version = "0.1.0-beta.2" # Remember to update html_root_url in lib.rs
authors = ["Mads Marquart <mads@marquart.dk>"]
edition = "2021"
rust-version = "1.60"

description = "Raw bindings to Apple's C language extension of blocks"
keywords = ["objective-c", "macos", "ios", "blocks", "sys"]
Expand Down
1 change: 1 addition & 0 deletions crates/block2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name = "block2"
version = "0.2.0-alpha.7"
authors = ["Steven Sheldon", "Mads Marquart <mads@marquart.dk>"]
edition = "2021"
rust-version = "1.60"

description = "Apple's C language extension of blocks"
keywords = ["objective-c", "macos", "ios", "blocks"]
Expand Down
1 change: 1 addition & 0 deletions crates/icrate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name = "icrate"
version = "0.0.1"
authors = ["Mads Marquart <mads@marquart.dk>"]
edition = "2021"
rust-version = "1.60"

description = "Bindings to Apple's frameworks"
keywords = ["macos", "ios", "cocoa", "apple", "framework"]
Expand Down
1 change: 1 addition & 0 deletions crates/objc-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ name = "objc-sys"
version = "0.2.0-beta.3"
authors = ["Mads Marquart <mads@marquart.dk>"]
edition = "2021"
rust-version = "1.60"

description = "Raw bindings to the Objective-C runtime and ABI"
keywords = ["objective-c", "macos", "ios", "objc_msgSend", "sys"]
Expand Down
1 change: 1 addition & 0 deletions crates/objc2-encode/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name = "objc2-encode"
version = "2.0.0-pre.3"
authors = ["Steven Sheldon", "Mads Marquart <mads@marquart.dk>"]
edition = "2021"
rust-version = "1.60"

description = "Objective-C type-encodings"
keywords = ["objective-c", "macos", "ios", "encode"]
Expand Down
1 change: 1 addition & 0 deletions crates/objc2-proc-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name = "objc2-proc-macros"
version = "0.1.0"
authors = ["Mads Marquart <mads@marquart.dk>", "Calvin Watford"]
edition = "2021"
rust-version = "1.60"

description = "Procedural macros for the objc2 project"
keywords = ["objective-c", "macos", "ios", "proc-macro"]
Expand Down
1 change: 1 addition & 0 deletions crates/objc2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name = "objc2"
version = "0.3.0-beta.4" # Remember to update html_root_url in lib.rs
authors = ["Steven Sheldon", "Mads Marquart <mads@marquart.dk>"]
edition = "2021"
rust-version = "1.60"

description = "Objective-C interface and bindings to the Cocoa Foundation framework"
keywords = ["objective-c", "macos", "ios", "objc_msgSend", "cocoa"]
Expand Down

0 comments on commit cfdca93

Please sign in to comment.