light/.drone.yml

123 lines
2.6 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: {}
- name: conan
host:
2024-10-14 17:55:14 +00:00
path: /root/.conan2/
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 19:44:05 +00:00
- name: build 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 19:39:03 +00:00
- name: environment 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 17:54:20 +00:00
- whoami
2024-10-14 11:04:38 +00:00
- uname -a
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
2024-10-14 19:39:03 +00:00
- cmake --version
2024-10-14 08:39:44 +00:00
- gcc --version
- g++ --version
- clang --version
- clang++ --version
- clang-tidy --version
2024-10-14 19:44:05 +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/
- name: conan
2024-10-14 17:55:14 +00:00
path: /root/.conan2
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 19:48:30 +00:00
- export CC=$(which gcc)
- export CXX=$(which g++)
2024-10-14 19:44:05 +00:00
2024-10-14 19:47:20 +00:00
- conan install . --build=missing -pr='./tools/conan/profiles/linux_gcc_amd64'
2024-10-14 19:51:17 +00:00
- conan build . -pr='./tools/conan/profiles/linux_gcc_amd64'
2024-10-14 08:39:44 +00:00
- ./build/Release/modules/light/light
2024-10-14 19:44:05 +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/
- name: conan
2024-10-14 17:55:14 +00:00
path: /root/.conan2
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 19:48:30 +00:00
- export CC=$(which clang)
- export CXX=$(which clang++)
2024-10-14 19:44:05 +00:00
2024-10-14 19:47:20 +00:00
- conan install . --build=missing -pr='./tools/conan/profiles/linux_clang_amd64'
2024-10-14 19:51:17 +00:00
- conan build . -pr='./tools/conan/profiles/linux_clang_amd64'
2024-10-14 08:39:44 +00:00
- ./build/Release/modules/light/light
2024-10-14 19:44:05 +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 19:44:05 +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:
2024-10-14 11:05:05 +00:00
- echo "[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 19:44:05 +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:
2024-10-14 11:05:05 +00:00
- echo "[TODO] Implement coverage report"