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

ci: use matrix to reduce duplication #20

Merged
merged 2 commits into from
May 16, 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
62 changes: 62 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: ci

on:
schedule:
# * is a special character in YAML so you have to quote this string
# The final 1 indicates that we want to run this test on Tuesdays, making
# this a weekly test.
- cron: '30 2 * * 1'
workflow_dispatch:
pull_request:
push:
branches: main

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ${{ matrix.runs-on }}-latest
strategy:
matrix:
runs-on: [ubuntu, windows]

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

- name: Install Rustup on Windows
if: matrix.runs-on == 'windows'
run: |
# Disable the download progress bar which can cause perf issues
$ProgressPreference = "SilentlyContinue"
Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe
.\rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --default-toolchain=none
del rustup-init.exe

- name: Set Rust version to nightly
run: rustup default nightly

- name: Add Windows target
if: matrix.runs-on == 'windows'
run: |
rustc -Vv
cargo -V
rustup target add x86_64-pc-windows-msvc

- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Build workspace
run: cargo build --workspace --tests

- name: Run tests
run: cargo test --tests
32 changes: 0 additions & 32 deletions .github/workflows/ci_linux.yaml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/ci_windows.yaml

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[![style](https://github.com/open-rmf/mapf/actions/workflows/style.yaml/badge.svg)](https://github.com/open-rmf/mapf/actions/workflows/style.yaml)
[![ci_linux](https://github.com/open-rmf/mapf/actions/workflows/ci_linux.yaml/badge.svg)](https://github.com/open-rmf/mapf/actions/workflows/ci_linux.yaml)
[![ci_windows](https://github.com/open-rmf/mapf/actions/workflows/ci_windows.yaml/badge.svg)](https://github.com/open-rmf/mapf/actions/workflows/ci_windows.yaml)
[![ci](https://github.com/open-rmf/mapf/actions/workflows/ci.yaml/badge.svg)](https://github.com/open-rmf/mapf/actions/workflows/ci.yaml)

# multi-agent (path finding) planning framework

Expand Down
Loading