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

Optimize CI Jobs #1875

Merged
merged 2 commits into from
Nov 11, 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
38 changes: 10 additions & 28 deletions .github/workflows/ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,38 +22,13 @@ on:

jobs:
build:
name: ${{ matrix.os }}-${{ matrix.build_type }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest]
build_type: [Release]
enable_simd: [ON]
env:
COMPILER: clang
BUILD_TYPE: ${{ matrix.build_type }}
BUILD_DARTPY: OFF
DART_USE_SYSTEM_IMGUI: OFF
IN_CI: ON
ENABLE_SIMD: ${{ matrix.enable_simd }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Dependencies
env:
INSTALL_OSG_HEAD: OFF # To avoid building OSG, until 3.7 is released.
run: scripts/install_osx.sh
- name: Build
run: sudo -E scripts/build.sh

build_on_pixi:
name: ${{ matrix.os }}-pixi
name: ${{ matrix.os == 'macos-latest-large' && 'x86_64' || 'arm64' }}-${{ matrix.build_type }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest]
build_type: ["Release", "Debug"]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -64,12 +39,19 @@ jobs:
cache: true

- name: Check Lint
run: pixi run check-lint
run: |
DART_VERBOSE=ON \
BUILD_TYPE=${{ matrix.build_type }} \
pixi run check-lint

- name: Test DART and dartpy
run: |
DART_VERBOSE=ON \
BUILD_TYPE=${{ matrix.build_type }} \
pixi run test-all

- name: Install
run: |
DART_VERBOSE=ON \
BUILD_TYPE=${{ matrix.build_type }} \
pixi run install
30 changes: 17 additions & 13 deletions .github/workflows/ci_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,13 @@ on:
workflow_dispatch:

jobs:
build_on_docker:
coverage:
if: github.event_name != 'workflow_dispatch'
name: linux-docker-${{ matrix.os }}-${{ matrix.build_type }}
name: coverage
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Supported LTS versions
os: [ubuntu-jammy, ubuntu-noble, ubuntu-oracular]
build_type: [Release]
codecov: [OFF]
check_format: [OFF]
build_dartpy: [ON]
enable_simd: [ON]
include:
# For code coverage report to Codecov
- os: ubuntu-jammy
Expand Down Expand Up @@ -79,9 +72,13 @@ jobs:
$DART_DEV_IMAGE:$DOCKER_TAG \
/bin/sh -c "cd $GITHUB_WORKSPACE && ./scripts/build.sh"

build_on_pixi:
name: ubuntu-pixi
build:
name: ${{ matrix.build_type }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
build_type: ["Release", "Debug"]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -97,12 +94,19 @@ jobs:
version: 1.0

- name: Check Lint
run: pixi run check-lint
run: |
DART_VERBOSE=ON \
BUILD_TYPE=${{ matrix.build_type }} \
pixi run check-lint

- name: Test DART and dartpy
run: |
DART_VERBOSE=ON \
BUILD_TYPE=${{ matrix.build_type }} \
pixi run test-all

- name: Install
run: |
DART_VERBOSE=ON \
BUILD_TYPE=${{ matrix.build_type }} \
pixi run install
83 changes: 10 additions & 73 deletions .github/workflows/ci_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,80 +22,12 @@ on:

jobs:
build:
name: win-${{ matrix.build_type }}
name: ${{ matrix.build_type }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
toolset: [""]
build_type: [Release]
build_shared_libs: [OFF] # TODO(JS): Add ON once shared lib build is resolved

steps:
- name: Checkout
uses: actions/checkout@v4

- uses: johnwason/vcpkg-action@v6
with:
# TODO: Add ode and coin-or-ipopt
pkgs: >
assimp
eigen3
fcl
fmt
spdlog
bullet3
freeglut
glfw3
imgui[opengl2-binding]
nlopt
opengl
osg
pagmo2
tinyxml2
tracy
urdfdom
triplet: x64-windows
revision: "2024.06.15"
github-binarycache: true
token: ${{ github.token }}

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -U pytest

- name: Build
shell: cmd
run: |
cmake ^
-S . ^
-B build ^
-G "Visual Studio 17 2022" ^
-A x64 ^
-Wno-dev ${{ matrix.toolset }} ^
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ^
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" ^
-DDART_MSVC_DEFAULT_OPTIONS=ON ^
-DDART_VERBOSE=ON ^
-DBUILD_SHARED_LIBS=${{ matrix.build_shared_libs }} ^
-DDART_USE_SYSTEM_IMGUI=ON ^
|| exit /b
cmake ^
--build build ^
--config ${{ matrix.build_type }} ^
--target ALL_BUILD ^
--parallel ^
|| exit /b
ctest ^
--test-dir build ^
--output-on-failure ^
--build-config ${{ matrix.build_type }} ^
|| exit /b

build_on_pixi:
name: win-pixi
runs-on: windows-latest
build_type: ["Release"] # TODO: Add Debug
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -106,12 +38,17 @@ jobs:
cache: true

- name: Check Lint
run: pixi run check-lint
run: |
pixi run check-lint

- name: Test DART and dartpy
run: |
pixi run test # TODO: Change to test-all

$env:DART_VERBOSE = "ON"; `
$env:BUILD_TYPE = "${{ matrix.build_type }}"; `
pixi run test-all

- name: Install
run: |
$env:DART_VERBOSE = "ON"; `
$env:BUILD_TYPE = "${{ matrix.build_type }}"; `
pixi run install
84 changes: 84 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,90 @@
<img src="https://raw.githubusercontent.com/dartsim/dart/master/docs/dart_logo_377x107.jpg" alt="DART: Dynamic Animation and Robotics Toolkit">
</p>

DART (Dynamic Animation and Robotics Toolkit) is an open-source library that
provides data structures and algorithms for kinematic and dynamic applications
in robotics and computer animation. Renowned for its accuracy and stability,
DART utilizes generalized coordinates to represent articulated rigid body
systems and employs Featherstone's Articulated Body Algorithm to compute motion
dynamics.

## Getting Started

DART provides both C++ and Python interfaces, which can be installed using
various package managers. For cross-platform compatibility, we recommend using
Conda or Pixi.

### C++

#### Cross-Platform (Recommended)

Conda:

```shell
conda install -c conda-forge dartsim-cpp
```

Pixi:

```shell
pixi add dartsim-cpp
```

#### Linux

Ubuntu:

```shell
sudo apt install libdart-all-dev
```

Arch Linux:

```shell
yay -S libdart
```

FreeBSD:

```shell
pkg install dartsim
```

#### macOS (Homebrew)

```shell
brew install dartsim
```

#### Windows (Vcpkg)

```shell
vcpkg install dartsim:x64-windows
```

### Python

For the Python interface, we recommend using Conda or Pixi. Note that the PyPI
package is being deprecated to reduce maintenance—contributions are welcome!

Conda:

```shell
conda install -c conda-forge dartpy
```

Pixi:

```shell
pixi add dartpy
```

PyPI (deprecated):

```shell
pip install dartpy
```

## Documentation

For more information on DART, please visit the DART documentation: [English](https://dart.readthedocs.io/) | [한국어](https://dart-ko.readthedocs.io/) (WIP)
Expand Down
Loading
Loading