diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 3bc44ae..bce3499 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -8,19 +8,23 @@ on: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v2 + - name: Install protobuf + run: | + sudo apt-get update + sudo apt-get install -y protobuf-compiler libprotobuf-dev - name: Prepare dependencies run: | mkdir -p /opt && cd /opt - curl -sL https://github.com/google/or-tools/releases/download/v9.0/or-tools_ubuntu-20.04_v9.0.9048.tar.gz | tar xzf - + curl -sL https://github.com/google/or-tools/releases/download/v9.12/or-tools_amd64_ubuntu-24.04_cpp_v9.12.4544.tar.gz | tar xzf - ln -s or-tools* ortools - name: Build - run: LD_LIBRARY_PATH=/opt/ortools/lib cargo build --workspace + run: LD_LIBRARY_PATH=/opt/ortools/lib RUSTFLAGS='-Clink-arg=-lprotobuf' cargo build --workspace - name: Run tests - run: LD_LIBRARY_PATH=/opt/ortools/lib cargo test --workspace + run: LD_LIBRARY_PATH=/opt/ortools/lib RUSTFLAGS='-Clink-arg=-lprotobuf' cargo test --workspace - name: fmt run: cargo fmt --all -- --check - name: clippy - run: LD_LIBRARY_PATH=/opt/ortools/lib cargo clippy --workspace -- -D warnings + run: LD_LIBRARY_PATH=/opt/ortools/lib RUSTFLAGS='-Clink-arg=-lprotobuf' cargo clippy --workspace -- -D warnings diff --git a/Cargo.toml b/Cargo.toml index 40fcb55..a18ce0d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,11 +11,11 @@ categories = ["api-bindings", "mathematics", "science"] readme = "README.md" [dependencies] -prost = "0.8" +prost = "0.12" bytes = "1.1.0" libc = "0.2.101" smallvec = { version = "1.6.1", default-features = false, features = ["union"]} [build-dependencies] -prost-build = { version = "0.8" } +prost-build = { version = "0.12" } cc = "1.0"