Cleanup preferences update #22
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
| # Build, check and deploy LPub3D | |
| # Trevor SANDY <trevor.sandy@gmail.com> | |
| # Last Update: September 06, 2025 | |
| # Copyright (C) 2021 - 2025 by Trevor SANDY | |
| # | |
| # Commit message strings with [skip ci], [ci skip], [no ci], [skip actions], or [actions skip] | |
| # will skip pull request and push workflows. | |
| # | |
| name: builds # used for badge label | |
| on: | |
| push: | |
| branches: | |
| - 'master' | |
| tags: | |
| - 'v*' | |
| - '!continuous' | |
| workflow_dispatch: | |
| jobs: | |
| build-linux: | |
| # if: ${{ false }} # uncomment to disable | |
| name: Build ${{ matrix.NAME }} | |
| runs-on: ${{ matrix.OS }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - BUILD: ubuntu-amd64 | |
| NAME: Ubuntu 24.04 AMD | |
| OS: ubuntu-24.04 | |
| VER: 24.04 | |
| - BUILD: fedora-amd64 | |
| NAME: Fedora 41 AMD | |
| OS: ubuntu-24.04 | |
| VER: 41 | |
| - BUILD: archlinux-amd64 | |
| NAME: Arch Linux AMD | |
| OS: ubuntu-24.04 | |
| VER: 2025 | |
| - BUILD: ubuntu-amd64-appimage | |
| NAME: Ubuntu 20.04 AppImage AMD | |
| OS: ubuntu-24.04 | |
| VER: 20.04 | |
| - BUILD: ubuntu-arm64 | |
| NAME: Ubuntu 24.04 ARM | |
| OS: ubuntu-24.04-arm | |
| VER: 24.04 | |
| - BUILD: ubuntu-arm64-appimage | |
| NAME: Ubuntu 20.04 AppImage ARM | |
| OS: ubuntu-24.04-arm | |
| VER: 20.04 | |
| steps: | |
| - name: Checkout Source | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Work Paths | |
| run: | | |
| echo "LP3D_3RD_PARTY_PATH=$(cd ../ && echo "$PWD/third_party")" >> ${GITHUB_ENV} | |
| echo "LP3D_BUILDPKG_PATH=$(cd ../ && mkdir buildpkg && echo "$PWD/buildpkg")" >> ${GITHUB_ENV} | |
| - name: Cache ${{ matrix.NAME }} Third-party Assets | |
| id: cache-third-party | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.LP3D_3RD_PARTY_PATH }} | |
| key: third-party-${{ matrix.BUILD }}-${{ secrets.THIRD_PARTY_CACHE }} | |
| - name: Get number of CPU cores | |
| uses: SimenB/github-actions-cpu-cores@v2 | |
| id: cpu-cores | |
| - name: Docker Login | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
| - name: Build ${{ matrix.NAME }} | |
| run: bash -ex builds/utilities/ci/github/linux-build.sh | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| BUILD: ${{ matrix.BUILD }} | |
| LP3D_CPU_CORES: ${{ steps.cpu-cores.outputs.count }} | |
| LP3D_COMMIT_MSG: ${{ github.event.head_commit.message }} | |
| - name: List ${{ matrix.NAME }} Artifacts | |
| if: always() | |
| run: test -d ${{ env.LP3D_BUILDPKG_PATH }} && ls -alFR ${{ env.LP3D_BUILDPKG_PATH }} || true | |
| - name: Upload ${{ matrix.NAME }} Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.BUILD }}-${{ matrix.VER }}-download | |
| path: ${{ env.LP3D_BUILDPKG_PATH }}/ | |
| if-no-files-found: ignore | |
| - name: ${{ matrix.NAME }} Diagnostics | |
| if: failure() || cancelled() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.BUILD }}-${{ matrix.VER }}-logs | |
| path: ${{ env.LP3D_BUILDPKG_PATH }}/ | |
| if-no-files-found: ignore | |
| build-macos: | |
| # if: ${{ false }} # uncomment to disable | |
| name: Build macOS ${{ matrix.runner-version }} | |
| runs-on: macos-${{ matrix.runner-version }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runner-version: [ 13, 14 ] | |
| steps: | |
| - name: Checkout Source | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Work Paths | |
| run: | | |
| echo "LP3D_3RD_PARTY_PATH=$(cd ../ && echo "$PWD/third_party")" >> ${GITHUB_ENV} | |
| echo "LP3D_BUILDPKG_PATH=$(cd ../ && mkdir buildpkg && echo "$PWD/buildpkg")" >> ${GITHUB_ENV} | |
| - name: Cache macOS ${{ matrix.runner-version }} Third-party Assets | |
| id: cache-third-party | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.LP3D_3RD_PARTY_PATH }} | |
| key: third-party-macos-${{ matrix.runner-version }}-${{ secrets.THIRD_PARTY_CACHE }} | |
| - name: Get number of CPU cores | |
| uses: SimenB/github-actions-cpu-cores@v2 | |
| id: cpu-cores | |
| - name: Build macOS ${{ matrix.runner-version }} | |
| run: bash -ex builds/utilities/ci/github/macos-build.sh | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| LP3D_CPU_CORES: ${{ steps.cpu-cores.outputs.count }} | |
| LP3D_COMMIT_MSG: ${{ github.event.head_commit.message }} | |
| - name: List macOS ${{ matrix.runner-version }} Artifacts | |
| if: always() | |
| run: test -d ${{ env.LP3D_BUILDPKG_PATH }} && ls -alFR ${{ env.LP3D_BUILDPKG_PATH }} || true | |
| - name: Upload macOS ${{ matrix.runner-version }} Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-${{ matrix.runner-version }}-download | |
| path: ${{ env.LP3D_BUILDPKG_PATH }}/ | |
| if-no-files-found: ignore | |
| - name: macOS ${{ matrix.runner-version }} Diagnostics | |
| if: failure() || cancelled() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-${{ matrix.runner-version }}-logs | |
| path: ${{ env.LP3D_BUILDPKG_PATH }}/ | |
| if-no-files-found: ignore | |
| build-windows: | |
| # if: ${{ false }} # uncomment to disable | |
| name: 'Build Windows ${{ matrix.name }}' | |
| runs-on: ${{ matrix.runner-os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runner-os: [ windows-2025 ] | |
| platform: [ AMD, ARM ] | |
| include: | |
| - runner-os: windows-2025 | |
| - platform: AMD | |
| name: 2025 AMD | |
| host: '' | |
| arch: _64 | |
| build: -all_amd | |
| toolset-32bit: v142 | |
| # Windows ARM64 cross compiled on AMD64 to enable Qt6OpenGL and Qt6OpenGLWidgets | |
| # See - [QtOpenGL missing for WoA packages](https://bugreports.qt.io/browse/QTBUG-136551) | |
| - platform: ARM | |
| name: 2025 ARM64 Cross | |
| host: '' | |
| arch: _arm64_cross_compiled | |
| build: arm64 | |
| toolset-32bit: v143 | |
| steps: | |
| - name: Checkout Source | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Work Paths | |
| run: | | |
| Echo "LP3D_3RD_PARTY_PATH=$(Join-Path (resolve-path ..\) 'third_party')" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | |
| Echo "LP3D_BUILDPKG_PATH=$(Join-Path (resolve-path ..\) 'buildpkg')" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | |
| Echo "LP3D_BUILD_BASE=$(resolve-path ..\)" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | |
| New-Item -Path ..\ -Name 'buildpkg' -ItemType 'directory' | |
| - name: Cache Windows ${{ matrix.name }} Third-party Assets # distribution folder | |
| id: cache-third-party | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.LP3D_3RD_PARTY_PATH }} | |
| key: third-party-${{ matrix.runner-os }}-${{ secrets.THIRD_PARTY_CACHE }} | |
| - name: Windows VC 141 Build Tools AMD | |
| if: "${{ matrix.platform == 'AMD' && matrix.toolset-32bit == 'v141' }}" | |
| run: | | |
| Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\" | |
| $InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" | |
| $ComponentsToAdd= @("Microsoft.VisualStudio.Component.VC.v141.x86.x64") | |
| [string]$WorkloadArgs = $ComponentsToAdd | ForEach-Object {" --add " + $_} # Use --remove to delete component | |
| $Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$WorkloadArgs, '--quiet', '--norestart', '--nocache') | |
| # should be run twice | |
| $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden | |
| $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden | |
| shell: powershell | |
| - name: Windows 8.1 SDK AMD | |
| if: "${{ matrix.platform == 'AMD' && matrix.toolset-32bit == 'v141' }}" | |
| run: | | |
| Invoke-WebRequest -Method Get -Uri https://go.microsoft.com/fwlink/p/?LinkId=323507 -OutFile sdksetup.exe -UseBasicParsing | |
| Start-Process -Wait sdksetup.exe -ArgumentList "/q", "/norestart", "/features", "OptionId.WindowsDesktopSoftwareDevelopmentKit", "OptionId.NetFxSoftwareDevelopmentKit" | |
| shell: powershell | |
| - name: Qt MSVC 2019 32bit AMD # path: ..\Qt\5.15.2\msvc2019\bin | |
| if: "${{ matrix.platform == 'AMD' }}" | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: 5.15.2 | |
| host: windows${{ matrix.host }} | |
| arch: win32_msvc2019 | |
| dir: ${{ env.LP3D_BUILD_BASE }} | |
| cache: true | |
| cache-key-prefix: install-qt-action | |
| - name: Qt MSVC 2022 64bit ${{ matrix.platform }} # path: ..\Qt\6.9.2\msvc2022_[64/arm64]\bin | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: 6.9.2 | |
| host: windows${{ matrix.host }} | |
| target: desktop | |
| modules: qt5compat | |
| arch: win64_msvc2022${{ matrix.arch }} | |
| dir: ${{ env.LP3D_BUILD_BASE }} | |
| cache: true | |
| cache-key-prefix: install-qt-action | |
| - name: Install NSIS with EnVar plugin | |
| uses: repolevedavaj/install-nsis@v1.0.3 | |
| with: | |
| nsis-version: 3.11 | |
| - name: Build Windows ${{ matrix.name }} | |
| run: .\builds\utilities\ci\github\windows-build.bat | .\builds\utilities\win_tee.cmd "${{ env.LP3D_BUILDPKG_PATH }}\windows_build.log" append | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| LP3D_BUILD_ARCH: ${{ matrix.build }} | |
| LP3D_COMMIT_MSG: ${{ github.event.head_commit.message }} | |
| LP3D_MSC32_VER: 1942 | |
| LP3D_VC32SDKVER: 10.0 | |
| LP3D_VC32TOOLSET: ${{ matrix.toolset-32bit }} | |
| LP3D_VC32VARSALL_VER: -vcvars_ver=14.2 | |
| LP3D_MSC64_VER: 1944 | |
| LP3D_VC64SDKVER: 10.0 | |
| LP3D_VC64TOOLSET: v143 | |
| LP3D_VC64VARSALL_VER: -vcvars_ver=14.4 | |
| LP3D_MSCARM64_VER: 1944 | |
| LP3D_VCARM64SDKVER: 10.0 | |
| LP3D_VCARM64TOOLSET: v143 | |
| LP3D_VCARM64VARSALL_VER: -vcvars_ver=14.4 | |
| shell: cmd | |
| - name: List Windows ${{ matrix.name }} Artifacts | |
| if: always() | |
| run: If (Test-Path -Path ${{ env.LP3D_BUILDPKG_PATH }}) { Get-ChildItem -Path ${{ env.LP3D_BUILDPKG_PATH }} –Recurse } | |
| - name: Upload Windows ${{ matrix.name }} Update Artifacts | |
| if: "${{ matrix.platform == 'AMD' }}" | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: updates | |
| path: ${{ env.LP3D_BUILDPKG_PATH }}\Updates\ | |
| if-no-files-found: ignore | |
| - name: Upload Windows ${{ matrix.name }} Download Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.runner-os }}-${{ matrix.platform }}-download | |
| path: ${{ env.LP3D_BUILDPKG_PATH }}\Downloads\ | |
| if-no-files-found: ignore | |
| - name: Windows ${{ matrix.name }} Diagnostics | |
| if: failure() || cancelled() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.runner-os }}-${{ matrix.platform }}-logs | |
| path: ${{ env.LP3D_BUILDPKG_PATH }}/ | |
| if-no-files-found: ignore | |
| build-deploy: | |
| # add "${{ false }} && # remove to enable" after pipe to disable | |
| if: | | |
| always() && | |
| !contains(github.event.head_commit.message, 'SKIP_DEPLOY') && | |
| (contains(github.event.head_commit.message, 'PRE_RELEASE_BUILD') || | |
| contains(github.event.head_commit.message, 'RELEASE_BUILD') || | |
| contains(github.event.head_commit.message, 'BUILD_ALL') || | |
| startsWith(github.event.ref, 'refs/tags/v') || | |
| github.event_name == 'workflow_dispatch') | |
| name: Publish Assets | |
| needs: [ build-linux, build-macos, build-windows ] # build-linux, build-macos, build-windows | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Deploy Assets | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Deploy Assets Path | |
| run: echo "LP3D_BUILD_ASSETS=$(cd ../ && echo "$PWD/assets")" >> ${GITHUB_ENV} | |
| - name: Download Build Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: # omit 'with: name:' to download all artifacts | |
| path: ${{ env.LP3D_BUILD_ASSETS }} | |
| - name: List Deploy Assets | |
| run: ls -alFR | |
| working-directory: ${{ env.LP3D_BUILD_ASSETS }} | |
| - name: Deploy Build Assets | |
| run: bash -ex builds/utilities/ci/github/build-deploy.sh | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| LP3D_COMMIT_MSG: ${{ github.event.head_commit.message }} | |
| GPG_SIGN_KEY_ALIAS: ${{ secrets.GPG_SIGN_KEY_ALIAS }} | |
| GPG_SIGN_PASSPHRASE: ${{ secrets.GPG_SIGN_PASSPHRASE }} | |
| GPG_INIT_PASSPHRASE: ${{ secrets.GPG_INIT_PASSPHRASE }} | |
| GPG_SIGN_KEY_BASE64: ${{ secrets.GPG_SIGN_KEY_BASE64 }} | |
| SFDEPLOY_ED25519_BASE64: ${{ secrets.SFDEPLOY_ED25519_BASE64 }} | |
| - name: Deploy Diagnostics | |
| if: failure() || cancelled() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: deploy-publish-logs | |
| path: ${{ env.LP3D_BUILDPKG_PATH }}/ | |
| if-no-files-found: ignore |