Skip to content

Commit

Permalink
Merge branch 'master' into feature/dfi-cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
PengZheng committed Jan 9, 2024
2 parents 84b4578 + a800c42 commit dfc647c
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 13 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/containers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Celix development containers

on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0' # Weekly on Sunday at 00:00 UTC

jobs:
container-build-ubuntu:
runs-on: ubuntu-22.04
timeout-minutes: 120
steps:
- name: Checkout source code
uses: actions/[email protected]
- name: Build container image
run: |
cd $GITHUB_WORKSPACE/container/
./build-ubuntu-container.sh
- name: Build Celix using container image
run: |
cd $GITHUB_WORKSPACE/container/
./run-ubuntu-container.sh "mkdir -p build && cd build && ../container/support-scripts/build-all.sh && make -j"
- name: Run Celix tests using container image
run: |
cd $GITHUB_WORKSPACE/container/
./run-ubuntu-container.sh "cd build && ctest --output-on-failure"
container-build-gitpod:
runs-on: ubuntu-22.04
timeout-minutes: 120
steps:
- name: Checkout source code
uses: actions/[email protected]
- name: Build container image
run: |
cd $GITHUB_WORKSPACE/container/
docker build -t apache/celix-dev:gitpod-latest -f Containerfile.gitpod .
3 changes: 0 additions & 3 deletions container/Containerfile.gitpod
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
# specific language governing permissions and limitations
# under the License.

# SSH credentials:
# root@password

FROM docker.io/gitpod/workspace-full:2023-10-06-16-22-14@sha256:76d3041cc7a2caa00d6f4610ace0e15009c361515f3d5d9ee6690e4019adcfd4

# Switch to root user to install dependencies and configure sshd
Expand Down
11 changes: 5 additions & 6 deletions container/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ To always be able to develop on Celix with an up-to-date image, built the image
cd <project-root>

# Start a local container with the SSH daemon running
./container/start-ubuntu-container.sh
./container/run-ubuntu-container.sh
```

Now connect to the container via the remote container option of your favoured IDE and start building/developing.
Expand All @@ -35,22 +35,21 @@ When finished with development and testing, press `CTRL + \` to stop the SSH dae

### Start locally with only a bash shell

The start script allows passing of additional paramters, which will override the starting of the SSH daemon.
The start script allows passing of additional parameters, which will override the starting of the SSH daemon.
Execute the following commands to open a bash shell and build Celix from the command line:

```bash
cd <project-root>

# Start a local container and open a bash shell
./container/start-ubuntu-container.sh bash
./container/run-ubuntu-container.sh bash

# Build Apache Celix
mkdir celix-build
cd celix-build
mkdir -p build
cd build
../container/support-scripts/build-all.sh
make -j

# Run the unit tests for Apache Celix
ctest --output-on-failure
```

1 change: 0 additions & 1 deletion container/build-ubuntu-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ fi

cd "${SCRIPT_LOCATION}"
${CONTAINER_ENGINE} build -t apache/celix-dev:ubuntu-latest -f Containerfile.ubuntu .

Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,4 @@ ${CONTAINER_ENGINE} run -it --rm --privileged \
--volume "${CELIX_REPO_ROOT}":"${CELIX_REPO_ROOT}" \
--workdir "${CELIX_REPO_ROOT}" \
--security-opt label=disable \
apache/celix-dev:ubuntu-latest ${CONTAINER_COMMAND}

apache/celix-dev:ubuntu-latest bash -c "${CONTAINER_COMMAND}"
1 change: 0 additions & 1 deletion container/support-scripts/build-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DRSA_SHM=ON \
-DRSA_REMOTE_SERVICE_ADMIN_SHM_V2=ON \
..

0 comments on commit dfc647c

Please sign in to comment.