diff options
Diffstat (limited to '.github')
| -rw-r--r-- | .github/labeler.yaml | 98 | ||||
| -rw-r--r-- | .github/workflows/build.yaml | 102 | ||||
| -rw-r--r-- | .github/workflows/check-pr.yaml | 2 | ||||
| -rw-r--r-- | .github/workflows/cla.yaml | 2 | ||||
| -rw-r--r-- | .github/workflows/label.yaml | 2 | ||||
| -rw-r--r-- | .github/workflows/pre-commit.yaml | 2 | ||||
| -rw-r--r-- | .github/workflows/stale.yaml | 2 | ||||
| -rw-r--r-- | .github/workflows/tag-release.yaml | 38 |
8 files changed, 178 insertions, 70 deletions
diff --git a/.github/labeler.yaml b/.github/labeler.yaml index 5a6590d4aa..6359419ba6 100644 --- a/.github/labeler.yaml +++ b/.github/labeler.yaml @@ -1,81 +1,109 @@ llappearance: - - indra/llappearance/**/* +- changed-files: + - any-glob-to-any-file: indra/llappearance/** llaudio: - - indra/llaudio/**/* +- changed-files: + - any-glob-to-any-file: indra/llaudio/** llcharacter: - - indra/llcharacter/**/* +- changed-files: + - any-glob-to-any-file: indra/llcharacter/** llcommon: - - indra/llcommon/**/* +- changed-files: + - any-glob-to-any-file: indra/llcommon/** llcorehttp: - - indra/llcorehttp/**/* +- changed-files: + - any-glob-to-any-file: indra/llcorehttp/** llcrashlogger: - - indra/llcrashlogger/**/* +- changed-files: + - any-glob-to-any-file: indra/llcrashlogger/** llfilesystem: - - indra/llfilesystem/**/* +- changed-files: + - any-glob-to-any-file: indra/llfilesystem/** llimage: - - indra/llimage/**/* +- changed-files: + - any-glob-to-any-file: indra/llimage/** llimagej2coj: - - indra/llimagej2coj/**/* +- changed-files: + - any-glob-to-any-file: indra/llimagej2coj/** llinventory: - - indra/llinventory/**/* +- changed-files: + - any-glob-to-any-file: indra/llinventory/** llkdu: - - indra/llkdu/**/* +- changed-files: + - any-glob-to-any-file: indra/llkdu/** llmath: - - indra/llmath/**/* +- changed-files: + - any-glob-to-any-file: indra/llmath/** llmeshoptimizer: - - indra/llmeshoptimizer/**/* +- changed-files: + - any-glob-to-any-file: indra/llmeshoptimizer/** llmessage: - - indra/llmessage/**/* +- changed-files: + - any-glob-to-any-file: indra/llmessage/** llplugin: - - indra/llplugin/**/* +- changed-files: + - any-glob-to-any-file: indra/llplugin/** llprimitive: - - indra/llprimitive/**/* +- changed-files: + - any-glob-to-any-file: indra/llprimitive/** llrender: - - indra/llrender/**/* +- changed-files: + - any-glob-to-any-file: indra/llrender/** llui: - - indra/llui/**/* +- changed-files: + - any-glob-to-any-file: indra/llui/** llwindow: - - indra/llwindow/**/* +- changed-files: + - any-glob-to-any-file: indra/llwindow/** llxml: - - indra/llxml/**/* +- changed-files: + - any-glob-to-any-file: indra/llxml/** cmake: - - '**/*.cmake' - - '**/*/cmake/*' - - '**/CMakeLists.txt' +- changed-files: + - any-glob-to-any-file: + - '**/*.cmake' + - '**/*/cmake/*' + - '**/CMakeLists.txt' python: - - '**/*.py' +- changed-files: + - any-glob-to-any-file: '**/*.py' c/cpp: - - '**/*.c' - - '**/*.cpp' - - '**/*.cxx' - - '**/*.h' - - '**/*.hpp' - - '**/*.hxx' - - '**/*.i' - - '**/*.inl' - - '**/*.y' +- changed-files: + - any-glob-to-any-file: + - '**/*.c' + - '**/*.cpp' + - '**/*.cxx' + - '**/*.h' + - '**/*.hpp' + - '**/*.hxx' + - '**/*.i' + - '**/*.inl' + - '**/*.y' -'team:viewer': - - '*' +objc: +- changed-files: + - any-glob-to-any-file: + - '**/*.m' + - '**/*.mm' diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4c948e5586..737a4f9c1a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -2,6 +2,14 @@ name: Build on: workflow_dispatch: + inputs: + installer_type: + description: 'Windows installer type' + type: choice + options: + - velopack + - nsis + default: 'velopack' pull_request: push: branches: ["main", "release/*", "project/*"] @@ -53,6 +61,20 @@ jobs: relnotes: ${{ steps.which-branch.outputs.relnotes }} imagename: ${{ steps.build.outputs.imagename }} configuration: ${{ matrix.configuration }} + # Windows Velopack outputs (passed to sign-pkg-windows) + velopack_pack_id: ${{ steps.build.outputs.velopack_pack_id }} + velopack_pack_version: ${{ steps.build.outputs.velopack_pack_version }} + velopack_pack_title: ${{ steps.build.outputs.velopack_pack_title }} + velopack_main_exe: ${{ steps.build.outputs.velopack_main_exe }} + velopack_exclude: ${{ steps.build.outputs.velopack_exclude }} + velopack_icon: ${{ steps.build.outputs.velopack_icon }} + velopack_installer_base: ${{ steps.build.outputs.velopack_installer_base }} + # macOS Velopack outputs (passed to sign-pkg-mac) + velopack_mac_pack_id: ${{ steps.build.outputs.velopack_mac_pack_id }} + velopack_mac_pack_version: ${{ steps.build.outputs.velopack_mac_pack_version }} + velopack_mac_pack_title: ${{ steps.build.outputs.velopack_mac_pack_title }} + velopack_mac_main_exe: ${{ steps.build.outputs.velopack_mac_main_exe }} + velopack_mac_bundle_id: ${{ steps.build.outputs.velopack_mac_bundle_id }} env: AUTOBUILD_ADDRSIZE: 64 AUTOBUILD_BUILD_ID: ${{ github.run_id }} @@ -84,6 +106,8 @@ jobs: # Only set variants to the one configuration: don't let build.sh loop # over variants, let GitHub distribute variants over multiple hosts. variants: ${{ matrix.configuration }} + # Pass USE_VELOPACK to CMake when using Velopack installer (default) - Windows and macOS + autobuild_configure_parameters: ${{ (contains(matrix.runner, 'windows') || contains(matrix.runner, 'macos')) && (github.event.inputs.installer_type || 'velopack') == 'velopack' && '-- -DUSE_VELOPACK:BOOL=ON' || '' }} steps: - name: Checkout code uses: actions/checkout@v5 @@ -91,7 +115,7 @@ jobs: ref: ${{ github.event.pull_request.head.sha || github.sha }} - name: Setup python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.11" - name: Checkout build variables @@ -126,6 +150,17 @@ jobs: with: token: ${{ github.token }} + - name: Setup .NET for Velopack + if: (runner.os == 'Windows' || runner.os == 'macOS') && (github.event.inputs.installer_type || 'velopack') == 'velopack' + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '9.0.x' + + - name: Install Velopack CLI + if: (runner.os == 'Windows' || runner.os == 'macOS') && (github.event.inputs.installer_type || 'velopack') == 'velopack' + shell: bash + run: dotnet tool install -g vpk + - name: Build id: build shell: bash @@ -310,13 +345,21 @@ jobs: steps: - name: Sign and package Windows viewer if: env.AZURE_KEY_VAULT_URI && env.AZURE_CERT_NAME && env.AZURE_CLIENT_ID && env.AZURE_CLIENT_SECRET && env.AZURE_TENANT_ID - uses: secondlife/viewer-build-util/sign-pkg-windows@v2.0.4 + uses: secondlife/viewer-build-util/sign-pkg-windows@v2.1.0 with: vault_uri: "${{ env.AZURE_KEY_VAULT_URI }}" cert_name: "${{ env.AZURE_CERT_NAME }}" client_id: "${{ env.AZURE_CLIENT_ID }}" client_secret: "${{ env.AZURE_CLIENT_SECRET }}" tenant_id: "${{ env.AZURE_TENANT_ID }}" + installer_type: "${{ github.event.inputs.installer_type || 'velopack' }}" + velopack_pack_id: "${{ needs.build.outputs.velopack_pack_id }}" + velopack_pack_version: "${{ needs.build.outputs.velopack_pack_version }}" + velopack_pack_title: "${{ needs.build.outputs.velopack_pack_title }}" + velopack_main_exe: "${{ needs.build.outputs.velopack_main_exe }}" + velopack_exclude: "${{ needs.build.outputs.velopack_exclude }}" + velopack_icon: "${{ needs.build.outputs.velopack_icon }}" + velopack_installer_base: "${{ needs.build.outputs.velopack_installer_base }}" sign-and-package-mac: env: @@ -349,7 +392,7 @@ jobs: - name: Sign and package Mac viewer if: env.SIGNING_CERT_MACOS && env.SIGNING_CERT_MACOS_IDENTITY && env.SIGNING_CERT_MACOS_PASSWORD && steps.note-creds.outputs.note_user && steps.note-creds.outputs.note_pass && steps.note-creds.outputs.note_team - uses: secondlife/viewer-build-util/sign-pkg-mac@v2 + uses: secondlife/viewer-build-util/sign-pkg-mac@v2.1.0 with: channel: ${{ needs.build.outputs.viewer_channel }} imagename: ${{ needs.build.outputs.imagename }} @@ -359,11 +402,17 @@ jobs: note_user: ${{ steps.note-creds.outputs.note_user }} note_pass: ${{ steps.note-creds.outputs.note_pass }} note_team: ${{ steps.note-creds.outputs.note_team }} + velopack_pack_id: "${{ needs.build.outputs.velopack_mac_pack_id }}" + velopack_pack_version: "${{ needs.build.outputs.velopack_mac_pack_version }}" + velopack_pack_title: "${{ needs.build.outputs.velopack_mac_pack_title }}" + velopack_main_exe: "${{ needs.build.outputs.velopack_mac_main_exe }}" + velopack_bundle_id: "${{ needs.build.outputs.velopack_mac_bundle_id }}" post-windows-symbols: env: - BUGSPLAT_USER: ${{ secrets.BUGSPLAT_USER }} - BUGSPLAT_PASS: ${{ secrets.BUGSPLAT_PASS }} + BUGSPLAT_DATABASE: "${{ secrets.BUGSPLAT_DATABASE }}" + SYMBOL_UPLOAD_CLIENT_ID: "${{ secrets.BUGSPLAT_SYMBOL_UPLOAD_CLIENT_ID }}" + SYMBOL_UPLOAD_CLIENT_SECRET: "${{ secrets.BUGSPLAT_SYMBOL_UPLOAD_CLIENT_SECRET }}" needs: build if: needs.build.outputs.configuration == 'Release' runs-on: ubuntu-latest @@ -374,51 +423,56 @@ jobs: name: Windows-app path: _artifacts - name: Download Windows Symbols - if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS + if: env.BUGSPLAT_DATABASE && env.SYMBOL_UPLOAD_CLIENT_ID uses: actions/download-artifact@v4 with: name: Windows-symbols - name: Extract viewer pdb - if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS + if: env.BUGSPLAT_DATABASE && env.SYMBOL_UPLOAD_CLIENT_ID shell: bash run: | tar -xJf "${{ needs.build.outputs.viewer_channel }}.sym.tar.xz" -C _artifacts - name: Post Windows symbols - if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS - uses: secondlife-3p/symbol-upload@v10 + if: env.BUGSPLAT_DATABASE && env.SYMBOL_UPLOAD_CLIENT_ID + uses: BugSplat-Git/symbol-upload@095d163ae9ceb006d286a731dcd35cf6a1b458c8 with: - username: ${{ env.BUGSPLAT_USER }} - password: ${{ env.BUGSPLAT_PASS }} - database: "SecondLife_Viewer_2018" + clientId: "${{ env.SYMBOL_UPLOAD_CLIENT_ID }}" + clientSecret: "${{ env.SYMBOL_UPLOAD_CLIENT_SECRET }}" + database: "${{ env.BUGSPLAT_DATABASE }}" application: ${{ needs.build.outputs.viewer_channel }} version: ${{ needs.build.outputs.viewer_version }} directory: _artifacts files: "**/{SecondLifeViewer.exe,llwebrtc.dll,*.pdb}" + node-version: "22" + dumpSyms: false post-mac-symbols: env: - BUGSPLAT_USER: ${{ secrets.BUGSPLAT_USER }} - BUGSPLAT_PASS: ${{ secrets.BUGSPLAT_PASS }} + BUGSPLAT_DATABASE: "${{ secrets.BUGSPLAT_DATABASE }}" + SYMBOL_UPLOAD_CLIENT_ID: "${{ secrets.BUGSPLAT_SYMBOL_UPLOAD_CLIENT_ID }}" + SYMBOL_UPLOAD_CLIENT_SECRET: "${{ secrets.BUGSPLAT_SYMBOL_UPLOAD_CLIENT_SECRET }}" needs: build if: needs.build.outputs.configuration == 'Release' runs-on: ubuntu-latest steps: - name: Download Mac Symbols - if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS + if: env.BUGSPLAT_DATABASE && env.SYMBOL_UPLOAD_CLIENT_ID uses: actions/download-artifact@v4 with: name: macOS-symbols - name: Post Mac symbols - if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS - uses: secondlife-3p/symbol-upload@v10 + if: env.BUGSPLAT_DATABASE && env.SYMBOL_UPLOAD_CLIENT_ID + uses: BugSplat-Git/symbol-upload@095d163ae9ceb006d286a731dcd35cf6a1b458c8 with: - username: ${{ env.BUGSPLAT_USER }} - password: ${{ env.BUGSPLAT_PASS }} - database: "SecondLife_Viewer_2018" + clientId: "${{ env.SYMBOL_UPLOAD_CLIENT_ID }}" + clientSecret: "${{ env.SYMBOL_UPLOAD_CLIENT_SECRET }}" + database: "${{ env.BUGSPLAT_DATABASE }}" application: ${{ needs.build.outputs.viewer_channel }} version: ${{ needs.build.outputs.viewer_version }} (${{ needs.build.outputs.viewer_version }}) directory: . files: "**/*.xcarchive.zip" + node-version: "22" + dumpSyms: false release: needs: [setup, build, sign-and-package-windows, sign-and-package-mac] @@ -433,6 +487,10 @@ jobs: with: pattern: "*-metadata" + - uses: actions/download-artifact@v4 + with: + pattern: "*-releases" + - name: Rename metadata run: | cp Windows-metadata/autobuild-package.xml Windows-autobuild-package.xml @@ -458,12 +516,14 @@ jobs: generate_release_notes: true target_commitish: ${{ github.sha }} append_body: true - fail_on_unmatched_files: true + fail_on_unmatched_files: false files: | macOS-installer/*.dmg Windows-installer/*.exe *-autobuild-package.xml *-viewer_version.txt + Windows-releases/* + macOS-releases/* - name: post release URL run: | diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index a5cee9157c..08e907e83f 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check PR description - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: script: | const description = context.payload.pull_request.body || ''; diff --git a/.github/workflows/cla.yaml b/.github/workflows/cla.yaml index 627ba512c4..5b31c584d5 100644 --- a/.github/workflows/cla.yaml +++ b/.github/workflows/cla.yaml @@ -23,4 +23,4 @@ jobs: path-to-signatures: signatures.json remote-organization-name: secondlife remote-repository-name: cla-signatures - allowlist: callum@mbp.localdomain,rye@lindenlab.com,rye + allowlist: callum@mbp.localdomain,rye@lindenlab.com,rye,bot* diff --git a/.github/workflows/label.yaml b/.github/workflows/label.yaml index 6e41d8aa2d..218327ef47 100644 --- a/.github/workflows/label.yaml +++ b/.github/workflows/label.yaml @@ -9,7 +9,7 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - uses: actions/labeler@v4 + - uses: actions/labeler@v6 with: configuration-path: .github/labeler.yaml repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index 726e1cd889..8f942fa11b 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v6 with: python-version: 3.x - uses: pre-commit/action@v3.0.1 diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml index f77151a815..edfe71b693 100644 --- a/.github/workflows/stale.yaml +++ b/.github/workflows/stale.yaml @@ -12,7 +12,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v6 + - uses: actions/stale@v10 id: stale with: stale-pr-message: This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or it will be closed in 7 days diff --git a/.github/workflows/tag-release.yaml b/.github/workflows/tag-release.yaml index 24ee2de794..0f826222a0 100644 --- a/.github/workflows/tag-release.yaml +++ b/.github/workflows/tag-release.yaml @@ -21,7 +21,9 @@ on: project: description: "Project Name (used for channel name in project builds, and tag name for all builds)" default: "hippo" - # TODO - add an input for selecting another sha to build other than head of branch + tag_override: + description: "Override the tag name (optional). If the tag already exists, a numeric suffix is appended." + required: false jobs: tag-release: @@ -34,8 +36,8 @@ jobs: NIGHTLY_DATE=$(date --rfc-3339=date) echo NIGHTLY_DATE=${NIGHTLY_DATE} >> ${GITHUB_ENV} echo TAG_ID="$(echo ${{ github.sha }} | cut -c1-8)-${{ inputs.project || '${NIGHTLY_DATE}' }}" >> ${GITHUB_ENV} - - name: Update Tag - uses: actions/github-script@v7.0.1 + - name: Create Tag + uses: actions/github-script@v8 with: # use a real access token instead of GITHUB_TOKEN default. # required so that the results of this tag creation can trigger the build workflow @@ -44,9 +46,27 @@ jobs: # this token will need to be renewed anually in January github-token: ${{ secrets.LL_TAG_RELEASE_TOKEN }} script: | - github.rest.git.createRef({ - owner: context.repo.owner, - repo: context.repo.repo, - ref: "refs/tags/${{ env.VIEWER_CHANNEL }}#${{ env.TAG_ID }}", - sha: context.sha - }) + const override = `${{ inputs.tag_override }}`.trim(); + const baseTag = override || `${{ env.VIEWER_CHANNEL }}#${{ env.TAG_ID }}`; + + // Try the base tag first, then append -2, -3, etc. if it already exists + let tag = baseTag; + for (let attempt = 1; ; attempt++) { + try { + await github.rest.git.createRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: `refs/tags/${tag}`, + sha: context.sha + }); + core.info(`Created tag: ${tag}`); + break; + } catch (e) { + if (e.status === 422 && attempt < 10) { + core.info(`Tag '${tag}' already exists, trying next suffix...`); + tag = `${baseTag}-${attempt + 1}`; + } else { + throw e; + } + } + } |
