Combine container build ci with devcontainer setup #385
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
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: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 120 | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v3.3.0 | |
- name: Build container image | |
run: | | |
docker build -t apache/celix-conan-build:latest --target conan-build -f .devcontainer/Containerfile | |
- name: Build and test Celix the conan container image | |
run: | | |
docker run --rm -v $(pwd):/workspace --userns=keep-id 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 && \ | |
source conanrun.sh && \ | |
ctest --output-on-failure" | |
container-apt-build-ubuntu: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 120 | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v3.3.0 | |
- name: Build container image | |
run: | | |
docker build -t apache/celix-apt-build:latest --target apt-build -f .devcontainer/Containerfile | |
- name: Build and test Celix the conan container image | |
run: | | |
docker run --rm -v $(pwd):/workspace --userns=keep-id apache/celix-conan-build:latest /bin/bash -c \ | |
"cd /workspace && \ | |
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_EXPERIMENTAL=ON -DENABLE_TESTING=ON -DRSA_JSON_RPC=ON -DRSA_SHM=ON \ | |
-DRSA_REMOTE_SERVICE_ADMIN_SHM_V2=ON .. && \ | |
cd build && \ | |
make -j && \ | |
ctest --output-on-failure" | |
build-dev-container-images: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 120 | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v3.3.0 | |
- 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 |