Skip to content

Commit

Permalink
WIP: ci: Add github action for basic CI
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp-caspers committed Jun 13, 2024
1 parent a8389f3 commit 741d7da
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ RUN echo "source /opt/ros/humble/setup.sh" >> /root/.bashrc
RUN . /opt/ros/humble/setup.sh && colcon build
RUN echo "source /ros_deps/install/setup.sh" >> /root/.bashrc

ENV CARGO_TERM_COLOR=always
ENV RUSTFLAGS="-Dwarnings"

RUN mkdir -p /workspace
WORKDIR /workspace

Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build Test Lint

on:
push:
pull_request:



jobs:
build_and_test:
runs-on: ubuntu-latest
steps:

- name: Checkout (GitHub)
uses: actions/checkout@v4

- name: Cargo build and test
uses: devcontainers/[email protected]
with:
runCmd: cargo build --verbose
runCmd: cargo test --verbose

lint:
runs-on: ubuntu-latest
steps:

- name: Checkout (GitHub)
uses: actions/checkout@v4

- name: Cargo Clippy
uses: devcontainers/[email protected]
with:
runCmd: cargo clippy --all-targets --all-features

# jobs:

# build_and_test:
# name: Build and Test
# runs-on: ubuntu-latest
# strategy:
# matrix:
# toolchain:
# - stable
# - beta
# - nightly
# steps:
# - uses: actions/checkout@v3
# - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
# - run: cargo build --verbose
# - run: cargo test --verbose
# lint:
# name: clippy check
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Run Clippy
# run: cargo clippy --all-targets --all-features

0 comments on commit 741d7da

Please sign in to comment.