From b7b87c7aaa55633c877441f030b6a1680b185a34 Mon Sep 17 00:00:00 2001 From: Beq Date: Wed, 30 Aug 2023 09:51:42 +0100 Subject: [PATCH] GHA updates to align with PBR. fixes expiries and allows nightly testing via branch trigger --- .github/workflows/build_viewer.yml | 22 +++++++++++++++++----- fsutils/download_list.py | 12 +++++++----- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build_viewer.yml b/.github/workflows/build_viewer.yml index 439c0136be..055ee924e8 100644 --- a/.github/workflows/build_viewer.yml +++ b/.github/workflows/build_viewer.yml @@ -3,8 +3,8 @@ on: push: branches: - "Firestorm*.*.*" - tags: - - "preview" + - "*alpha" + - "*nightly" schedule: - cron: '00 03 * * *' # Run every day at 3am UTC env: @@ -26,10 +26,13 @@ jobs: addrsize: 32 - os: macos-11 addrsize: 32 + - grid: sl + addrsize: 32 runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 + if: runner.os != 'Windows' id: py311 with: python-version: '3.11' @@ -78,7 +81,9 @@ jobs: FS_RELEASE_TYPE=Release elif [[ "${{ github.ref_name }}" == *review* ]]; then FS_RELEASE_TYPE=Beta - elif [[ "${{ github.event_name }}" == 'schedule' ]]; then + elif [[ "${{ github.ref_name }}" == *alpha* ]]; then + FS_RELEASE_TYPE=Alpha + elif [[ "${{ github.ref_name }}" == *nightly* ]] || [[ "${{ github.event_name }}" == 'schedule' ]]; then FS_RELEASE_TYPE=Nightly else FS_RELEASE_TYPE=Unknown @@ -121,7 +126,7 @@ jobs: run: 'rclone copy fs_bundles: --filter "- Alpha/*" --filter "+ *${{ env.fallback_platform }}*bz2" .' - name: rclone any extra private 3p packages for Alpha (allows library updates not in the main repo) - if: env.FS_BUILD_TYPE == 'Alpha' + if: env.FS_RELEASE_TYPE == 'Alpha' run: 'rclone copy fs_bundles:Alpha --include "*${{ env.fallback_platform }}*bz2" .' - name: set VSVER for Windows builds @@ -203,9 +208,13 @@ jobs: shell: bash - name: make Nightly builds expire after 14 days - if: env.FS_BUILD_TYPE == 'Nightly' + if: env.FS_RELEASE_TYPE == 'Nightly' run: | echo "EXTRA_ARGS=${{ env.EXTRA_ARGS}} --testbuild=14" >> $GITHUB_ENV + - name: make Alpha builds expire after 28 days + if: env.FS_RELEASE_TYPE == 'Alpha' + run: | + echo "EXTRA_ARGS=${{ env.EXTRA_ARGS}} --testbuild=28" >> $GITHUB_ENV - name: Clean up packages to give more space run: rm *${{ env.fallback_platform }}*bz2 @@ -265,6 +274,9 @@ jobs: elif [[ "${{ github.ref_name }}" == *review* ]]; then FS_RELEASE_FOLDER=preview FS_BUILD_WEBHOOK_URL=${{ secrets.BETA_WEBHOOK_URL }} + elif [[ "${{ github.ref_name }}" == *alpha* ]]; then + FS_RELEASE_FOLDER=preview + FS_BUILD_WEBHOOK_URL=${{ secrets.BETA_WEBHOOK_URL }} elif [[ "${{ github.event_name }}" == 'schedule' ]]; then FS_RELEASE_FOLDER=nightly FS_BUILD_WEBHOOK_URL=${{ secrets.NIGHTLY_WEBHOOK_URL }} diff --git a/fsutils/download_list.py b/fsutils/download_list.py index 2dc8cfd08d..8f453559a3 100644 --- a/fsutils/download_list.py +++ b/fsutils/download_list.py @@ -129,9 +129,11 @@ dirs = ["windows", "mac", "linux"] # build_types is a map from Beta, Release and Nightly to folder names preview release and nightly build_types = { + "Alpha": "test", "Beta": "preview", "Release": "release", - "Nightly": "nightly" + "Nightly": "nightly", + "Unknown": "test" } target_folder = { @@ -155,10 +157,10 @@ for file in zips: # print(f"build_type is {build_type}") if build_type not in build_types: - print(f"Invalid build_type {build_type} using file {file}") - continue - else: - build_folder = build_types[build_type] + print(f"Invalid build_type {build_type} from file {file} using 'Unknown'") + build_type = "Unknown" + + build_folder = build_types[build_type] build_types_created.add(build_type)