Update macOS release build to CMake #288
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| pull_request: | |
| branches: | |
| - "*" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| upload-release: | |
| if: ${{ (github.event_name == 'workflow_dispatch') || (github.event_name != 'pull_request') }} | |
| runs-on: ubuntu-24.04 | |
| needs: [build-mac, build-mac-arm, build-linux, build-windows] | |
| steps: | |
| - name: download artifacts | |
| uses: actions/download-artifact@v4 | |
| - name: publish release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: Release ${{ github.sha }} | |
| prerelease: false | |
| files: | | |
| mac-uploads/sioyek-release-mac.zip | |
| mac-arm-uploads/sioyek-release-mac-arm.zip | |
| linux-uploads/sioyek-release-linux.zip | |
| windows-uploads/sioyek-release-windows.zip | |
| build-linux: | |
| runs-on: ubuntu-20.04 | |
| steps: | |
| - name: Cache apt-get packages | |
| uses: actions/cache@v4 | |
| env: | |
| cache-name: cache-deb-packages | |
| with: | |
| path: /var/cache/apt/archives | |
| key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-build-${{ env.cache-name }}- | |
| ${{ runner.os }}-build- | |
| ${{ runner.os }}- | |
| - name: Install LinuxDeploy | |
| uses: miurahr/install-linuxdeploy-action@v1 | |
| with: | |
| plugins: qt appimage | |
| - name: Set up GCC | |
| uses: egor-tensin/setup-gcc@v1 | |
| with: | |
| version: 9 | |
| platform: x64 | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: Install dependencies | |
| run: sudo apt install libharfbuzz-dev libxrandr-dev libxi-dev libglu1-mesa-dev fuse libxcb-cursor0 libspeechd2 | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: '6.7.2' | |
| modules: 'all' | |
| cache: true | |
| - name: Build | |
| working-directory: ${{env.GITHUB_WORKSPACE}} | |
| run: MAKE_PARALLEL=$(nproc) ./linuxdeploy_build_and_release.sh | |
| env: | |
| CC: gcc-9 | |
| CXX: g++-9 | |
| - name: upload linux artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-uploads | |
| path: sioyek-release-linux.zip | |
| - name: Workaround apt-get cache permission (https://github.com/actions/cache/issues/324) | |
| run: | | |
| export USER_NAME=$(whoami) | |
| sudo chown -R $USER_NAME /var/cache/apt/archives | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: '6.7.2' | |
| modules: 'all' | |
| cache: true | |
| - name: Add MSBuild to PATH | |
| uses: microsoft/setup-msbuild@v1.0.2 | |
| - name: Add msvc-dev-cmd | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Build Sioyek | |
| working-directory: ${{env.GITHUB_WORKSPACE}} | |
| run: .\build_windows.bat non_portable | |
| - name: upload windows artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-uploads | |
| path: sioyek-release-windows.zip | |
| build-mac: | |
| runs-on: macos-15-intel | |
| env: | |
| HOMEBREW_NO_AUTO_UPDATE: 1 | |
| HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: 1 | |
| HOMEBREW_NO_INSTALL_CLEANUP: 1 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: brew install cmake mupdf qtspeech | |
| - name: Build | |
| working-directory: ${{env.GITHUB_WORKSPACE}} | |
| run: MAKE_PARALLEL=$(sysctl -n hw.logicalcpu) bash ./build_mac.sh | |
| - name: upload mac artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mac-uploads | |
| path: sioyek-release-mac.zip | |
| build-mac-arm: | |
| runs-on: macos-15 | |
| env: | |
| HOMEBREW_NO_AUTO_UPDATE: 1 | |
| HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: 1 | |
| HOMEBREW_NO_INSTALL_CLEANUP: 1 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: brew install cmake mupdf qtspeech | |
| - name: Build | |
| working-directory: ${{env.GITHUB_WORKSPACE}} | |
| run: | | |
| MAKE_PARALLEL=$(sysctl -n hw.logicalcpu) bash ./build_mac.sh | |
| mv sioyek-release-mac.zip sioyek-release-mac-arm.zip | |
| - name: upload mac artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mac-arm-uploads | |
| path: sioyek-release-mac-arm.zip |