Update cxx requirement from 1,<1.0.87 to 1, <1.0.111 #185
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: [push, pull_request] | |
jobs: | |
cargo-fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- name: Run cargo fmt | |
run: cargo +stable fmt --all --check | |
cargo-clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install ceres | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libunwind-dev | |
sudo apt-get install -y --no-install-recommends libceres-dev | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- name: cargo clippy | |
run: cargo +stable clippy --all-targets --workspace --features system -- -Dwarnings | |
ceres-built-from-source: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# Help needed for windows, I don't know why this error appears and how to fix it: | |
# glog/log_severity.h(57): fatal error C1189: #error: ERROR macro is defined. Define | |
# GLOG_NO_ABBREVIATED_SEVERITIES before including logging.h. See the document for detail. | |
os: ["ubuntu-latest", "macos-latest"] | |
rust_toolchain: ["1.57", "stable"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install Cmake on Linux | |
if: ${{ runner.os == 'Linux' }} | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends cmake | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust_toolchain }} | |
- name: Check workspace | |
run: cargo +${{ matrix.rust_toolchain }} check --all-targets --workspace --features source | |
- name: Test ceres-solver | |
run: cargo +${{ matrix.rust_toolchain }} test --features source | |
- name: Test ceres-solver-sys | |
# Doesn't work for now due to linking issues | |
if: ${{ runner.os != 'Linux' }} | |
run: cargo +${{ matrix.rust_toolchain }} test --features source | |
working-directory: ceres-solver-sys | |
system-ceres: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# Help needed for Windows, vcpkg builds it, but I don't know how to make it discoverable | |
os: [ "ubuntu-latest", "macos-latest" ] | |
rust_toolchain: [ "1.57", "stable" ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install ceres on Linux | |
if: ${{ runner.os == 'Linux' }} | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libunwind-dev | |
sudo apt-get install -y --no-install-recommends libceres-dev | |
- name: Install ceres on macOS | |
if: ${{ runner.os == 'macOS' }} | |
run: brew install ceres-solver | |
# Not actually used for now, see reasons above | |
- name: Install ceres on Windows | |
if: ${{ runner.os == 'Windows' }} | |
run: vcpkg install ceres:x64-windows | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust_toolchain }} | |
- name: Check ceres-solver | |
run: cargo +${{ matrix.rust_toolchain }} check --all-targets --features system | |
- name: Check ceres-solver-sys | |
run: cargo +${{ matrix.rust_toolchain }} check --all-targets --features system | |
working-directory: ceres-solver-sys | |
- name: Test ceres-solver | |
run: cargo +${{ matrix.rust_toolchain }} test --features system | |
- name: Test ceres-solver-sys | |
# Doesn't work on Linux for now due to linking issues | |
if: ${{ runner.os != 'Linux' }} | |
run: cargo +${{ matrix.rust_toolchain }} test --features system | |
working-directory: ceres-solver-sys |