cicd: setup drone (#1)
Co-authored-by: light7734 <mail@light7734.com> Reviewed-on: #1
This commit is contained in:
parent
c713c9fedd
commit
8dd81708e4
|
@ -0,0 +1,111 @@
|
|||
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"
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
[settings]
|
||||
arch=x86_64
|
||||
os=Linux
|
||||
compiler=clang
|
||||
compiler.version=17
|
||||
compiler.cppstd=gnu17
|
||||
compiler.libcxx=libstdc++11
|
||||
build_type=Release
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
[settings]
|
||||
arch=armv8
|
||||
os=Linux
|
||||
compiler=clang
|
||||
compiler.version=17
|
||||
compiler.cppstd=gnu17
|
||||
compiler.libcxx=libstdc++11
|
||||
build_type=Release
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
[settings]
|
||||
arch=x86_64
|
||||
os=Linux
|
||||
compiler=gcc
|
||||
compiler.version=14
|
||||
compiler.cppstd=gnu17
|
||||
compiler.libcxx=libstdc++11
|
||||
build_type=Release
|
|
@ -0,0 +1,8 @@
|
|||
[settings]
|
||||
arch=armv8
|
||||
os=Linux
|
||||
compiler=gcc
|
||||
compiler.version=14
|
||||
compiler.cppstd=gnu17
|
||||
compiler.libcxx=libstdc++11
|
||||
build_type=Release
|
Loading…
Reference in New Issue