-
-
Notifications
You must be signed in to change notification settings - Fork 568
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflows,dockerfiles: Add basic build tests
Add simple build tests using github workflows. This is initial commit, and i suggest to inspect if all dependencies installed. Signed-off-by: Denys Fedoryshchenko <[email protected]>
- Loading branch information
1 parent
e65727c
commit a509826
Showing
6 changed files
with
125 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Run docker builds | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build_debian: | ||
strategy: | ||
matrix: | ||
# gcc-13+,clang-16+ will fail due broken capnp supplied with debian bookworm | ||
os: [debian, debian-gcc-12, debian-clang-15, ubuntu-24.04, ubuntu-24.10] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: chdir | ||
run: cd $GITHUB_WORKSPACE | ||
|
||
- name: Build Docker image | ||
run: docker build -t debian -f tests/Dockerfile.${{ matrix.os }} . |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM debian:bookworm | ||
|
||
# non-interactive | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# install build dependencies | ||
RUN apt-get update | ||
RUN apt-get install -y --no-install-recommends build-essential git ca-certificates cmake libssl-dev\ | ||
capnproto libcapnp-dev libelf-dev libbpf-dev libpcap-dev libgrpc-dev libgrpc++-dev libprotobuf-dev\ | ||
protobuf-compiler libprotoc-dev libprotobuf-dev protobuf-compiler-grpc libboost-dev\ | ||
libboost-serialization-dev libboost-thread-dev libboost-regex-dev libboost-program-options-dev\ | ||
libmongoc-dev liblog4cpp5-dev | ||
|
||
COPY src/ /src/ | ||
WORKDIR /src | ||
RUN mkdir build && cd build && cmake .. -DLINK_WITH_ABSL=ON\ | ||
&& make -j$(nproc) |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM debian:bookworm | ||
|
||
# non-interactive | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# install build dependencies | ||
RUN apt-get update | ||
RUN apt-get install -y --no-install-recommends build-essential git ca-certificates cmake libssl-dev\ | ||
capnproto libcapnp-dev libelf-dev libbpf-dev libpcap-dev libgrpc-dev libgrpc++-dev libprotobuf-dev\ | ||
protobuf-compiler libprotoc-dev libprotobuf-dev protobuf-compiler-grpc libboost-dev\ | ||
libboost-serialization-dev libboost-thread-dev libboost-regex-dev libboost-program-options-dev\ | ||
libmongoc-dev liblog4cpp5-dev libncurses-dev | ||
|
||
# install clang-15 | ||
RUN apt-get install -y --no-install-recommends clang-15 | ||
|
||
# set clang-15 as default compiler | ||
RUN update-alternatives --install /usr/bin/cc cc /usr/bin/clang-15 100 | ||
RUN update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-15 100 | ||
|
||
|
||
COPY src/ /src/ | ||
WORKDIR /src | ||
RUN mkdir build && cd build && cmake .. -DLINK_WITH_ABSL=ON\ | ||
&& make -j$(nproc) |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM gcc:12-bookworm | ||
|
||
# non-interactive | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# install build dependencies | ||
RUN apt-get update | ||
RUN apt-get install -y --no-install-recommends build-essential git ca-certificates cmake libssl-dev\ | ||
capnproto libcapnp-dev libelf-dev libbpf-dev libpcap-dev libgrpc-dev libgrpc++-dev libprotobuf-dev\ | ||
protobuf-compiler libprotoc-dev libprotobuf-dev protobuf-compiler-grpc libboost-dev\ | ||
libboost-serialization-dev libboost-thread-dev libboost-regex-dev libboost-program-options-dev\ | ||
libmongoc-dev liblog4cpp5-dev | ||
|
||
|
||
COPY src/ /src/ | ||
WORKDIR /src | ||
RUN mkdir build && cd build && cmake .. -DLINK_WITH_ABSL=ON\ | ||
&& make -j$(nproc) |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM ubuntu:24.04 | ||
|
||
# non-interactive | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# install build dependencies | ||
RUN apt-get update | ||
RUN apt-get install -y --no-install-recommends build-essential git ca-certificates cmake libssl-dev\ | ||
capnproto libcapnp-dev libelf-dev libbpf-dev libpcap-dev libgrpc-dev libgrpc++-dev libprotobuf-dev\ | ||
protobuf-compiler libprotoc-dev libprotobuf-dev protobuf-compiler-grpc libboost-dev\ | ||
libboost-serialization-dev libboost-thread-dev libboost-regex-dev libboost-program-options-dev\ | ||
libmongoc-dev liblog4cpp5-dev libncurses5-dev | ||
|
||
# absl | ||
RUN apt-get install -y --no-install-recommends libabsl-dev | ||
|
||
COPY src/ /src/ | ||
WORKDIR /src | ||
RUN mkdir build && cd build && cmake .. -DLINK_WITH_ABSL=ON\ | ||
&& make |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM ubuntu:24.10 | ||
|
||
# non-interactive | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# install build dependencies | ||
RUN apt-get update | ||
RUN apt-get install -y --no-install-recommends build-essential git ca-certificates cmake libssl-dev\ | ||
capnproto libcapnp-dev libelf-dev libbpf-dev libpcap-dev libgrpc-dev libgrpc++-dev libprotobuf-dev\ | ||
protobuf-compiler libprotoc-dev libprotobuf-dev protobuf-compiler-grpc libboost-dev\ | ||
libboost-serialization-dev libboost-thread-dev libboost-regex-dev libboost-program-options-dev\ | ||
libmongoc-dev liblog4cpp5-dev libncurses5-dev | ||
|
||
# absl | ||
RUN apt-get install -y --no-install-recommends libabsl-dev | ||
|
||
COPY src/ /src/ | ||
WORKDIR /src | ||
RUN mkdir build && cd build && cmake .. -DLINK_WITH_ABSL=ON\ | ||
&& make |