-
Notifications
You must be signed in to change notification settings - Fork 89
85 lines (81 loc) · 3.78 KB
/
containers.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Celix build containers
on:
push:
pull_request:
jobs:
container-conan-build-ubuntu:
runs-on: ubuntu-22.04
timeout-minutes: 120
steps:
- name: Checkout source code
uses: actions/[email protected]
- name: Cache Conan
uses: actions/cache@v3
with:
path: ~/.conan2-container
key: conan-container-cache-${{ runner.os }}-${{ hashFiles('conanfile.py', '.devcontainer/Containerfile') }}
restore-keys: conan-container-cache-${{ runner.os }}-
- name: Build container image
run: |
docker build --tag apache/celix-conan-build:latest --target conan-build --file .devcontainer/Containerfile .
- name: Build Celix dependencies
run: | #Using .conan2-container so that the steps can be reproduced locally without affecting the host conan
mkdir -p ~/.conan2-container/profiles && \
cp .devcontainer/conan-container-default-profile ~/.conan2-container/profiles/default && \
cp .devcontainer/conan-container-debug-profile ~/.conan2-container/profiles/debug && \
docker run --rm -v ~/.conan2-container:/root/.conan2 -v $(pwd):/workspace \
apache/celix-conan-build:latest /bin/bash -c \
"cd /workspace && \
conan install . --build missing --profile debug \
--options celix/*:build_all=True --options celix/*:enable_address_sanitizer=True \
--options celix/*:enable_testing=True --options celix/*:enable_ccache=True \
--conf:build tools.cmake.cmaketoolchain:generator=Ninja \
--output-folder build"
- name: Build Celix
run: |
docker run --rm -v ~/.conan2-container:/root/.conan2 -v $(pwd):/workspace \
apache/celix-conan-build:latest /bin/bash -c \
"cd /workspace && \
conan build . --profile debug \
--options celix/*:build_all=True --options celix/*:enable_address_sanitizer=True \
--options celix/*:enable_testing=True --options celix/*:enable_ccache=True \
--conf:build tools.cmake.cmaketoolchain:generator=Ninja \
--output-folder build"
- name: Test Celix
run: |
docker run --rm -v ~/.conan2-container:/root/.conan2 -v $(pwd):/workspace \
apache/celix-conan-build:latest /bin/bash -c \
"cd /workspace/build && \
source conanrun.sh && \
ctest --output-on-failure -E unit_test_discovery_zeroconf"
container-apt-build-ubuntu:
runs-on: ubuntu-22.04
timeout-minutes: 120
steps:
- name: Checkout source code
uses: actions/[email protected]
- name: Build container image
run: |
docker build --tag apache/celix-apt-build:latest --target apt-build --file .devcontainer/Containerfile .
- 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"
- 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
timeout-minutes: 120
steps:
- name: Checkout source code
uses: actions/[email protected]
- name: Build dev container images
run: |
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 .