From 7d9ad6daab0b1ee478207bcddd95b6ad2b6f9dbc Mon Sep 17 00:00:00 2001 From: Tyler Wilding Date: Wed, 19 Jul 2023 21:44:20 -0400 Subject: [PATCH] ci: only fetch tags for releases --- .github/workflows/linux_build_flatpak.yml | 10 +++++++--- .github/workflows/linux_build_qt.yml | 9 +++++++-- .github/workflows/macos_build.yml | 9 +++++++-- .github/workflows/release_cut_new.yml | 5 +++++ .github/workflows/windows_build_qt.yml | 9 +++++++-- 5 files changed, 33 insertions(+), 9 deletions(-) diff --git a/.github/workflows/linux_build_flatpak.yml b/.github/workflows/linux_build_flatpak.yml index 8782c0a662..03d693c6de 100644 --- a/.github/workflows/linux_build_flatpak.yml +++ b/.github/workflows/linux_build_flatpak.yml @@ -28,10 +28,14 @@ on: required: false type: boolean default: false - patches_url: + patchesUrl: required: false type: string default: https://github.com/PCSX2/pcsx2_patches/releases/latest/download + fetchTags: + required: false + type: boolean + default: false jobs: build_linux: @@ -49,7 +53,7 @@ jobs: # it doesn't fetch tags, therefore we don't get a version. So grab them manually. # actions/checkout elides tags, fetch them primarily for releases - name: Fetch tags - id: fetch-tags + if: ${{ inputs.fetchTags }} run: git fetch --tags --no-recurse-submodules - name: Prepare Artifact Metadata @@ -73,7 +77,7 @@ jobs: - name: Download patches run: | cd bin/resources - aria2c -Z "${{ inputs.patches_url }}/patches.zip" + aria2c -Z "${{ inputs.patchesUrl }}/patches.zip" - name: Generate AppStream XML run: | diff --git a/.github/workflows/linux_build_qt.yml b/.github/workflows/linux_build_qt.yml index 5c227edc77..286321c229 100644 --- a/.github/workflows/linux_build_qt.yml +++ b/.github/workflows/linux_build_qt.yml @@ -28,10 +28,14 @@ on: required: false type: string default: "" - patches_url: + patchesUrl: required: false type: string default: https://github.com/PCSX2/pcsx2_patches/releases/latest/download + fetchTags: + required: false + type: boolean + default: false jobs: build_linux: @@ -54,6 +58,7 @@ jobs: # actions/checkout elides tags, fetch them primarily for releases - name: Fetch Tags + if: ${{ inputs.fetchTags }} run: git fetch --tags --no-recurse-submodules - name: Prepare Artifact Metadata @@ -99,7 +104,7 @@ jobs: - name: Download patches run: | cd bin/resources - aria2c -Z "${{ inputs.patches_url }}/patches.zip" + aria2c -Z "${{ inputs.patchesUrl }}/patches.zip" - name: Generate CMake env: diff --git a/.github/workflows/macos_build.yml b/.github/workflows/macos_build.yml index 5ed80110df..c7649947e3 100644 --- a/.github/workflows/macos_build.yml +++ b/.github/workflows/macos_build.yml @@ -10,10 +10,14 @@ on: required: false type: string default: macos-13 - patches_url: + patchesUrl: required: false type: string default: https://github.com/PCSX2/pcsx2_patches/releases/latest/download + fetchTags: + required: false + type: boolean + default: false jobs: build_macos: @@ -37,6 +41,7 @@ jobs: # actions/checkout elides tags, fetch them primarily for releases - name: Fetch Tags + if: ${{ inputs.fetchTags }} run: git fetch --tags --no-recurse-submodules - name: Use Xcode 14.3.1 @@ -81,7 +86,7 @@ jobs: - name: Download patches run: | cd bin/resources - aria2c -Z "${{ inputs.patches_url }}/patches.zip" + aria2c -Z "${{ inputs.patchesUrl }}/patches.zip" # -- SETUP CCACHE - https://cristianadam.eu/20200113/speeding-up-c-plus-plus-github-actions-using-ccache/ - name: Prepare ccache timestamp diff --git a/.github/workflows/release_cut_new.yml b/.github/workflows/release_cut_new.yml index 6b629d945a..e8dff0a3ad 100644 --- a/.github/workflows/release_cut_new.yml +++ b/.github/workflows/release_cut_new.yml @@ -68,6 +68,7 @@ jobs: draft: true prerelease: true tag_name: ${{ steps.tag_version.outputs.new_tag }} + # Build Everything # Linux build_linux_qt: @@ -81,6 +82,7 @@ jobs: compiler: clang cmakeflags: "" buildAppImage: true + fetchTags: true secrets: inherit build_linux_flatpak: @@ -95,6 +97,7 @@ jobs: cmakeflags: "" branch: "stable" publish: false + fetchTags: true secrets: inherit # Windows @@ -109,6 +112,7 @@ jobs: configuration: CMake buildSystem: cmake cmakeFlags: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl + fetchTags: true secrets: inherit # MacOS @@ -120,6 +124,7 @@ jobs: uses: ./.github/workflows/macos_build.yml with: jobName: "MacOS Build" + fetchTags: true secrets: inherit # Upload the Artifacts diff --git a/.github/workflows/windows_build_qt.yml b/.github/workflows/windows_build_qt.yml index 844abead8c..5267ea7428 100644 --- a/.github/workflows/windows_build_qt.yml +++ b/.github/workflows/windows_build_qt.yml @@ -37,10 +37,14 @@ on: required: false type: string default: 3rdparty\qt\6.5.0\msvc2022_64 - patches_url: + patchesUrl: required: false type: string default: https://github.com/PCSX2/pcsx2_patches/releases/latest/download + fetchTags: + required: false + type: boolean + default: false jobs: build_windows_qt: @@ -59,6 +63,7 @@ jobs: # actions/checkout elides tags, fetch them primarily for releases - name: Fetch Tags + if: ${{ inputs.fetchTags }} run: git fetch --tags --no-recurse-submodules - name: Prepare Artifact Metadata @@ -91,7 +96,7 @@ jobs: shell: cmd run: | cd bin/resources - aria2c -Z "${{ inputs.patches_url }}/patches.zip" + aria2c -Z "${{ inputs.patchesUrl }}/patches.zip" - name: Generate CMake if: inputs.configuration == 'CMake'