From e1e1d474194e43dd8f6e7c979c7f08fecc7b196e Mon Sep 17 00:00:00 2001 From: Joerg Steffens Date: Fri, 24 Jun 2022 20:29:07 +0200 Subject: [PATCH 1/2] github actions: build MacOS package --- .github/workflows/build-macos.yml | 82 +++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 .github/workflows/build-macos.yml diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml new file mode 100644 index 00000000000..e28c90bbd83 --- /dev/null +++ b/.github/workflows/build-macos.yml @@ -0,0 +1,82 @@ +name: Build Bareos Client on MacOS + +on: + workflow_dispatch: + inputs: + jenkins_id: + description: 'Id on the Jenkins server' + type: string + required: true + default: 'jid' + bareos_version: + description: 'Bareos version to build' + type: string + required: true + # Push is only required initially, + # otherwise the workflow is unknown and not callable by the REST API. + push: + paths: + - .github/workflows/build-macos.yml + +env: + target_dir: "${{ github.workspace }}/BUILD_RESULTS/MacOS" + +jobs: + build: + name: Build and test MacOS + runs-on: macos-12 + + steps: + - name: Check input variables + run: | + if [ -z "${{ inputs.bareos_version }}" ]; then + echo "::error ::Missing parameter 'bareos_version'" + exit 1 + fi + + - 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 -DVERSION_STRING="${{ inputs.bareos_version }}" + 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 + + - name: Upload pkg + uses: actions/upload-artifact@v3 + with: + name: MacOS + path: ${{ env.target_dir }}/*.pkg + retention-days: 1 From ad235fa6ca962e54f8af825f341062cad60d613d Mon Sep 17 00:00:00 2001 From: Joerg Steffens Date: Thu, 7 Jul 2022 12:56:42 +0200 Subject: [PATCH 2/2] updated CHANGELOG for #1192 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 372f17fde7b..f1ed9a941ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and since Bareos version 20 this project adheres to [Semantic Versioning](https: - Bareos 22 removes perl make_catalog_backup.pl in favor of an improved make_catalog_backup shell script. There is a compatibility-wrapper, but that only supports simple cases. If you applied changes to BackupCatalog Job, you should immediately migrate to use make_catalog_backup. See [catalog documentation](https://docs.bareos.org/TasksAndConcepts/CatalogMaintenance.html#backing-up-your-bareos-database) [PR #1081] ### Added +- github-actions: add workflow to build MacOS packages [PR #1192] - dird: add command line feature to print specific resources [PR #1153] - Python plugins: add default module_path to search path [PR #1038] - dird: extend the list command to be able to query volumes and pools by ID [PR #1041] @@ -189,7 +190,11 @@ and since Bareos version 20 this project adheres to [Semantic Versioning](https: [PR #1171]: https://github.com/bareos/bareos/pull/1171 [PR #1172]: https://github.com/bareos/bareos/pull/1172 [PR #1177]: https://github.com/bareos/bareos/pull/1177 +[PR #1179]: https://github.com/bareos/bareos/pull/1179 +[PR #1180]: https://github.com/bareos/bareos/pull/1180 [PR #1183]: https://github.com/bareos/bareos/pull/1183 [PR #1185]: https://github.com/bareos/bareos/pull/1185 [PR #1189]: https://github.com/bareos/bareos/pull/1189 +[PR #1192]: https://github.com/bareos/bareos/pull/1192 +[PR #1193]: https://github.com/bareos/bareos/pull/1193 [unreleased]: https://github.com/bareos/bareos/tree/master