From f5659945b5a177b325f98b6d598af47a214e7abc Mon Sep 17 00:00:00 2001 From: Brad Linden Date: Mon, 17 Jun 2024 18:54:45 -0700 Subject: Fix secret name since GITHUB_ prefix is reserved --- .github/workflows/tag-release.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '.github') diff --git a/.github/workflows/tag-release.yaml b/.github/workflows/tag-release.yaml index b73ec502f1..2083b414f5 100644 --- a/.github/workflows/tag-release.yaml +++ b/.github/workflows/tag-release.yaml @@ -27,7 +27,7 @@ jobs: tag-release: runs-on: ubuntu-latest env: - GITHUB_TAG_TOKEN: ${{ secrets.GITHUB_TAG_TOKEN }} + LL_TAG_RELEASE_TOKEN: ${{ secrets.LL_TAG_RELEASE_TOKEN }} steps: - name: Setup Env Vars run: | @@ -36,9 +36,9 @@ jobs: echo NIGHTLY_DATE=$(date --rfc-3339=date) >> ${GITHUB_ENV} - name: Update Tag uses: actions/github-script@v7.0.1 - if: env.GITHUB_TAG_TOKEN + if: env.LL_TAG_RELEASE_TOKEN with: - github-token: ${{ env.GITHUB_TAG_TOKEN }} + github-token: ${{ env.LL_TAG_RELEASE_TOKEN }} script: | github.rest.git.createRef( owner: context.repo.owner, -- cgit v1.2.3 From 05efb1494ddf2b3e68bc98835dc353f01482c25e Mon Sep 17 00:00:00 2001 From: Brad Linden Date: Mon, 17 Jun 2024 18:57:26 -0700 Subject: Fix yaml indentation of javascript snippet in tag-release workflow --- .github/workflows/tag-release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/tag-release.yaml b/.github/workflows/tag-release.yaml index 2083b414f5..cb9babaea8 100644 --- a/.github/workflows/tag-release.yaml +++ b/.github/workflows/tag-release.yaml @@ -45,4 +45,4 @@ jobs: repo: context.repo.repo, ref: "refs/tags/${{ env.VIEWER_CHANNEL }}#${{ env.NIGHTLY_DATE }}", sha: context.sha - ) + ) -- cgit v1.2.3 From e165be000781034c0d56659f3f021b1efb323108 Mon Sep 17 00:00:00 2001 From: Brad Linden Date: Tue, 18 Jun 2024 14:23:43 -0700 Subject: Attempt to use provided GITHUB_TOKEN and generate tag id from inputs --- .github/workflows/tag-release.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to '.github') diff --git a/.github/workflows/tag-release.yaml b/.github/workflows/tag-release.yaml index cb9babaea8..24d8fbb8bf 100644 --- a/.github/workflows/tag-release.yaml +++ b/.github/workflows/tag-release.yaml @@ -26,23 +26,22 @@ on: jobs: tag-release: runs-on: ubuntu-latest - env: - LL_TAG_RELEASE_TOKEN: ${{ secrets.LL_TAG_RELEASE_TOKEN }} steps: - name: Setup Env Vars run: | CHANNEL="${{ inputs.channel }}" echo VIEWER_CHANNEL="Second_Life_${CHANNEL:-Develop}" >> ${GITHUB_ENV} - echo NIGHTLY_DATE=$(date --rfc-3339=date) >> ${GITHUB_ENV} + NIGHTLY_DATE=$(date --rfc-3339=date) + echo NIGHTLY_DATE=${NIGHTLY_DATE} >> ${GITHUB_ENV} + echo TAG_ID="${{ github.sha }}-${{ inputs.project || '${NIGHTLY_DATE}' }}" - name: Update Tag uses: actions/github-script@v7.0.1 - if: env.LL_TAG_RELEASE_TOKEN with: - github-token: ${{ env.LL_TAG_RELEASE_TOKEN }} + github-token: ${{ secrets.GITHUB_TOKEN }} script: | github.rest.git.createRef( owner: context.repo.owner, repo: context.repo.repo, - ref: "refs/tags/${{ env.VIEWER_CHANNEL }}#${{ env.NIGHTLY_DATE }}", + ref: "refs/tags/${{ env.VIEWER_CHANNEL }}#${{ env.TAG_ID }}", sha: context.sha ) -- cgit v1.2.3 From aa6161ca94d5bd8640840f981ca8b243b553acaa Mon Sep 17 00:00:00 2001 From: Brad Linden Date: Tue, 18 Jun 2024 14:35:22 -0700 Subject: Shorten SHA value used in tag id and attempt to fix js/yaml syntax error --- .github/workflows/tag-release.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '.github') diff --git a/.github/workflows/tag-release.yaml b/.github/workflows/tag-release.yaml index 24d8fbb8bf..18fe686d36 100644 --- a/.github/workflows/tag-release.yaml +++ b/.github/workflows/tag-release.yaml @@ -33,15 +33,15 @@ jobs: echo VIEWER_CHANNEL="Second_Life_${CHANNEL:-Develop}" >> ${GITHUB_ENV} NIGHTLY_DATE=$(date --rfc-3339=date) echo NIGHTLY_DATE=${NIGHTLY_DATE} >> ${GITHUB_ENV} - echo TAG_ID="${{ github.sha }}-${{ inputs.project || '${NIGHTLY_DATE}' }}" + echo TAG_ID="$(echo ${{ github.sha }} | cut -c1-8)-${{ inputs.project || '${NIGHTLY_DATE}' }}" - name: Update Tag uses: actions/github-script@v7.0.1 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | - github.rest.git.createRef( + github.rest.git.createRef({ owner: context.repo.owner, repo: context.repo.repo, ref: "refs/tags/${{ env.VIEWER_CHANNEL }}#${{ env.TAG_ID }}", sha: context.sha - ) + }) -- cgit v1.2.3 From 32b912af9a821b0edaebb75d037da05df6ff25e5 Mon Sep 17 00:00:00 2001 From: Brad Linden Date: Thu, 20 Jun 2024 17:15:16 -0700 Subject: Make sure TAG_ID actually gets added to GITHUB_ENV --- .github/workflows/tag-release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/tag-release.yaml b/.github/workflows/tag-release.yaml index 18fe686d36..65d1d43a83 100644 --- a/.github/workflows/tag-release.yaml +++ b/.github/workflows/tag-release.yaml @@ -33,7 +33,7 @@ jobs: echo VIEWER_CHANNEL="Second_Life_${CHANNEL:-Develop}" >> ${GITHUB_ENV} 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}' }}" + 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 with: -- cgit v1.2.3 From 06c90a6fecb88f7062e366ce7aa400dd6a2d937a Mon Sep 17 00:00:00 2001 From: Brad Linden <46733234+brad-linden@users.noreply.github.com> Date: Tue, 23 Jul 2024 09:54:19 -0700 Subject: Clarify environment info prompt for bug issue template. (#2088) --- .github/ISSUE_TEMPLATE/10-bug.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github') diff --git a/.github/ISSUE_TEMPLATE/10-bug.yaml b/.github/ISSUE_TEMPLATE/10-bug.yaml index 41208e8bf5..612f71ace6 100644 --- a/.github/ISSUE_TEMPLATE/10-bug.yaml +++ b/.github/ISSUE_TEMPLATE/10-bug.yaml @@ -11,8 +11,8 @@ body: - type: textarea attributes: label: Environment - description: About Second Life Text - placeholder: ex. Second Life Test 7.1.3.240191747 (64bit) ... + description: "Please copy the info from the viewer's 'About Second Life' window and paste it here:" + placeholder: 'ex. Second Life Release 7.1.8.9375512768 (64bit) ...' validations: required: true -- cgit v1.2.3 From 57e78ed43b61864a6b8a54df95d8823daaeb5fe8 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 23 Jul 2024 11:22:09 +0300 Subject: viewer#2043 bugsplat symbol upload update --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index aa504f51d8..68fdc3c2bf 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -395,7 +395,7 @@ jobs: password: ${{ env.BUGSPLAT_PASS }} database: "SecondLife_Viewer_2018" channel: ${{ needs.build.outputs.viewer_channel }} - version: ${{ needs.build.outputs.viewer_version }} + version: ${{ needs.build.outputs.viewer_version }} (${{ needs.build.outputs.viewer_version }}) release: needs: [setvar, build, sign-and-package-windows, sign-and-package-mac] -- cgit v1.2.3 From 60d91f8e7551f3005626ec30f9f760e59e6a92c7 Mon Sep 17 00:00:00 2001 From: Bennett Goble Date: Sun, 28 Jul 2024 22:38:28 -0700 Subject: Fix PR builds from forks Build ReleaseOS when a PR is from a fork rather than Release. This fixes OSS PR builds which, until now, have been failing because they cannot access secrets. --- .github/workflows/build.yaml | 65 ++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 36 deletions(-) (limited to '.github') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 68fdc3c2bf..f0a48f9b69 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -7,14 +7,14 @@ on: tags: ["Second_Life*"] jobs: - # The whole point of the setvar job is that we want to set a variable once - # that will be consumed by multiple subsequent jobs. We tried setting it in - # the global env, but a job.env can't directly reference the global env - # context. - setvar: + # The whole point of the setup job is that we want to set variables once + # that will be consumed by multiple subsequent jobs. + setup: runs-on: ubuntu-latest outputs: release_run: ${{ steps.setvar.outputs.release_run }} + configurations: ${{ steps.setvar.outputs.configurations }} + bugsplat_db: ${{ steps.setvar.outputs.bugsplat_db }} env: # Build with a tag like "Second_Life#abcdef0" to generate a release page # (used for builds we are planning to deploy). @@ -23,32 +23,34 @@ jobs: # its value when false is "false", which is interpreted as true. RELEASE_RUN: ${{ (github.event.inputs.release_run || github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life')) && 'Y' || '' }} steps: - - name: Set Variable + - name: Set Variables id: setvar shell: bash run: | echo "release_run=$RELEASE_RUN" >> "$GITHUB_OUTPUT" + if [[ "$FROM_FORK" == "true" ]]; then + # PR from fork; don't build with Bugsplat, proprietary libs + echo 'configurations=["ReleaseOS"]' >> $GITHUB_OUTPUT + echo "bugsplat_db=" >> $GITHUB_OUTPUT + else + echo 'configurations=["Release"]' >> $GITHUB_OUTPUT + echo "bugsplat_db=SecondLife_Viewer_2018" >> $GITHUB_OUTPUT + fi build: - needs: setvar + needs: setup strategy: matrix: runner: [windows-large, macos-12-xl] - configuration: [Release] - Linden: [true] - include: - - runner: macos-12-xl - developer_dir: "/Applications/Xcode_14.0.1.app/Contents/Developer" - - runner: windows-large - configuration: ReleaseOS - Linden: false + configuration: ${{ fromJSON(needs.setup.outputs.configurations) }} runs-on: ${{ matrix.runner }} outputs: viewer_channel: ${{ steps.build.outputs.viewer_channel }} viewer_version: ${{ steps.build.outputs.viewer_version }} viewer_branch: ${{ steps.which-branch.outputs.branch }} relnotes: ${{ steps.which-branch.outputs.relnotes }} - imagename: ${{ steps.build.outputs.imagename }} + imagename: ${{ steps.build.outputs.imagename }} + configuration: ${{ matrix.configuration }} env: AUTOBUILD_ADDRSIZE: 64 AUTOBUILD_BUILD_ID: ${{ github.run_id }} @@ -61,12 +63,12 @@ jobs: # autobuild-package.xml. AUTOBUILD_VCS_INFO: "true" AUTOBUILD_VSVER: "170" - DEVELOPER_DIR: ${{ matrix.developer_dir }} + DEVELOPER_DIR: "/Applications/Xcode_14.0.1.app/Contents/Developer" # Ensure that Linden viewer builds engage Bugsplat. - BUGSPLAT_DB: ${{ matrix.Linden && 'SecondLife_Viewer_2018' || '' }} + BUGSPLAT_DB: ${{ needs.setup.outputs.bugsplat_db }} # Run BUILD steps for Release configuration. # Run BUILD steps for ReleaseOS configuration only for release runs. - BUILD: ${{ (matrix.Linden || needs.setvar.outputs.release_run) && 'Y' || '' }} + BUILD: ${{ needs.setup.outputs.build }} build_coverity: false build_log_dir: ${{ github.workspace }}/.logs build_viewer: true @@ -85,19 +87,16 @@ jobs: variants: ${{ matrix.configuration }} steps: - name: Checkout code - if: env.BUILD uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha || github.sha }} - name: Setup python - if: env.BUILD uses: actions/setup-python@v5 with: python-version: "3.11" - name: Checkout build variables - if: env.BUILD uses: actions/checkout@v4 with: repository: secondlife/build-variables @@ -105,19 +104,16 @@ jobs: path: .build-variables - name: Checkout master-message-template - if: env.BUILD uses: actions/checkout@v4 with: repository: secondlife/master-message-template path: .master-message-template - name: Install autobuild and python dependencies - if: env.BUILD run: pip3 install autobuild llsd - name: Cache autobuild packages id: cache-installables - if: env.BUILD uses: actions/cache@v4 with: path: .autobuild-installables @@ -127,19 +123,17 @@ jobs: ${{ runner.os }}-64- - name: Install windows dependencies - if: env.BUILD && runner.os == 'Windows' + if: runner.os == 'Windows' run: choco install nsis-unicode - name: Determine source branch id: which-branch - if: env.BUILD uses: secondlife/viewer-build-util/which-branch@v2 with: token: ${{ github.token }} - name: Build id: build - if: env.BUILD shell: bash env: AUTOBUILD_VCS_BRANCH: ${{ steps.which-branch.outputs.branch }} @@ -265,7 +259,7 @@ jobs: echo "artifact=$RUNNER_OS$cfg_suffix" >> $GITHUB_OUTPUT - name: Upload executable - if: matrix.Linden && steps.build.outputs.viewer_app + if: matrix.configuration == 'Release' && steps.build.outputs.viewer_app uses: actions/upload-artifact@v4 with: name: "${{ steps.build.outputs.artifact }}-app" @@ -275,15 +269,13 @@ jobs: # The other upload of nontrivial size is the symbol file. Use a distinct # artifact for that too. - name: Upload symbol file - if: matrix.Linden uses: actions/upload-artifact@v4 + if: matrix.configuration == 'Release' with: name: "${{ steps.build.outputs.artifact }}-symbols" - path: | - ${{ steps.build.outputs.symbolfile }} + path: ${{ steps.build.outputs.symbolfile }} - name: Upload metadata - if: matrix.Linden uses: actions/upload-artifact@v4 with: name: "${{ steps.build.outputs.artifact }}-metadata" @@ -294,7 +286,7 @@ jobs: - name: Upload physics package uses: actions/upload-artifact@v4 # should only be set for viewer-private - if: matrix.Linden && steps.build.outputs.physicstpv + if: matrix.configuration == 'Release' && steps.build.outputs.physicstpv with: name: "${{ steps.build.outputs.artifact }}-physics" # emitted by build.sh, zero or one lines @@ -385,6 +377,7 @@ jobs: BUGSPLAT_USER: ${{ secrets.BUGSPLAT_USER }} BUGSPLAT_PASS: ${{ secrets.BUGSPLAT_PASS }} needs: build + if: needs.build.outputs.configuration == 'Release' runs-on: ubuntu-latest steps: - name: Post Mac symbols @@ -398,9 +391,9 @@ jobs: version: ${{ needs.build.outputs.viewer_version }} (${{ needs.build.outputs.viewer_version }}) release: - needs: [setvar, build, sign-and-package-windows, sign-and-package-mac] + needs: [setup, build, sign-and-package-windows, sign-and-package-mac] runs-on: ubuntu-latest - if: needs.setvar.outputs.release_run + if: needs.setup.outputs.release_run steps: - uses: actions/download-artifact@v4 with: -- cgit v1.2.3 From a247902e3dd7c9fa566b9ecd97845419a82c1afe Mon Sep 17 00:00:00 2001 From: Bennett Goble Date: Mon, 29 Jul 2024 09:52:59 -0700 Subject: build.yaml: Remove unused BUILD variable --- .github/workflows/build.yaml | 3 --- 1 file changed, 3 deletions(-) (limited to '.github') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f0a48f9b69..b385e3ba12 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -66,9 +66,6 @@ jobs: DEVELOPER_DIR: "/Applications/Xcode_14.0.1.app/Contents/Developer" # Ensure that Linden viewer builds engage Bugsplat. BUGSPLAT_DB: ${{ needs.setup.outputs.bugsplat_db }} - # Run BUILD steps for Release configuration. - # Run BUILD steps for ReleaseOS configuration only for release runs. - BUILD: ${{ needs.setup.outputs.build }} build_coverity: false build_log_dir: ${{ github.workspace }}/.logs build_viewer: true -- cgit v1.2.3 From dfa7d60a72fbf2705d0240dd73ca78ddda5db56d Mon Sep 17 00:00:00 2001 From: Signal Linden Date: Tue, 30 Jul 2024 10:09:49 -0700 Subject: build.yaml: Fix FROM_FORK value, ReleaseOS PR builds (#2147) --- .github/workflows/build.yaml | 1 + 1 file changed, 1 insertion(+) (limited to '.github') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b385e3ba12..fd3b1e0e0a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -22,6 +22,7 @@ jobs: # important to ensure it's the empty string when false. If you omit || '', # its value when false is "false", which is interpreted as true. RELEASE_RUN: ${{ (github.event.inputs.release_run || github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life')) && 'Y' || '' }} + FROM_FORK: ${{ github.event.pull_request.head.repo.organization != 'secondlife' }} steps: - name: Set Variables id: setvar -- cgit v1.2.3 From 01688e52165b66962dcd13c78aa27c68fbfb2a8b Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Fri, 2 Aug 2024 20:48:06 +0300 Subject: Use dedicated property to determine if build is called from a fork (#2183) --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index fd3b1e0e0a..e54eb170af 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -22,7 +22,7 @@ jobs: # important to ensure it's the empty string when false. If you omit || '', # its value when false is "false", which is interpreted as true. RELEASE_RUN: ${{ (github.event.inputs.release_run || github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life')) && 'Y' || '' }} - FROM_FORK: ${{ github.event.pull_request.head.repo.organization != 'secondlife' }} + FROM_FORK: ${{ github.event.pull_request.head.repo.fork }} steps: - name: Set Variables id: setvar -- cgit v1.2.3