-
Notifications
You must be signed in to change notification settings - Fork 97
62 lines (60 loc) · 2.71 KB
/
containers.yml
File metadata and controls
62 lines (60 loc) · 2.71 KB
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
name: Celix 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/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c #v3.3.0
- name: Cache Conan
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf #v4.2.2
with:
path: ~/.conan2-container-package-cache
key: cache-conan-container-${{ runner.os }}-${{ github.job }}-${{ hashFiles('conanfile.py', '.devcontainer/*') }}
restore-keys: cache-conan-container-${{ runner.os }}-${{ github.job }}-
- name: Cache ccache
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf #v4.2.2
with:
path: ~/.ccache-container
key: cache-ccache-container-${{ runner.os }}-${{ github.job }}-${{ github.sha }}
restore-keys: cache-ccache-container-${{ runner.os }}-${{ github.job }}-
- name: Build container image
run: |
cd .devcontainer && \
docker build --tag apache/celix-conan-build:latest --target conan-build --file Containerfile .
- name: Build Celix
run: |
mkdir -p ~/.conan2-container-package-cache
chmod -R 777 ~/.conan2-container-package-cache
mkdir -p ~/.ccache-container
chmod -R 777 ~/.ccache-container
chmod -R 777 ${GITHUB_WORKSPACE}
docker run --rm \
-v ~/.conan2-container-package-cache:/home/celixdev/.conan2/p \
-v ~/.ccache-container:/bome/celixdev/.ccache \
-v $(pwd):/home/celixdev/workspace apache/celix-conan-build:latest /bin/bash -c \
"cd /home/celixdev/workspace && \
conan build . -pr:b release -pr:h debug --build=missing \
--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"
- name: Test Celix
run: |
docker run --rm \
-v ~/.conan2-container-package-cache:/home/celixdev/.conan2/p \
-v $(pwd):/home/celixdev/workspace apache/celix-conan-build:latest /bin/bash -c \
"cd /home/celixdev/workspace && \
ctest --preset conan-debug --output-on-failure -j1"
build-dev-container-images:
runs-on: ubuntu-22.04
timeout-minutes: 120
steps:
- name: Checkout source code
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c #v3.3.0
- name: Build dev container images
run: |
cd .devcontainer && \
docker build --tag apache/celix-conan-dev:latest --target conan-dev --file Containerfile .