Files
Mujoco_WASM/.github/workflows/build.yml
T
Saran Tunyasuvunakool 3034e8537c Add a Linux Clang build and MUJOCO_HARDEN to build.yml.
PiperOrigin-RevId: 450709606
Change-Id: I63525e4670d0d05ca478c0a3f8c39f15d0b2aaf3
2022-05-24 10:08:11 -07:00

62 lines
1.8 KiB
YAML

# This configuration is used to build and test on GitHub Actions only.
# It is not the same configuration that is used by DeepMind to create release binaries.
# The "official" binaries are built with Clang 13 on all platforms, and are linked against libc++
# on Linux.
name: build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
mujoco:
strategy:
matrix:
include:
- os: ubuntu-20.04
additional_label: "with GCC 10"
cmake_args: "-G Ninja -DCMAKE_C_COMPILER:STRING=gcc-10 -DCMAKE_CXX_COMPILER:STRING=g++-10"
- os: ubuntu-20.04
additional_label: "with Clang 12"
cmake_args: "-G Ninja -DCMAKE_C_COMPILER:STRING=clang-12 -DCMAKE_CXX_COMPILER:STRING=clang++-12 -DMUJOCO_HARDEN:BOOL=ON"
- os: macos-12
cmake_args: "-G Ninja -DMUJOCO_HARDEN:BOOL=ON"
- os: windows-2022
cmake_build_args: "-- /MP"
name: "MuJoCo on ${{ matrix.os }} ${{ matrix.additional_label }}"
runs-on: ${{ matrix.os }}
env:
CMAKE_ARGS: ${{ matrix.cmake_args }}
CMAKE_BUILD_ARGS: ${{ matrix.cmake_build_args }}
steps:
- uses: actions/checkout@v2
- name: Prepare Linux
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get install \
libgl1-mesa-dev \
libxinerama-dev \
libxcursor-dev \
libxrandr-dev \
libxi-dev \
ninja-build
- name: Prepare macOS
if: ${{ runner.os == 'macOS' }}
run: brew install ninja
- name: Configure
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE:STRING=Release $CMAKE_ARGS
- name: Build
working-directory: build
run: cmake --build . --config=Release $CMAKE_BUILD_ARGS
- name: Test
working-directory: build
run: ctest -C Release .