liufang-robot Linux cpp build #113
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linux cpp build | |
run-name: ${{ github.actor }} Linux cpp build | |
on: | |
workflow_dispatch: | |
pull_request: | |
jobs: | |
linux_cpp_test: | |
# needs: linux_cpp_build | |
runs-on: ubuntu-latest | |
container: registry.cn-shanghai.aliyuncs.com/lebai/l-master:3.1.6 | |
steps: | |
- name: start nginx | |
run: nginx | |
- name: start daemon | |
run: | | |
systemctl start l-master-rc | |
systemctl start l-master-ds | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: install components | |
run: apt-get install -y build-essential doxygen graphviz python3-pip python3-dev | |
- name: install dependencies | |
run: pip3 install -r requirements.txt | |
- name: configure | |
run: cmake -S. -Bbuild -DBUILD_TESTING=ON -DBUILD_DOCUMENTATION=ON | |
- name: build | |
run: cmake --build build | |
- name: test | |
run: cmake --build build --target test | |
linux_cpp_build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install dependencies from apt-get | |
run: sudo apt-get install -y build-essential doxygen graphviz python3-pip python3-dev | |
- name: Install dependencies from pip | |
run: | | |
pip3 install -r requirements.txt | |
pip3 install clang-format | |
- name: Configure | |
run: cmake -S. -Bbuild -DBUILD_DEB=ON -DCLANG_FORMAT_CHECK=ON | |
- name: Build and pack | |
run: | | |
cmake --build build | |
cd build && cpack && cd .. | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
id: artifact | |
with: | |
name: lebai-linux-x64-deb | |
path: build/*.deb |