upd version #120
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
# Run cargo test | |
test: | |
name: Test Suite | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Initalize submobules | |
run: git submodule init && git submodule update | |
- name: Cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.toml') }} | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
override: true | |
- name: Install Dependencies | |
run: sudo apt-get update; sudo apt-get install pkg-config libx11-dev libasound2-dev libudev-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev | |
- name: Install Mujoco | |
run: wget https://github.com/deepmind/mujoco/releases/download/2.3.1/mujoco-2.3.1-linux-x86_64.tar.gz; tar -xf mujoco-2.3.1-linux-x86_64.tar.gz -C ~/.local; mv ~/.local/mujoco-2.3.1/ ~/.local/mujoco; sudo cp ~/.local/mujoco/lib/libmujoco.so /usr/lib/libmujoco.so; sudo cp ~/.local/mujoco/lib/libmujoco.so.2.3.1 /usr/lib/libmujoco.so.2.3.1 | |
- name: Run cargo test | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
# Run cargo clippy -- -D warnings | |
clippy_check: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.toml') }} | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
profile: minimal | |
components: clippy | |
override: true | |
- name: Install Dependencies | |
run: sudo apt-get update; sudo apt-get install pkg-config libx11-dev libasound2-dev libudev-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev | |
- name: Install Mujoco | |
run: wget https://github.com/deepmind/mujoco/releases/download/2.3.1/mujoco-2.3.1-linux-x86_64.tar.gz; tar -xf mujoco-2.3.1-linux-x86_64.tar.gz -C ~/.local; mv ~/.local/mujoco-2.3.1/ ~/.local/mujoco; sudo cp ~/.local/mujoco/lib/libmujoco.so /usr/lib/libmujoco.so; sudo cp ~/.local/mujoco/lib/libmujoco.so.2.3.1 /usr/lib/libmujoco.so.2.3.1 | |
- name: Run clippy | |
uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: -- -D warnings | |
# Run cargo fmt --all -- --check | |
format: | |
name: Format | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
profile: minimal | |
components: rustfmt | |
override: true | |
- name: Run cargo fmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check |