Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Commit

Permalink
Downgrade MinGW and build Rust library's Sleipnir backend with MSVC (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
calcmogul authored Feb 19, 2024
1 parent 043d747 commit 3d895cf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- artifact-name: Rust Native - Windows x86_64 (Sleipnir)
optimizer_backend: sleipnir
os: windows-2022
rust-target: x86_64-pc-windows-gnu
rust-target: x86_64-pc-windows-msvc
- artifact-name: Rust Native - macOS x86_64 (Sleipnir)
optimizer_backend: sleipnir
os: macOS-13
Expand All @@ -56,7 +56,8 @@ jobs:
uses: egor-tensin/setup-mingw@v2
with:
platform: x64
version: 12.2.0
version: 11.2.0
static: 0

- name: Set up Rust
uses: hecrj/setup-rust-action@v1
Expand All @@ -75,6 +76,5 @@ jobs:
run: cargo build --target ${{ matrix.rust-target }} --features ${{ matrix.optimizer_backend }}

- name: Run Rust
if: matrix.rust-target != 'aarch64-apple-darwin' && matrix.rust-target != 'x86_64-pc-windows-gnu'
working-directory: rust
run: cargo run --example swerve --target ${{ matrix.rust-target }} --features ${{ matrix.optimizer_backend }}
27 changes: 14 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,38 @@ jobs:
matrix:
include:
- artifact-name: Native - Windows (CasADi)
# FIXME: TrajoptLibTest.exe can't find an unspecified DLL
# FIXME: Tests give "Exit code 0xc0000135" for missing DLLs
cmake-flags: "-G \"MinGW Makefiles\" -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ -DBUILD_TESTING=OFF"
optimizer: casadi
optimizer_backend: casadi
os: windows-2022
- artifact-name: Native - macOS x86_64 (CasADi)
cmake-flags: "-DCMAKE_APPLE_SILICON_PROCESSOR=x86_64"
optimizer: casadi
optimizer_backend: casadi
os: macOS-13
- artifact-name: Native - macOS arm64 (CasADi)
cmake-flags: "-DCMAKE_APPLE_SILICON_PROCESSOR=arm64"
optimizer: casadi
optimizer_backend: casadi
os: macOS-14
- artifact-name: Native - Linux (CasADi)
cmake-flags:
optimizer: casadi
optimizer_backend: casadi
os: ubuntu-latest
- artifact-name: Native - Windows (Sleipnir)
# FIXME: TrajoptLibTest.exe can't find an unspecified DLL
# FIXME: Tests give "Exit code 0xc0000135" for missing DLLs
cmake-flags: "-DBUILD_TESTING=OFF"
optimizer: sleipnir
optimizer_backend: sleipnir
os: windows-2022
- artifact-name: Native - macOS x86_64 (Sleipnir)
cmake-flags:
optimizer: sleipnir
optimizer_backend: sleipnir
os: macOS-13
- artifact-name: Native - macOS arm64 (Sleipnir)
cmake-flags:
optimizer: sleipnir
optimizer_backend: sleipnir
os: macOS-14
- artifact-name: Native - Linux (Sleipnir)
cmake-flags:
optimizer: sleipnir
optimizer_backend: sleipnir
os: ubuntu-latest

name: "${{ matrix.artifact-name }}"
Expand All @@ -55,14 +55,15 @@ jobs:
- uses: actions/checkout@v4

- name: Set up MinGW
if: matrix.os == 'windows-2022' && matrix.optimizer == 'casadi'
if: matrix.os == 'windows-2022' && matrix.optimizer_backend == 'casadi'
uses: egor-tensin/setup-mingw@v2
with:
platform: x64
version: 12.2.0
version: 11.2.0
static: 0

- name: configure
run: cmake -B build -S . ${{ matrix.cmake-flags }} -DOPTIMIZER_BACKEND=${{ matrix.optimizer }} -DWITH_JAVA=ON -DJAVA_INSTALL_JAR=OFF
run: cmake -B build -S . ${{ matrix.cmake-flags }} -DOPTIMIZER_BACKEND=${{ matrix.optimizer_backend }} -DWITH_JAVA=ON -DJAVA_INSTALL_JAR=OFF

- name: build
run: cmake --build build --config RelWithDebInfo --parallel $(nproc)
Expand Down

0 comments on commit 3d895cf

Please sign in to comment.