Build Starc for Linux #982
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 Starc for Linux | |
| env: | |
| APP_VERSION: 0.8.1 | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| create: | |
| tags: | |
| - v* | |
| workflow_dispatch: {} | |
| jobs: | |
| build_linux_qt5: | |
| name: Build Linux version with qt5 | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout sources for push or create tag event | |
| if: github.event_name != 'pull_request' | |
| uses: actions/checkout@master | |
| with: | |
| token: ${{ secrets.ACTION_RUNNER }} | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Checkout sources for pull request event | |
| if: github.event_name == 'pull_request' | |
| uses: actions/checkout@master | |
| - name: Checkout submodules for pull request event | |
| if: github.event_name == 'pull_request' | |
| shell: bash | |
| run: | | |
| git submodule update --init --recursive src/3rd_party/pdfhummus/ src/3rd_party/pdftextextraction/ | |
| - name: Add info about dev build to the env | |
| shell: bash | |
| run: | | |
| DEV_BUILD=$(git rev-list `git rev-list --tags --no-walk --max-count=1`..HEAD --count) | |
| echo "DEV_BUILD=$DEV_BUILD" >> $GITHUB_ENV | |
| if [ "$DEV_BUILD" -gt "0" ]; then | |
| echo "BUGSPLAT_VERSION=${{env.APP_VERSION}} dev $DEV_BUILD-qt5" >> $GITHUB_ENV | |
| else | |
| echo "BUGSPLAT_VERSION=${{env.APP_VERSION}}-qt5" >> $GITHUB_ENV | |
| fi | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| version: 5.15.2 | |
| target: desktop | |
| - name: Install dependencies | |
| shell: bash | |
| run: | | |
| sudo apt update | |
| sudo apt install libgstreamer-plugins-base1.0-0 cmake make pkg-config libx11-dev xcb libx11-xcb-dev libxkbcommon-x11-0 libxkbcommon-dev libgtk-3-dev sassc libfuse2 libcurl4-openssl-dev zlib1g-dev | |
| - name: Build crashpad | |
| shell: bash | |
| run: | | |
| cd build | |
| chmod +x ./build_crashpad.sh | |
| ./build_crashpad.sh | |
| - name: Run QMake | |
| shell: bash | |
| run: | | |
| cd src | |
| qmake starc.pro DEFINES+="DEV_BUILD=$DEV_BUILD" | |
| - name: Build | |
| shell: bash | |
| run: | | |
| cd src | |
| make -j$(nproc) | |
| - name: Setup Rust | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
| source $HOME/.cargo/env | |
| echo "PATH=$PATH:$HOME/.cargo/bin" >> $GITHUB_ENV | |
| - name: Verify Rust | |
| run: | | |
| source $HOME/.cargo/env | |
| cargo --version | |
| rustc --version | |
| - name: Install dependencies for Node.js | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y python3 | |
| npm install -g @mapbox/node-pre-gyp cargo-cp-artifact | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Install node-dump-syms | |
| run: | | |
| npm i -g node-dump-syms | |
| - name: Upload Symbols for .so files | |
| if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bugsplat' | |
| uses: BugSplat-Git/symbol-upload@main | |
| with: | |
| username: "${{ secrets.BUGSPLAT_USER }}" | |
| password: "${{ secrets.BUGSPLAT_PASSWORD }}" | |
| database: "${{ secrets.BUGSPLAT_DATABASE }}" | |
| application: "starcapp-linux" | |
| version: "${{ env.BUGSPLAT_VERSION }}" | |
| files: "**/*.so" | |
| directory: "src/_build" | |
| node-version: "22" | |
| dumpSyms: true | |
| - name: Upload Symbols for starcapp | |
| if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bugsplat' | |
| uses: BugSplat-Git/symbol-upload@main | |
| with: | |
| username: "${{ secrets.BUGSPLAT_USER }}" | |
| password: "${{ secrets.BUGSPLAT_PASSWORD }}" | |
| database: "${{ secrets.BUGSPLAT_DATABASE }}" | |
| application: "starcapp-linux" | |
| version: "${{ env.BUGSPLAT_VERSION }}" | |
| files: "starcapp" | |
| directory: "src/_build" | |
| node-version: "22" | |
| dumpSyms: true | |
| - name: Make AppImage | |
| shell: bash | |
| run: | | |
| cd build/linux | |
| ./make-starc-app-image.sh ${{env.APP_VERSION}} | |
| mv starc-setup.AppImage starc-setup-qt5.AppImage | |
| - name: Collect artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux packages with qt5 | |
| path: build/linux/starc-setup-qt5.AppImage | |
| - name: Publish artifacts to the GitHub releases | |
| uses: softprops/action-gh-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: build/linux/starc-setup-qt5.AppImage | |
| build_linux_qt6: | |
| name: Build Linux version with qt6 | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout sources for push or create tag event | |
| if: github.event_name != 'pull_request' | |
| uses: actions/checkout@master | |
| with: | |
| token: ${{ secrets.ACTION_RUNNER }} | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Checkout sources for pull request event | |
| if: github.event_name == 'pull_request' | |
| uses: actions/checkout@master | |
| - name: Checkout submodules for pull request event | |
| if: github.event_name == 'pull_request' | |
| shell: bash | |
| run: | | |
| git submodule update --init --recursive src/3rd_party/pdfhummus/ src/3rd_party/pdftextextraction/ | |
| - name: Add info about dev build to the env | |
| shell: bash | |
| run: | | |
| DEV_BUILD=$(git rev-list `git rev-list --tags --no-walk --max-count=1`..HEAD --count) | |
| echo "DEV_BUILD=$DEV_BUILD" >> $GITHUB_ENV | |
| if [ "$DEV_BUILD" -gt "0" ]; then | |
| echo "BUGSPLAT_VERSION=${{env.APP_VERSION}} dev $DEV_BUILD-qt6" >> $GITHUB_ENV | |
| else | |
| echo "BUGSPLAT_VERSION=${{env.APP_VERSION}}-qt6" >> $GITHUB_ENV | |
| fi | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| version: 6.10.1 | |
| target: desktop | |
| modules: 'qt5compat qtmultimedia qtspeech qtwebsockets' | |
| - name: Install dependencies | |
| shell: bash | |
| run: | | |
| sudo apt update | |
| sudo apt install libgstreamer-plugins-base1.0-0 cmake make pkg-config libx11-dev xcb libx11-xcb-dev libxkbcommon-x11-0 libxkbcommon-dev libgtk-3-dev sassc libfuse2 libxcb-cursor0 libcurl4-openssl-dev zlib1g-dev | |
| - name: Build crashpad | |
| shell: bash | |
| run: | | |
| cd build | |
| chmod +x ./build_crashpad.sh | |
| ./build_crashpad.sh | |
| - name: Run QMake | |
| shell: bash | |
| run: | | |
| cd src | |
| qmake starc.pro DEFINES+="DEV_BUILD=$DEV_BUILD" | |
| - name: Build | |
| shell: bash | |
| run: | | |
| cd src | |
| make -j$(nproc) | |
| - name: Setup Rust | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
| source $HOME/.cargo/env | |
| echo "PATH=$PATH:$HOME/.cargo/bin" >> $GITHUB_ENV | |
| - name: Verify Rust | |
| run: | | |
| source $HOME/.cargo/env | |
| cargo --version | |
| rustc --version | |
| - name: Install dependencies for Node.js | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y python3 | |
| npm install -g @mapbox/node-pre-gyp cargo-cp-artifact | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Install node-dump-syms | |
| run: | | |
| npm i -g node-dump-syms | |
| - name: Upload Symbols for .so files | |
| if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bugsplat' | |
| uses: BugSplat-Git/symbol-upload@main | |
| with: | |
| username: "${{ secrets.BUGSPLAT_USER }}" | |
| password: "${{ secrets.BUGSPLAT_PASSWORD }}" | |
| database: "${{ secrets.BUGSPLAT_DATABASE }}" | |
| application: "starcapp-linux" | |
| version: "${{ env.BUGSPLAT_VERSION }}" | |
| files: "**/*.so" | |
| directory: "src/_build" | |
| node-version: "22" | |
| dumpSyms: true | |
| - name: Upload Symbols for starcapp | |
| if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bugsplat' | |
| uses: BugSplat-Git/symbol-upload@main | |
| with: | |
| username: "${{ secrets.BUGSPLAT_USER }}" | |
| password: "${{ secrets.BUGSPLAT_PASSWORD }}" | |
| database: "${{ secrets.BUGSPLAT_DATABASE }}" | |
| application: "starcapp-linux" | |
| version: "${{ env.BUGSPLAT_VERSION }}" | |
| files: "starcapp" | |
| directory: "src/_build" | |
| node-version: "22" | |
| dumpSyms: true | |
| - name: Make AppImage | |
| shell: bash | |
| run: | | |
| cd build/linux | |
| ./make-starc-app-image.sh ${{env.APP_VERSION}} | |
| - name: Collect artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux packagesw with qt6 | |
| path: build/linux/starc-setup.AppImage | |
| - name: Publish artifacts to the dev stream and notify clients | |
| if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') != true && github.ref == 'refs/heads/master' | |
| shell: bash | |
| run: | | |
| curl -F "api_key=${{ secrets.STARC_API_KEY }}" -F "name_for_file=starc-setup.AppImage" -F "file_bin=@build/linux/starc-setup.AppImage" https://starc.app/api/app/updates/publish | |
| curl -F "api_key=${{ secrets.STARC_API_KEY }}" -F "system=linux" -F "qt=6" -F "version=${{env.APP_VERSION}} dev ${{env.DEV_BUILD}}" https://starc.app/api/app/updates/notify | |
| - name: Publish artifacts to the GitHub releases | |
| uses: softprops/action-gh-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: build/linux/starc-setup.AppImage |