From d6db031971c85ddf5eb7fd323f0eb2103a05fe48 Mon Sep 17 00:00:00 2001 From: Michal Checinski Date: Fri, 29 Mar 2024 16:25:26 +0100 Subject: [PATCH] Add build cpp --- .github/workflows/build-cpp.yml | 42 +++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/build-cpp.yml diff --git a/.github/workflows/build-cpp.yml b/.github/workflows/build-cpp.yml new file mode 100644 index 000000000..58b3c5e4c --- /dev/null +++ b/.github/workflows/build-cpp.yml @@ -0,0 +1,42 @@ +name: Build C++ SDK + +on: + push: + branches: + - main + - rc + - hotfix-rc + + pull_request: + + +jobs: + generate-schemas: + uses: ./.github/workflows/generate_schemas.yml + + build: + name: Build + needs: generate-schemas + runs-on: ubuntu-22.04 + steps: + - name: Checkout Repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: install dependencies + run: | + sudo apt-get install nlohmann-json-dev + sudo apt-get install libboost-all-dev + + - name: Download schemas + uses: actions/download-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 + with: + name: sdk-schemas-cpp + path: languages/cpp/include + + - name: Build + working-directory: languages/cpp + run: | + mkdir build + cd build + cmake .. -DNLOHMANN=/path/to/include/nlohmann -DBOOST=/path/to/include/boost -DTARGET=../../target/release/libbitwarden_c.dylib + cmake --build .