light/.drone.yml

105 lines
2.1 KiB
YAML

kind: pipeline
type: docker
name: linux_amd64
platform:
os: linux
arch: amd64
workspace:
path: /opt
volumes:
- name: dockersock
host:
path: /var/run/docker.sock
services:
- name: docker
image: docker:dind
privileged: true
volumes:
- name: dockersock
path: /var/run
steps:
- name: setup_image
image: docker:dind
commands:
- until docker info; do echo "Waiting for Docker daemon..."; sleep 1; done
- docker build -t ubuntu_amd64 -f ./tools/docker/linux_amd64 .
- name: wait_for_image
image: alpine
commands:
- sleep 5
- name: list_images
image: docker:dind
commands:
- docker images
- name: setup_conan
image: ubuntu_amd64
environment:
CONAN_REVISIONS_ENABLED: "1"
commands:
- . /opt/venv/bin/activate
- pip install conan==2.5.0
- name: echo_info
image: ubuntu_amd64
commands:
- pip --version
- python --version
- conan --version
- gcc --version
- g++ --version
- clang --version
- clang++ --version
- clang-tidy --version
- clang-format --version
- name: build_gcc
image: ubuntu_amd64
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
- name: build_clang
image: ubuntu_amd64
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
- name: static_analysis
image: ubuntu_amd64
commands:
- echo "[TODO] Implement static analysis"
- name: run_tests
image: ubuntu_amd64
commands:
- echp "[TODO] Implement tests"
- name: report_coverage
image: ubuntu_amd64
commands:
- echp "[TODO] Implement coverage report"