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: Add GitHub actions in dev container #11

Merged
merged 1 commit into from
Jul 3, 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
11 changes: 9 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ env:
jobs:
format_code:
uses: ./.github/workflows/ci_format_code.yml
lint:
uses: ./.github/workflows/ci_lint.yml
build_dev_container:
uses: ./.github/workflows/ci_build_dev_container.yml
build:
needs: build_dev_container
uses: ./.github/workflows/ci_build.yml
test:
needs: build_dev_container
uses: ./.github/workflows/ci_test.yml
lint:
needs: build_dev_container
uses: ./.github/workflows/ci_lint.yml
21 changes: 21 additions & 0 deletions .github/workflows/ci_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CI Build
'on':
workflow_call: null
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Cargo build
uses: devcontainers/[email protected]
with:
cacheFrom: ghcr.io/vorausrobotik/voraus-ros-bridge-dev
runCmd: cargo build --verbose
push: never
22 changes: 22 additions & 0 deletions .github/workflows/ci_build_dev_container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: CI build dev container
'on':
workflow_call: null
jobs:
build_dev_container:
runs-on: ubuntu-latest
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pre-build dev container image
uses: devcontainers/[email protected]
with:
imageName: ghcr.io/vorausrobotik/voraus-ros-bridge-dev
cacheFrom: ghcr.io/vorausrobotik/voraus-ros-bridge-dev
push: filter
refFilterForPush: refs/heads/main
12 changes: 11 additions & 1 deletion .github/workflows/ci_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,15 @@ jobs:
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Cargo Clippy
run: cargo clippy --all-targets --all-features -- -Dwarnings
uses: devcontainers/[email protected]
with:
cacheFrom: ghcr.io/vorausrobotik/voraus-ros-bridge-dev
runCmd: cargo clippy --all-targets --all-features -- -Dwarnings
push: never
12 changes: 11 additions & 1 deletion .github/workflows/ci_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,15 @@ jobs:
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Cargo test
run: cargo test --verbose
uses: devcontainers/[email protected]
with:
cacheFrom: ghcr.io/vorausrobotik/voraus-ros-bridge-dev
runCmd: cargo test --verbose
push: never
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![CI](https://github.com/vorausrobotik/voraus-ros-bridge/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/vorausrobotik/voraus-ros-bridge/actions/workflows/ci.yml)

# voraus-ros-bridge

Enables `voraus.core` integration within the ROS framework.
Expand Down
Loading