light/.drone.yml

114 lines
2.3 KiB
YAML
Raw Normal View History

2024-10-14 09:00:52 +00:00
kind: pipeline
type: docker
name: linux_amd64
platform:
os: linux
arch: amd64
workspace:
path: /opt
2024-10-14 09:48:51 +00:00
volumes:
2024-10-14 10:04:52 +00:00
- name: dockersock
host:
2024-10-14 10:08:04 +00:00
path: /var/run/
2024-10-14 09:48:51 +00:00
2024-10-14 09:32:00 +00:00
services:
2024-10-14 09:48:51 +00:00
- name: docker
image: docker:dind
privileged: true
volumes:
- name: dockersock
path: /var/run
2024-10-14 09:32:00 +00:00
steps:
2024-10-14 09:27:37 +00:00
- name: setup_image
2024-10-14 10:06:06 +00:00
image: docker:dind
2024-10-14 10:07:21 +00:00
volumes:
- name: dockersock
path: /var/run
2024-10-14 08:39:44 +00:00
commands:
2024-10-14 09:45:22 +00:00
- until docker info; do echo "Waiting for Docker daemon..."; sleep 1; done
2024-10-14 09:27:37 +00:00
- docker build -t ubuntu_amd64 -f ./tools/docker/linux_amd64 .
2024-10-14 08:39:44 +00:00
2024-10-14 09:53:01 +00:00
- name: wait_for_image
image: alpine
commands:
- sleep 5
- name: list_images
2024-10-14 09:56:06 +00:00
image: docker:dind
2024-10-14 10:10:51 +00:00
volumes:
- name: dockersock
path: /var/run
2024-10-14 09:53:01 +00:00
commands:
- docker images
2024-10-14 09:02:48 +00:00
- name: setup_conan
2024-10-14 10:10:51 +00:00
volumes:
- name: dockersock
path: /var/run
2024-10-14 10:04:52 +00:00
image: ubuntu_amd64
2024-10-14 08:39:44 +00:00
environment:
CONAN_REVISIONS_ENABLED: "1"
commands:
- . /opt/venv/bin/activate
- pip install conan==2.5.0
2024-10-14 09:02:48 +00:00
- name: echo_info
2024-10-14 09:27:37 +00:00
image: ubuntu_amd64
2024-10-14 08:39:44 +00:00
commands:
- pip --version
- python --version
- conan --version
- gcc --version
- g++ --version
- clang --version
- clang++ --version
- clang-tidy --version
- clang-format --version
2024-10-14 09:02:48 +00:00
- name: build_gcc
2024-10-14 09:27:37 +00:00
image: ubuntu_amd64
2024-10-14 08:39:44 +00:00
commands:
- rm -rv ./build
- 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 09:27:37 +00:00
image: ubuntu_amd64
2024-10-14 08:39:44 +00:00
commands:
- rm -rv ./build
- 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 09:27:37 +00:00
image: ubuntu_amd64
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 09:27:37 +00:00
image: ubuntu_amd64
2024-10-14 08:39:44 +00:00
commands:
- echp "[TODO] Implement tests"
2024-10-14 09:02:48 +00:00
- name: report_coverage
2024-10-14 09:27:37 +00:00
image: ubuntu_amd64
2024-10-14 08:39:44 +00:00
commands:
- echp "[TODO] Implement coverage report"