Add a Linux Clang build and MUJOCO_HARDEN to build.yml.

PiperOrigin-RevId: 450709606
Change-Id: I63525e4670d0d05ca478c0a3f8c39f15d0b2aaf3
This commit is contained in:
Saran Tunyasuvunakool
2022-05-24 10:07:30 -07:00
committed by Copybara-Service
parent 43e3b3a3f9
commit 3034e8537c
+12 -6
View File
@@ -1,6 +1,6 @@
# This configuration is used to build and test on GitHub Actions only. # 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. # It is not the same configuration that is used by DeepMind to create release binaries.
# The "official" binaries are built with LLVM/Clang on all platforms, and are linked against libc++ # The "official" binaries are built with Clang 13 on all platforms, and are linked against libc++
# on Linux. # on Linux.
name: build name: build
@@ -17,14 +17,20 @@ jobs:
matrix: matrix:
include: include:
- os: ubuntu-20.04 - os: ubuntu-20.04
cmake_build_args: "-G Ninja -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10" 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 - os: macos-12
cmake_build_args: "-G Ninja" cmake_args: "-G Ninja -DMUJOCO_HARDEN:BOOL=ON"
- os: windows-2022 - os: windows-2022
cmake_build_args: "-- /MP"
name: "MuJoCo on ${{ matrix.os }}" name: "MuJoCo on ${{ matrix.os }} ${{ matrix.additional_label }}"
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
env: env:
CMAKE_ARGS: ${{ matrix.cmake_args }}
CMAKE_BUILD_ARGS: ${{ matrix.cmake_build_args }} CMAKE_BUILD_ARGS: ${{ matrix.cmake_build_args }}
steps: steps:
@@ -46,10 +52,10 @@ jobs:
run: | run: |
mkdir build mkdir build
cd build cd build
cmake -DCMAKE_BUILD_TYPE=Release $CMAKE_BUILD_ARGS .. cmake .. -DCMAKE_BUILD_TYPE:STRING=Release $CMAKE_ARGS
- name: Build - name: Build
working-directory: build working-directory: build
run: cmake --build . --config=Release run: cmake --build . --config=Release $CMAKE_BUILD_ARGS
- name: Test - name: Test
working-directory: build working-directory: build
run: ctest -C Release . run: ctest -C Release .