From 2658b3112e0b54f97ca4f426f4ba9fc36fb220fa Mon Sep 17 00:00:00 2001 From: jo-hannes Date: Sat, 26 Oct 2024 19:21:57 +0200 Subject: [PATCH] Add macOS build --- .github/workflows/checks.yml | 4 ++-- .github/workflows/release.yml | 44 +++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index e315644..f81dab1 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -5,7 +5,7 @@ jobs: name: C/C++ code style check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Run clang-format style check for C/C++/Protobuf programs. uses: jidicula/clang-format-action@v4.11.0 with: @@ -15,5 +15,5 @@ jobs: name: Run ShellCheck runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ludeeus/action-shellcheck@master diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1ca8663 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,44 @@ +name: Release builds + +# Run only on tags +#on: +# push: +# tags: +# - '**' +on: + push: + +jobs: + build-mac: + name: Release build for macOS + runs-on: macos-latest + steps: + - name: Install Qt + uses: jurplel/install-qt-action@v4 + with: + version: 6.7.3 + + - name: Checkout sources + uses: actions/checkout@v4 + + - name: Set reusable strings + # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. + id: strings + shell: bash + run: echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" + + - name: Configure CMake + run: > + cmake -DCMAKE_OSX_ARCHITECTURES:STRING="x86_64;arm64" + -S ${{ github.workspace }} + -B ${{ steps.strings.outputs.build-output-dir }} + + - name: Build and package + run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --target package + + - name: Upload package + uses: actions/upload-artifact@v4 + with: + name: macOS_installer + path: ${{ steps.strings.outputs.build-output-dir }}/Aqua-mixtura-*-Darwin.dmg + retention-days: 5