diff options
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/build.yaml | 93 | ||||
-rw-r--r-- | .github/workflows/pre-commit.yaml | 18 | ||||
-rw-r--r-- | .github/workflows/stale.yaml | 4 |
3 files changed, 113 insertions, 2 deletions
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000000..a110c018ec --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,93 @@ +name: Build + +on: + workflow_dispatch: + pull_request: + push: + branches: [main, contribute] + tags: ["*"] + +jobs: + build: + strategy: + matrix: + runner: [windows-large] + configuration: [ReleaseOS] + addrsize: [64] + include: + - runner: windows-large + configuration: ReleaseOS + addrsize: 32 + runs-on: ${{ matrix.runner }} + env: + AUTOBUILD_CONFIGURATION: ${{ matrix.configuration }} + AUTOBUILD_ADDRSIZE: ${{ matrix.addrsize }} + AUTOBUILD_INSTALLABLE_CACHE: ${{ github.workspace }}/.autobuild-installables + AUTOBUILD_VARIABLES_FILE: ${{ github.workspace }}/.build-variables/variables + AUTOBUILD_VSVER: "170" # vs2k22 + LOGFAIL: debug # Show details when tests fail + GIT_REF: ${{ github.head_ref || github.ref }} + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} + + - name: Checkout build variables + uses: actions/checkout@v3 + with: + repository: secondlife/build-variables + ref: viewer + path: .build-variables + + - name: Install autobuild and python dependencies + run: pip3 install autobuild llbase + + - name: Cache autobuild packages + uses: actions/cache@v3 + id: cache-installables + with: + path: .autobuild-installables + key: ${{ runner.os }}-${{ matrix.addrsize }}-${{ matrix.configuration }}-${{ hashFiles('autobuild.xml') }} + restore-keys: | + ${{ runner.os }}-${{ matrix.addrsize }}-${{ matrix.configuration }}- + ${{ runner.os }}-${{ matrix.addrsize }}- + + - name: Install windows dependencies + if: runner.os == 'Windows' + run: choco install nsis-unicode + + - name: Build + id: build + shell: bash + env: + RUNNER_OS: ${{ runner.os }} + run: | + # On windows we need to point the build to the correct python + # as neither CMake's FindPython nor our custom Python.cmake module + # will resolve the correct interpreter location. + if [[ "$RUNNER_OS" == "Windows" ]]; then + export PYTHON="$(cygpath -m "$(which python)")" + echo "Python location: $PYTHON" + fi + + autobuild configure -- -DVIEWER_CHANNEL="Second Life Test ${GIT_REF##*/}" + autobuild build --no-configure + + # Find artifacts + if [[ "$RUNNER_OS" == "Windows" ]]; then + installer_path=$(find ./build-*/newview/ | grep '_Setup\.exe') + installer_name="$(basename $installer_path)" + elif [[ "$RUNNER_OS" == "macOS" ]]; then + installer_path=$(find ./build-*/newview/ | grep '\.dmg') + installer_name="$(basename $installer_path)" + fi + + echo "installer_path=$installer_path" >> $GITHUB_OUTPUT + echo "installer_name=$installer_name" >> $GITHUB_OUTPUT + + - name: Upload installer + uses: actions/upload-artifact@v3 + with: + name: ${{ steps.build.outputs.installer_name }} + path: ${{ steps.build.outputs.installer_path }} diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml new file mode 100644 index 0000000000..17c0ace02f --- /dev/null +++ b/.github/workflows/pre-commit.yaml @@ -0,0 +1,18 @@ +name: pre-commit + +on: + pull_request: + push: + branches: [main, contribute] + tags: [v*] + + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: 3.x + - uses: pre-commit/action@v3.0.0 diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml index 82a9a968b9..35ac41420c 100644 --- a/.github/workflows/stale.yaml +++ b/.github/workflows/stale.yaml @@ -15,8 +15,8 @@ jobs: - uses: actions/stale@v6 id: stale with: - stale-pr-message: This pull request is stale because it has been open 60 days with no activity. Remove stale label or comment or it will be closed in 7 days - days-before-stale: 60 + 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 + days-before-stale: 30 days-before-close: 7 exempt-pr-labels: blocked,must,should,keep stale-pr-label: stale |