-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split container install, build & test in multiple steps
- Loading branch information
Showing
2 changed files
with
29 additions
and
13 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,6 @@ name: Celix build containers | |
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: '0 0 * * 0' # Weekly on Sunday at 00:00 UTC | ||
|
||
jobs: | ||
container-conan-build-ubuntu: | ||
|
@@ -16,16 +14,27 @@ jobs: | |
- name: Build container image | ||
run: | | ||
docker build --tag apache/celix-conan-build:latest --target conan-build --file .devcontainer/Containerfile . | ||
- name: Build and test Celix the conan container image | ||
- name: Build Celix dependencies | ||
run: | | ||
docker run --rm -v $(pwd):/workspace apache/celix-conan-build:latest /bin/bash -c \ | ||
mkdir -p ~/.conan2 && \ | ||
docker run --rm -v ~/.conan2:/root/.conan2 -v $(pwd):/workspace apache/celix-conan-build:latest /bin/bash -c \ | ||
"cd /workspace && \ | ||
conan install . --build missing --options build_all=True --options enable_address_sanitizer=True \ | ||
--options enable_testing=True --options enable_ccache=True --output-folder build \ | ||
--conf tools.cmake.cmaketoolchain:generator=Ninja" | ||
- name: Build Celix | ||
run: | | ||
docker run --rm -v ~/.conan2:/root/.conan2 -v $(pwd):/workspace apache/celix-conan-build:latest /bin/bash -c \ | ||
"cd /workspace && \ | ||
conan build . --build missing --options build_all=True --options enable_address_sanitizer=True \ | ||
--options enable_testing=True --options enable_ccache=True --output-folder build \ | ||
--conf tools.cmake.cmaketoolchain:generator=Ninja --settings build_type=Debug && \ | ||
cd build && \ | ||
--conf tools.cmake.cmaketoolchain:generator=Ninja --settings build_type=Debug" | ||
- name: Test Celix | ||
run: | | ||
docker run --rm -v ~/.conan2:/root/.conan2 -v $(pwd):/workspace apache/celix-conan-build:latest /bin/bash -c \ | ||
"cd /workspace/build && \ | ||
source conanrun.sh && \ | ||
ctest --output-on-failure" | ||
ctest --output-on-failure" | ||
container-apt-build-ubuntu: | ||
runs-on: ubuntu-22.04 | ||
|
@@ -36,14 +45,18 @@ jobs: | |
- name: Build container image | ||
run: | | ||
docker build --tag apache/celix-apt-build:latest --target apt-build --file .devcontainer/Containerfile . | ||
- name: Build and test Celix the conan container image | ||
- name: Build Celix | ||
run: | | ||
docker run --rm -v $(pwd):/workspace apache/celix-apt-build:latest /bin/bash -c \ | ||
"mkdir /workspace/build && cd /workspace/build && \ | ||
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_EXPERIMENTAL=ON -DENABLE_TESTING=ON -DRSA_JSON_RPC=ON \ | ||
-DRSA_REMOTE_SERVICE_ADMIN_SHM_V2=ON -DENABLE_CCACHE=ON .. && \ | ||
make -j && \ | ||
ctest --output-on-failure" | ||
make -j &&" | ||
- name: Test Celix | ||
run: | | ||
docker run --rm -v $(pwd):/workspace apache/celix-apt-build:latest /bin/bash -c \ | ||
"cd /workspace/build && \ | ||
ctest --output-on-failure" | ||
build-dev-container-images: | ||
runs-on: ubuntu-22.04 | ||
|
@@ -53,5 +66,5 @@ jobs: | |
uses: actions/[email protected] | ||
- name: Build dev container images | ||
run: | | ||
docker build -t apache/celix-conan-dev:latest --target conan-dev -f .devcontainer/Containerfile | ||
docker build -t apache/celix-apt-dev:latest --target apt-dev -f .devcontainer/Containerfile | ||
docker build --tag apache/celix-conan-dev:latest --target conan-dev --file .devcontainer/Containerfile . | ||
docker build --tag apache/celix-apt-dev:latest --target apt-dev --file .devcontainer/Containerfile . |