Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump minimum supported Rust version to 1.63 #21

Merged
merged 1 commit into from
Dec 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
build-and-test-succeeded:
name: Build and Test Succeeded
needs: build-and-test
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -17,36 +17,36 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-18.04
- os: ubuntu-22.04
target: x86_64-unknown-linux-gnu
channel: 1.34.0
- os: ubuntu-18.04
channel: 1.63
- os: ubuntu-22.04
target: x86_64-unknown-linux-gnu
channel: stable
- os: ubuntu-18.04
- os: ubuntu-22.04
target: x86_64-unknown-linux-gnu
channel: beta
- os: ubuntu-18.04
- os: ubuntu-22.04
target: x86_64-unknown-linux-gnu
channel: nightly

- os: macos-10.15
- os: macos-13
target: x86_64-apple-darwin
channel: 1.34.0
- os: macos-10.15
channel: 1.63
- os: macos-13
target: x86_64-apple-darwin
channel: stable

- os: windows-2019
target: x86_64-pc-windows-msvc
channel: 1.34.0
channel: 1.63
- os: windows-2019
target: x86_64-pc-windows-msvc
channel: stable

- os: windows-2019
target: i686-pc-windows-msvc
channel: 1.34.0
channel: 1.63
- os: windows-2019
target: i686-pc-windows-msvc
channel: stable
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
# will have compiled files and executables
target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here http://doc.crates.io/guide.html#cargotoml-vs-cargolock
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Unreleased
-----------
- Don't panic when updating an empty A matrix.
- Bump minimum supported Rust version to 1.63.

Version 0.6.2 (January 7, 2021)
-----------
Expand Down
49 changes: 49 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[package]
name = "osqp"
version = "0.6.2"
edition = "2015"
rust-version = "1.63"
description = "The OSQP (Operator Splitting Quadratic Program) solver."
authors = ["Edward Barnard <[email protected]>"]
license = "Apache-2.0"
Expand Down
2 changes: 2 additions & 0 deletions osqp-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[package]
name = "osqp-sys"
version = "0.6.2"
edition = "2015"
rust-version = "1.63"
description = "FFI bindings to the OSQP (Operator Splitting Quadratic Program) solver."
authors = ["Edward Barnard <[email protected]>"]
license = "Apache-2.0"
Expand Down
3 changes: 2 additions & 1 deletion osqp-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ fn main() {
}

// Try to make c_int the same size as the target pointer width (i.e. 32 or 64 bits)
println!("cargo:rustc-check-cfg=cfg(osqp_dlong)");
let dlong_enabled = match &*env::var("CARGO_CFG_TARGET_POINTER_WIDTH").unwrap() {
"64" => {
println!(r#"cargo:rustc-cfg=feature="osqp_dlong""#);
println!("cargo:rustc-cfg=osqp_dlong");
"ON"
}
"32" => "OFF",
Expand Down
10 changes: 5 additions & 5 deletions osqp-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
mod bindings;
pub use bindings::*;

#[cfg(feature = "osqp_dlong")]
#[cfg(osqp_dlong)]
pub type osqp_int = ::std::os::raw::c_longlong;
#[cfg(not(feature = "osqp_dlong"))]
#[cfg(not(osqp_dlong))]
pub type osqp_int = ::std::os::raw::c_int;
pub type osqp_float = f64;

Expand Down Expand Up @@ -84,7 +84,7 @@ mod tests {
data.A = A;
data.l = l.as_mut_ptr();
data.u = u.as_mut_ptr();
let data = &data as *const OSQPData;
let data = &mut data as *mut OSQPData;

// Define solver settings
let mut settings: OSQPSettings = mem::zeroed();
Expand All @@ -96,13 +96,13 @@ mod tests {

// Setup workspace
let mut work: *mut OSQPWorkspace = ptr::null_mut();
let status = osqp_setup(&mut work, data, settings);
let status = osqp_setup(&mut work, data as *const _, settings);
if status != 0 {
panic!("osqp_setup failed");
}

// Zero data and settings on the stack to ensure osqp does not reference them
*(data as *mut OSQPData) = mem::zeroed();
*data = mem::zeroed();
*settings = mem::zeroed();
*P = mem::zeroed();
*A = mem::zeroed();
Expand Down
Loading