light/.drone.yml

111 lines
2.4 KiB
YAML
Raw Normal View History

2024-10-14 09:00:52 +00:00
kind: pipeline
type: docker
name: linux_amd64
environment:
CONAN_REVISIONS_ENABLED: "1"
2024-10-14 09:00:52 +00:00
platform:
os: linux
arch: amd64
2024-10-14 09:48:51 +00:00
volumes:
2024-10-14 10:17:25 +00:00
- name: dockersock
host:
path: /var/run/docker.sock
2024-10-14 10:47:18 +00:00
- name: py
temp: {}
2024-10-14 10:24:14 +00:00
services:
- name: docker
image: docker:dind
privileged: true
volumes:
- name: dockersock
2024-10-14 10:27:17 +00:00
path: /var/run/
2024-10-14 10:24:14 +00:00
steps:
2024-10-14 09:27:37 +00:00
- name: setup_image
2024-10-14 10:28:31 +00:00
image: docker:latest
2024-10-14 10:07:21 +00:00
volumes:
- name: dockersock
2024-10-14 10:17:25 +00:00
path: /var/run/docker.sock
2024-10-14 08:39:44 +00:00
commands:
2024-10-14 10:26:06 +00:00
- until docker info; do echo "Waiting for Docker daemon..."; sleep 1; done
2024-10-14 10:22:07 +00:00
- docker build -t ubuntu_amd64 -f ./tools/docker/linux_amd64 .
2024-10-14 09:53:01 +00:00
- docker images
2024-10-14 09:02:48 +00:00
- name: echo_info
2024-10-14 10:17:25 +00:00
image: ubuntu_amd64:latest
pull: if-not-exists
2024-10-14 10:47:18 +00:00
volumes:
- name: py
path: /opt/venv/
2024-10-14 08:39:44 +00:00
commands:
2024-10-14 10:38:31 +00:00
- . /opt/venv/bin/activate
2024-10-14 08:39:44 +00:00
- pip --version
2024-10-14 10:38:31 +00:00
- python3 --version
2024-10-14 08:39:44 +00:00
- conan --version
- gcc --version
- g++ --version
- clang --version
- clang++ --version
- clang-tidy --version
2024-10-14 09:02:48 +00:00
- name: build_gcc
2024-10-14 10:17:25 +00:00
image: ubuntu_amd64:latest
pull: if-not-exists
2024-10-14 10:47:18 +00:00
volumes:
- name: py
path: /opt/venv/
2024-10-14 08:39:44 +00:00
commands:
- . /opt/venv/bin/activate
2024-10-14 10:57:22 +00:00
- rm -rvf ./build
2024-10-14 08:39:44 +00:00
- 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 09:02:48 +00:00
- name: build_clang
2024-10-14 10:17:25 +00:00
image: ubuntu_amd64:latest
pull: if-not-exists
2024-10-14 10:47:18 +00:00
volumes:
- name: py
path: /opt/venv/
2024-10-14 08:39:44 +00:00
commands:
- . /opt/venv/bin/activate
2024-10-14 10:57:22 +00:00
- rm -rvf ./build
2024-10-14 08:39:44 +00:00
- 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 09:02:48 +00:00
- name: static_analysis
2024-10-14 10:17:25 +00:00
image: ubuntu_amd64:latest
pull: if-not-exists
2024-10-14 08:39:44 +00:00
commands:
- echo "[TODO] Implement static analysis"
2024-10-14 09:02:48 +00:00
- name: run_tests
2024-10-14 10:17:25 +00:00
image: ubuntu_amd64:latest
pull: if-not-exists
2024-10-14 08:39:44 +00:00
commands:
- echp "[TODO] Implement tests"
2024-10-14 10:47:18 +00:00
- ./build/Release/modules/light/light
2024-10-14 08:39:44 +00:00
2024-10-14 09:02:48 +00:00
- name: report_coverage
2024-10-14 10:17:25 +00:00
image: ubuntu_amd64:latest
pull: if-not-exists
2024-10-14 08:39:44 +00:00
commands:
- echp "[TODO] Implement coverage report"