-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: ci: Add github action for basic CI
tmp: Test ci: Run entrypoint script ci: Fix entrypoint execution on devcontainer entry ci: Add GitHub container registry ci: Split up GitHub Actions
- Loading branch information
1 parent
db261c8
commit 1504fef
Showing
9 changed files
with
131 additions
and
1 deletion.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
#!/bin/bash | ||
|
||
# Build the package mounted in the container | ||
echo "Building workspace with colcon" | ||
. /opt/ros/humble/setup.sh && . /ros_deps/install/setup.sh && colcon build | ||
echo "source /workspace/install/setup.sh" >> /root/.bashrc | ||
/bin/bash | ||
|
||
# Run the CMD (either the default from the Dockerfile or the one provided as docker run argument) | ||
exec "$@" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
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 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: CI Build | ||
|
||
on: | ||
workflow_call: | ||
|
||
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: | ||
imageName: ghcr.io/vorausrobotik/voraus-ros-bridge-dev | ||
runCmd: cargo build --verbose |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: CI build dev container | ||
|
||
on: | ||
workflow_call: | ||
|
||
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: always |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: CI Lint | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
lint: | ||
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 Clippy | ||
uses: devcontainers/[email protected] | ||
with: | ||
imageName: ghcr.io/vorausrobotik/voraus-ros-bridge-dev | ||
runCmd: cargo clippy --all-targets --all-features |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: CI Test | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
test: | ||
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 test | ||
uses: devcontainers/[email protected] | ||
with: | ||
imageName: ghcr.io/vorausrobotik/voraus-ros-bridge-dev | ||
runCmd: cargo test --verbose |
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