|
| 1 | +name: Development builds |
| 2 | + |
| 3 | +# Branch / manual builds — uploads CI artifacts only (no GitHub Release). |
| 4 | +# Release packages stay in deploy.yml (version tags only). |
| 5 | + |
| 6 | +on: |
| 7 | + push: |
| 8 | + branches: |
| 9 | + - layers |
| 10 | + - develop |
| 11 | + workflow_dispatch: |
| 12 | + inputs: |
| 13 | + branch: |
| 14 | + description: Branch to build (default = branch you run from) |
| 15 | + required: false |
| 16 | + type: string |
| 17 | + |
| 18 | +concurrency: |
| 19 | + group: dev-build-${{ github.ref }} |
| 20 | + cancel-in-progress: true |
| 21 | + |
| 22 | +jobs: |
| 23 | + build: |
| 24 | + strategy: |
| 25 | + fail-fast: false |
| 26 | + matrix: |
| 27 | + include: |
| 28 | + - runs-on: windows-latest |
| 29 | + target_arch: x86_64 |
| 30 | + artifact_slug: windows-x86_64 |
| 31 | + platform: windows |
| 32 | + - runs-on: ubuntu-latest |
| 33 | + target_arch: x86_64 |
| 34 | + artifact_slug: linux-x86_64 |
| 35 | + platform: linux |
| 36 | + - runs-on: ubuntu-24.04-arm |
| 37 | + target_arch: arm64 |
| 38 | + artifact_slug: linux-arm64 |
| 39 | + platform: linux |
| 40 | + - runs-on: macos-15-intel |
| 41 | + target_arch: x86_64 |
| 42 | + artifact_slug: macos-x86_64 |
| 43 | + platform: macos |
| 44 | + - runs-on: macos-latest |
| 45 | + target_arch: arm64 |
| 46 | + artifact_slug: macos-arm64 |
| 47 | + platform: macos |
| 48 | + |
| 49 | + runs-on: ${{ matrix.runs-on }} |
| 50 | + steps: |
| 51 | + - name: Checkout code |
| 52 | + uses: actions/checkout@v4 |
| 53 | + with: |
| 54 | + ref: ${{ github.event.inputs.branch || github.ref }} |
| 55 | + |
| 56 | + - name: Build metadata |
| 57 | + id: meta |
| 58 | + shell: bash |
| 59 | + run: | |
| 60 | + BRANCH="${{ github.event.inputs.branch || github.ref_name }}" |
| 61 | + BRANCH_SLUG="$(echo "$BRANCH" | tr '/_' '-' | tr '[:upper:]' '[:lower:]')" |
| 62 | + echo "branch=$BRANCH" >> "$GITHUB_OUTPUT" |
| 63 | + echo "branch_slug=$BRANCH_SLUG" >> "$GITHUB_OUTPUT" |
| 64 | + echo "Building branch: $BRANCH (${{ github.sha }}) on ${{ matrix.runs-on }} (${{ matrix.artifact_slug }})" |
| 65 | +
|
| 66 | + - name: Install NSIS on Windows |
| 67 | + if: matrix.platform == 'windows' |
| 68 | + shell: powershell |
| 69 | + run: choco install nsis -y --no-progress |
| 70 | + |
| 71 | + - name: Install GL and Wayland deps on Linux |
| 72 | + if: matrix.platform == 'linux' |
| 73 | + run: | |
| 74 | + sudo apt-get update |
| 75 | + sudo apt-get install -y libgl1-mesa-dev libx11-dev libxrandr-dev libxinerama-dev \ |
| 76 | + libxcursor-dev libxi-dev wayland-protocols libwayland-dev libwayland-bin |
| 77 | +
|
| 78 | + - name: Run install script on Windows |
| 79 | + if: matrix.platform == 'windows' |
| 80 | + shell: cmd |
| 81 | + run: install.cmake.bat |
| 82 | + |
| 83 | + - name: Run install script on Linux |
| 84 | + if: matrix.platform == 'linux' |
| 85 | + run: | |
| 86 | + chmod +x ./install.cmake.sh |
| 87 | + uname -m |
| 88 | + ./install.cmake.sh |
| 89 | +
|
| 90 | + - name: Run install script on macOS x86_64 |
| 91 | + if: matrix.platform == 'macos' && matrix.target_arch == 'x86_64' |
| 92 | + run: | |
| 93 | + chmod +x ./install.cmake.sh |
| 94 | + ./install.cmake.sh --force-x86 |
| 95 | +
|
| 96 | + - name: Run install script on macOS arm64 |
| 97 | + if: matrix.platform == 'macos' && matrix.target_arch == 'arm64' |
| 98 | + run: | |
| 99 | + chmod +x ./install.cmake.sh |
| 100 | + ./install.cmake.sh |
| 101 | +
|
| 102 | + - name: Upload development artifact |
| 103 | + uses: actions/upload-artifact@v4 |
| 104 | + with: |
| 105 | + name: dev-${{ steps.meta.outputs.branch_slug }}-${{ matrix.artifact_slug }}-${{ github.sha }} |
| 106 | + path: | |
| 107 | + build_cmake/*.deb |
| 108 | + build_cmake/*.dmg |
| 109 | + build_cmake/*.exe |
| 110 | + build_cmake/*.zip |
| 111 | + build_cmake/*.msi |
| 112 | + if-no-files-found: error |
| 113 | + |
| 114 | + - name: Summary |
| 115 | + if: always() |
| 116 | + run: | |
| 117 | + echo "### Development build" >> "$GITHUB_STEP_SUMMARY" |
| 118 | + echo "- Branch: \`${{ steps.meta.outputs.branch }}\`" >> "$GITHUB_STEP_SUMMARY" |
| 119 | + echo "- Commit: \`${{ github.sha }}\`" >> "$GITHUB_STEP_SUMMARY" |
| 120 | + echo "- Platform: \`${{ matrix.artifact_slug }}\` (\`${{ matrix.runs-on }}\`)" >> "$GITHUB_STEP_SUMMARY" |
| 121 | + echo "" >> "$GITHUB_STEP_SUMMARY" |
| 122 | + echo "Download installers from the **Artifacts** section of this workflow run." >> "$GITHUB_STEP_SUMMARY" |
| 123 | + echo "" >> "$GITHUB_STEP_SUMMARY" |
| 124 | + echo "| Platform | Artifact |" >> "$GITHUB_STEP_SUMMARY" |
| 125 | + echo "|----------|----------|" >> "$GITHUB_STEP_SUMMARY" |
| 126 | + echo "| Linux x86_64 | \`.deb\` in \`linux-x86_64\` |" >> "$GITHUB_STEP_SUMMARY" |
| 127 | + echo "| Linux ARM64 | \`.deb\` in \`linux-arm64\` |" >> "$GITHUB_STEP_SUMMARY" |
| 128 | + echo "| macOS Intel | \`.dmg\` in \`macos-x86_64\` |" >> "$GITHUB_STEP_SUMMARY" |
| 129 | + echo "| macOS Apple Silicon | \`.dmg\` in \`macos-arm64\` |" >> "$GITHUB_STEP_SUMMARY" |
| 130 | + echo "| Windows x86_64 | \`.msi\` / \`.zip\` in \`windows-x86_64\` |" >> "$GITHUB_STEP_SUMMARY" |
0 commit comments