light/.drone.yml

112 lines
2.7 KiB
YAML

kind: pipeline
type: docker
name: build_linux_clang_amd64
platform:
os: linux
arch: amd64
steps:
- name: build
image: ubuntu:latest
commands:
- sed -i 's#http://archive.ubuntu.com/ubuntu/#http://ir.archive.ubuntu.com/ubuntu/#g' /etc/apt/sources.list.d/ubuntu.sources
- head -n -8 /etc/apt/sources.list.d/ubuntu.sources > tmp && mv tmp /etc/apt/sources.list.d/ubuntu.sources
- apt update
- apt-get install -y build-essential cmake clang gcc g++ python3 python3-pip python3.12-venv
- python3 -m venv /opt/venv
- . /opt/venv/bin/activate
- pip --version
- python --version
- pip install conan==2.5.0
- conan --version
- export CONAN_REVISIONS_ENABLED=1
- export CC=$(which clang)
- export CXX=$(which clang++)
- conan profile detect
- cp ./tools/conan/profiles/linux_clang_amd64 $(conan profile path default)
- conan remote add light https://artifactory.light7734.com/artifactory/api/conan/conan
- conan install . --output-folder=build -r light --build=missing
- cmake -Bbuild -DCMAKE_TOOLCHAIN_FILE=./build/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release
- cmake --build ./build/
- ./build/modules/light/light
---
kind: pipeline
type: docker
name: build_linux_gcc_amd64
platform:
os: linux
arch: amd64
steps:
- name: build
image: ubuntu:latest
commands:
- sed -i 's#http://archive.ubuntu.com/ubuntu/#http://ir.archive.ubuntu.com/ubuntu/#g' /etc/apt/sources.list.d/ubuntu.sources
- head -n -8 /etc/apt/sources.list.d/ubuntu.sources > tmp && mv tmp /etc/apt/sources.list.d/ubuntu.sources
- apt update
- apt-get install -y build-essential cmake clang gcc g++ python3 python3-pip python3.12-venv
- python3 -m venv /opt/venv
- . /opt/venv/bin/activate
- pip --version
- python --version
- pip install conan==2.5.0
- conan --version
- export CONAN_REVISIONS_ENABLED=1
- export CC=$(which gcc)
- export CXX=$(which g++)
- conan profile detect
- cp ./tools/conan/profiles/linux_gcc_amd64 $(conan profile path default)
- conan remote add light https://artifactory.light7734.com/artifactory/api/conan/conan
- conan install . --output-folder=build -r light --build=missing
- cmake -Bbuild -DCMAKE_TOOLCHAIN_FILE=./build/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release
- cmake --build ./build/
- ./build/modules/light/light
---
kind: pipeline
type: docker
name: static_analysis
platform:
os: linux
arch: amd64
steps:
- name: analysis
image: ubuntu:latest
commands:
- echo "[TODO] Implement static analysis"
---
kind: pipeline
type: docker
name: code_coverage
platform:
os: linux
arch: amd64
steps:
- name: analysis
image: ubuntu:latest
commands:
- echo "[TODO] Implement code coverage"