cicd: add dockerfile image

This commit is contained in:
light7734 2024-10-14 12:57:37 +03:30
parent f05515f8fd
commit 9295fc2078
Signed by: light7734
GPG Key ID: 37FDF7099B2AB7A7
2 changed files with 25 additions and 12 deletions

View File

@ -10,23 +10,21 @@ workspace:
path: /opt path: /opt
steps: steps:
- name: install_dependencies - name: setup_image
image: ubuntu:latest image: docker:latest
commands: commands:
- apt update - docker build -t ubuntu_amd64 -f ./tools/docker/linux_amd64 .
- apt-get install -y build-essential cmake clang clang-tidy gcc g++ python3 python3-pip python3.12-venv
- name: setup_conan - name: setup_conan
image: ubuntu:latest image: ubuntu_amd64
environment: environment:
CONAN_REVISIONS_ENABLED: "1" CONAN_REVISIONS_ENABLED: "1"
commands: commands:
- python3 -m venv /opt/venv
- . /opt/venv/bin/activate - . /opt/venv/bin/activate
- pip install conan==2.5.0 - pip install conan==2.5.0
- name: echo_info - name: echo_info
image: ubuntu:latest image: ubuntu_amd64
commands: commands:
- pip --version - pip --version
- python --version - python --version
@ -39,7 +37,7 @@ steps:
- clang-format --version - clang-format --version
- name: build_gcc - name: build_gcc
image: ubuntu:latest image: ubuntu_amd64
commands: commands:
- rm -rv ./build - rm -rv ./build
- export CC=$(which gcc) - export CC=$(which gcc)
@ -53,7 +51,7 @@ steps:
- ./build/Release/modules/light/light - ./build/Release/modules/light/light
- name: build_clang - name: build_clang
image: ubuntu:latest image: ubuntu_amd64
commands: commands:
- rm -rv ./build - rm -rv ./build
- export CC=$(which clang) - export CC=$(which clang)
@ -67,16 +65,16 @@ steps:
- ./build/Release/modules/light/light - ./build/Release/modules/light/light
- name: static_analysis - name: static_analysis
image: ubuntu:latest image: ubuntu_amd64
commands: commands:
- echo "[TODO] Implement static analysis" - echo "[TODO] Implement static analysis"
- name: run_tests - name: run_tests
image: ubuntu:latest image: ubuntu_amd64
commands: commands:
- echp "[TODO] Implement tests" - echp "[TODO] Implement tests"
- name: report_coverage - name: report_coverage
image: ubuntu:latest image: ubuntu_amd64
commands: commands:
- echp "[TODO] Implement coverage report" - echp "[TODO] Implement coverage report"

15
tools/docker/linux_amd64 Normal file
View File

@ -0,0 +1,15 @@
FROM ubuntu:latest
RUN apt update
RUN apt-get install -y \
build-essential \
cmake \
clang \
clang-tidy \
gcc \
g++ \
python3 \
python3-pip \
python3.12-venv
RUN python3 -m venv /opt/venv