From cac0963494e767a19d3cb94072a029cad5d71447 Mon Sep 17 00:00:00 2001 From: Siddharth Chandrasekaran Date: Fri, 22 Mar 2024 17:13:22 +0100 Subject: [PATCH] ci: Enhance to run on different platforms; start doc builds Signed-off-by: Siddharth Chandrasekaran --- .github/workflows/build-ci.yml | 57 ++++++++++++----------- .github/workflows/cross-plaform-build.yml | 4 ++ 2 files changed, 35 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build-ci.yml b/.github/workflows/build-ci.yml index a00916b..07be6ed 100644 --- a/.github/workflows/build-ci.yml +++ b/.github/workflows/build-ci.yml @@ -19,21 +19,16 @@ jobs: - uses: actions/checkout@v1 with: submodules: recursive - - name: configure - run: | - cmake -DCMAKE_BUILD_TYPE=Debug . - - name: make - run: VERBOSE=1 make - - name: pacakge - run: | - make package - make package_source - rm -rf ./packages/_CPack_Packages/ - rm -f ./packages/*.tar.bz2 + - name: Configure + run: cmake -DCMAKE_BUILD_TYPE=Debug . + - name: Build + run: cmake --build . --parallel 7 + - name: Package + run: cmake --build . --target package --target package_source - uses: actions/upload-artifact@v2 with: - name: libosdp-ci-binaries.zip - path: ./packages/ + name: libosdp-ubuntu-latest-binaries.zip + path: artifacts/ MakeBuild: runs-on: ubuntu-latest @@ -47,20 +42,33 @@ jobs: - name: make run: make V=1 - Test: + DocBuild: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 with: submodules: recursive - - name: configure - run: cmake . - - name: pytest - run: | - ./tests/pytest/run.sh - - name: unit-tests + - name: Install dependencies run: | - make check-ut + apt install -y python3-sphinx + pip3 install -r doc/requirements.txt + - name: Configure + run: cmake -DCMAKE_BUILD_TYPE=Debug . + - name: Build docs + run: cmake --build . --parallel 7 --target html_docs + + Test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + with: + submodules: recursive + - name: Configure + run: cmake -DCMAKE_BUILD_TYPE=Debug . + - name: Run unit-tests + run: cmake --build . --parallel 7 --target check-ut + - name: Run pytest + run: tests/pytest/run.sh CheckPatch: runs-on: ubuntu-latest @@ -81,12 +89,9 @@ jobs: with: submodules: recursive - name: Install pypa/build - run: | - python3 -m pip install build --user + run: python3 -m pip install build --user - name: Build a binary wheel and a source tarball - run: | - pushd python - python3 -m build + run: python3 -m build python - name: Store the distribution packages uses: actions/upload-artifact@v3 with: diff --git a/.github/workflows/cross-plaform-build.yml b/.github/workflows/cross-plaform-build.yml index a97652d..be6a0b3 100644 --- a/.github/workflows/cross-plaform-build.yml +++ b/.github/workflows/cross-plaform-build.yml @@ -25,6 +25,10 @@ jobs: run: cmake -B build -DCMAKE_BUILD_TYPE=Debug -DCONFIG_OSDP_LIB_ONLY=on . - name: Build run: cmake --build build --parallel 8 + - name: Run unit-tests + run: cmake --build build --target check-ut + - name: Run pytest + run: tests/pytest/run.sh - name: Pack built binaries run: cmake --build build --target package - name: Upload artifacts