diff options
Diffstat (limited to '.github/workflows/build-macos.yml')
-rw-r--r-- | .github/workflows/build-macos.yml | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml new file mode 100644 index 000000000..67a07ef8d --- /dev/null +++ b/.github/workflows/build-macos.yml @@ -0,0 +1,63 @@ +name: Build Bareos Client on MacOS + +on: + push: + branches: + - macbuild-of* +env: + target_dir: "${{ github.workspace }}/BUILD_RESULTS/MacOS" + +jobs: + build: + name: Build and test MacOS + runs-on: macos-12 + + steps: + + - name: "Checkout source" + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: "Checkout tags" + # for get-version.sh, an unshallow git checkout with tags is needed. + run: git fetch --tag + + - name: Install dependencies + run: | + brew install jansson + + - name: Build pkg + run: | + mkdir cmake-build + cd cmake-build + export CXXFLAGS="-I/usr/local/include" + cmake .. -Dclient-only=yes + make package VERBOSE=1 + ls -la ./*.pkg + mkdir -p "${{ env.target_dir }}" + mv ./*.pkg "${{ env.target_dir }}" + + - name: Ctest + run: | + cd cmake-build + # check if we are modern enough + if [ -f "../core/src/tests/bsock_mock.h" ]; then + result=0 + ctest --repeat until-pass:5 -V -S CTestScript.cmake || result=$? + if [ $result -eq 1 ]; then + echo "ctest result $result is expected and OK" + elif [ $result -eq 0 ]; then + echo "ctest result $result is expected and OK" + else + echo "ctest result $result is not 1 or 0, ERROR" + fi + fi + mv ./Testing "${{ env.target_dir }}" + + - name: Upload pkg + uses: actions/upload-artifact@v3 + with: + name: MacOS + path: ${{ env.target_dir }} + retention-days: 1 |