Add build.yml for GitHub Actions.
PiperOrigin-RevId: 450475783 Change-Id: I2384b64459c327b94ac98aa0bdd8a5258c5cda0f
This commit is contained in:
committed by
Copybara-Service
parent
89d95ad3c7
commit
01e232446d
@@ -0,0 +1,50 @@
|
|||||||
|
name: build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
mujoco:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-20.04
|
||||||
|
cmake_build_args: "-G Ninja -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10"
|
||||||
|
- os: macos-12
|
||||||
|
cmake_build_args: "-G Ninja"
|
||||||
|
- os: windows-2022
|
||||||
|
|
||||||
|
name: "MuJoCo on ${{ matrix.os }}"
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
env:
|
||||||
|
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=Release $CMAKE_BUILD_ARGS ..
|
||||||
|
- name: Build
|
||||||
|
working-directory: build
|
||||||
|
run: cmake --build . --config=Release
|
||||||
|
- name: Test
|
||||||
|
working-directory: build
|
||||||
|
run: ctest -C Release .
|
||||||
Reference in New Issue
Block a user