light/.drone.yml

126 lines
2.6 KiB
YAML
Raw Normal View History

2024-10-14 12:30:52 +03:30
kind: pipeline
type: docker
name: linux_amd64
environment:
CONAN_REVISIONS_ENABLED: "1"
2024-10-14 12:30:52 +03:30
platform:
os: linux
arch: amd64
2024-10-14 13:18:51 +03:30
volumes:
2024-10-14 13:47:25 +03:30
- name: dockersock
host:
path: /var/run/docker.sock
2024-10-14 14:17:18 +03:30
- name: py
temp: {}
- name: conan
host:
2024-10-14 21:25:14 +03:30
path: /root/.conan2/
2024-10-14 13:54:14 +03:30
services:
- name: docker
image: docker:dind
privileged: true
volumes:
- name: dockersock
2024-10-14 13:57:17 +03:30
path: /var/run/
2024-10-14 13:54:14 +03:30
steps:
2024-10-14 14:34:38 +03:30
- name: setup_environment
2024-10-14 13:58:31 +03:30
image: docker:latest
2024-10-14 13:37:21 +03:30
volumes:
- name: dockersock
2024-10-14 13:47:25 +03:30
path: /var/run/docker.sock
2024-10-14 12:09:44 +03:30
commands:
2024-10-14 13:56:06 +03:30
- until docker info; do echo "Waiting for Docker daemon..."; sleep 1; done
2024-10-14 13:52:07 +03:30
- docker build -t ubuntu_amd64 -f ./tools/docker/linux_amd64 .
2024-10-14 13:23:01 +03:30
- docker images
2024-10-14 14:34:38 +03:30
- name: log_info
2024-10-14 13:47:25 +03:30
image: ubuntu_amd64:latest
pull: if-not-exists
2024-10-14 14:17:18 +03:30
volumes:
- name: py
path: /opt/venv/
2024-10-14 12:09:44 +03:30
commands:
2024-10-14 14:08:31 +03:30
- . /opt/venv/bin/activate
2024-10-14 21:24:20 +03:30
- whoami
2024-10-14 14:34:38 +03:30
- uname -a
2024-10-14 12:09:44 +03:30
- pip --version
2024-10-14 14:08:31 +03:30
- python3 --version
2024-10-14 12:09:44 +03:30
- conan --version
- gcc --version
- g++ --version
- clang --version
- clang++ --version
- clang-tidy --version
2024-10-14 12:32:48 +03:30
- name: build_gcc
2024-10-14 13:47:25 +03:30
image: ubuntu_amd64:latest
pull: if-not-exists
2024-10-14 14:17:18 +03:30
volumes:
- name: py
path: /opt/venv/
- name: conan
2024-10-14 21:25:14 +03:30
path: /root/.conan2
2024-10-14 12:09:44 +03:30
commands:
- . /opt/venv/bin/activate
2024-10-14 14:27:22 +03:30
- rm -rvf ./build
2024-10-14 12:09:44 +03:30
- export CC=$(which gcc)
- export CXX=$(which g++)
- conan profile detect
- cp ./tools/conan/profiles/linux_gcc_amd64 $(conan profile path default)
- conan install . --build=missing
- conan build .
- ./build/Release/modules/light/light
2024-10-14 12:32:48 +03:30
- name: build_clang
2024-10-14 13:47:25 +03:30
image: ubuntu_amd64:latest
pull: if-not-exists
2024-10-14 14:17:18 +03:30
volumes:
- name: py
path: /opt/venv/
- name: conan
2024-10-14 21:25:14 +03:30
path: /root/.conan2
2024-10-14 12:09:44 +03:30
commands:
- . /opt/venv/bin/activate
2024-10-14 14:27:22 +03:30
- rm -rvf ./build
2024-10-14 12:09:44 +03:30
- export CC=$(which clang)
- export CXX=$(which clang++)
- conan profile detect
- cp ./tools/conan/profiles/linux_clang_amd64 $(conan profile path default)
- conan install . --build=missing
- conan build .
- ./build/Release/modules/light/light
2024-10-14 12:32:48 +03:30
- name: static_analysis
2024-10-14 13:47:25 +03:30
image: ubuntu_amd64:latest
pull: if-not-exists
2024-10-14 12:09:44 +03:30
commands:
- echo "[TODO] Implement static analysis"
2024-10-14 12:32:48 +03:30
- name: run_tests
2024-10-14 13:47:25 +03:30
image: ubuntu_amd64:latest
pull: if-not-exists
2024-10-14 12:09:44 +03:30
commands:
2024-10-14 14:35:05 +03:30
- echo "[TODO] Implement tests"
2024-10-14 14:17:18 +03:30
- ./build/Release/modules/light/light
2024-10-14 12:09:44 +03:30
2024-10-14 12:32:48 +03:30
- name: report_coverage
2024-10-14 13:47:25 +03:30
image: ubuntu_amd64:latest
pull: if-not-exists
2024-10-14 12:09:44 +03:30
commands:
2024-10-14 14:35:05 +03:30
- echo "[TODO] Implement coverage report"