From 6fcab4131cffabb6c12804a9649dc3af8d7c2992 Mon Sep 17 00:00:00 2001 From: Aaron Colwell <300262+acolwell@users.noreply.github.com> Date: Tue, 1 Oct 2024 17:06:34 -0700 Subject: [PATCH] Schedule nightly builds and upload installer to nightly release. --- .github/workflows/build_installer.yml | 54 ++++++++++++++++++++++++- .github/workflows/build_pacman_repo.yml | 3 ++ .github/workflows/ci.yml | 6 +-- 3 files changed, 58 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_installer.yml b/.github/workflows/build_installer.yml index f31a14b41..254e8a6ca 100644 --- a/.github/workflows/build_installer.yml +++ b/.github/workflows/build_installer.yml @@ -1,8 +1,16 @@ name: Build Installer on: - workflow_dispatch: {} - push: + workflow_dispatch: + inputs: + push_to_nightly_release: + required: true + type: boolean + default: false + push: {} + + schedule: + - cron: '0 12 * * *' env: NATRON_BUILD_WORKSPACE: 'D:/nbw' @@ -16,6 +24,9 @@ jobs: run: shell: msys2 {0} + outputs: + win_installer_artifact: ${{ steps.build.outputs.INSTALLER_NAME }} + steps: - name: Checkout branch uses: actions/checkout@v4.1.1 @@ -119,6 +130,10 @@ jobs: run: shell: msys2 {0} + outputs: + win_installer_breakpad_artifact: ${{ steps.build.outputs.INSTALLER_NAME }} + win_installer_breakpad_symbols_artifact: ${{ steps.build.outputs.SYMBOLS_NAME }} + steps: - name: Checkout branch uses: actions/checkout@v4.1.1 @@ -199,3 +214,38 @@ jobs: echo "Testing $(basename ${x}) ..." PATH=${INSTALLER_DIR}/bin ./verify_plugin_loads.exe "${x}" done + + update-nightly-release: + name: "Update Nightly Release" + runs-on: "ubuntu-latest" + needs: [win-installer, win-installer-breakpad] + permissions: + contents: write + if: (github.event.schedule != '' && github.ref_name == 'AJC-RB-2.5') || ${{ inputs.push_to_nightly_release }} + steps: + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + + - name: Display structure of downloaded files + run: ls -R artifacts + + - name: Zip artifacts + run: | + cd artifacts + (cd ${{ needs.win-installer.outputs.win_installer_artifact }}; zip -r ../${{ needs.win-installer.outputs.win_installer_artifact }}.zip *) + (cd ${{ needs.win-installer-breakpad.outputs.win_installer_breakpad_artifact }}; zip -r ../${{ needs.win-installer-breakpad.outputs.win_installer_breakpad_artifact }}.zip *) + (cd ${{ needs.win-installer-breakpad.outputs.win_installer_breakpad_symbols_artifact }}; zip -r ../${{ needs.win-installer-breakpad.outputs.win_installer_breakpad_symbols_artifact }}.zip *) + + - name: Display structure of downloaded files + run: ls -R artifacts + + - uses: "softprops/action-gh-release@v1" + with: + token: "${{ secrets.GITHUB_TOKEN }}" + prerelease: true + tag_name: nightly + target_commitish: ${{ github.sha }} + files: | + artifacts/*.zip diff --git a/.github/workflows/build_pacman_repo.yml b/.github/workflows/build_pacman_repo.yml index 71a9bbc49..e158bfab6 100644 --- a/.github/workflows/build_pacman_repo.yml +++ b/.github/workflows/build_pacman_repo.yml @@ -11,6 +11,9 @@ on: - 'tools/MINGW-packages/**' - '.github/workflows/build_pacman_repo.yml' + schedule: + - cron: '0 12 * * *' + concurrency: group: ${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.ref }} cancel-in-progress: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 116eafaeb..c8bb4526a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,9 +3,6 @@ name: Tests on: workflow_dispatch: {} push: - branches: - - RB-2.5 - - RB-2.6 paths-ignore: - Documentation pull_request: @@ -15,6 +12,9 @@ on: paths-ignore: - Documentation + schedule: + - cron: '0 12 * * *' + jobs: unix_test: name: Test ${{ matrix.os }} Python ${{ matrix.python-version }}