ref: Remove v9 checks for debug image provider #2071
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Version Bump Util | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
# Concurrency configuration: | |
# - We use workflow-specific concurrency groups to prevent multiple version bump utility tests, | |
# as these test critical release infrastructure and version management tools. | |
# - For pull requests, we cancel in-progress runs when new commits are pushed since only the | |
# latest version utility behavior matters for validating release process changes. | |
# - For main branch pushes, we never cancel version utility tests to ensure our release | |
# infrastructure remains reliable and our version bumping tools work correctly. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
jobs: | |
files-changed: | |
name: Detect File Changes | |
runs-on: ubuntu-latest | |
outputs: | |
run_version_bump_util_for_prs: ${{ steps.changes.outputs.run_version_bump_util_for_prs }} | |
steps: | |
- uses: actions/checkout@v5 | |
- name: Get changed files | |
id: changes | |
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
with: | |
token: ${{ github.token }} | |
filters: .github/file-filters.yml | |
run-version-bump: | |
if: github.event_name != 'pull_request' || needs.files-changed.outputs.run_version_bump_util_for_prs == 'true' | |
needs: files-changed | |
# The release workflow uses the Makefile to bump the version so it needs to be tested. | |
name: Run Version Bump (Makefile) | |
# We intentionally run this on ubuntu because the release workflow also runs on ubuntu, which uses the version bump util. | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v5 | |
- name: Generate Version Number | |
id: generate-version-number | |
run: | | |
TIMESTAMP=$(date +%Y%m%d%H%M%S) | |
echo "VERSION=100.0.$TIMESTAMP" >> $GITHUB_OUTPUT | |
# We don't care which version we bump to, as long as it's a valid semver | |
- run: make bump-version TO=${{ steps.generate-version-number.outputs.VERSION }} | |
- run: make verify-version TO=${{ steps.generate-version-number.outputs.VERSION }} | |
run-version-bump-script: | |
if: github.event_name != 'pull_request' || needs.files-changed.outputs.run_version_bump_util_for_prs == 'true' | |
needs: files-changed | |
# Craft uses the shell script to bump the version so it needs to be tested. | |
name: Run Version Bump (Shell Script) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v5 | |
- name: Generate Version Number | |
id: generate-version-number | |
run: | | |
OLD_VERSION=$(cat ./Sources/Configuration/Versioning.xcconfig | grep MARKETING_VERSION | cut -d '=' -f 2 | tr -d ' ') | |
echo "Read old version: ${OLD_VERSION}" | |
echo "OLD_VERSION=${OLD_VERSION}" >> $GITHUB_OUTPUT | |
NEW_VERSION="100.0.$(date +%Y%m%d%H%M%S)" | |
echo "Generated new version: ${NEW_VERSION}" | |
echo "NEW_VERSION=${NEW_VERSION}" >> $GITHUB_OUTPUT | |
- name: Verify OLD_VERSION is defined | |
if: ${{ steps.generate-version-number.outputs.OLD_VERSION == '' }} | |
run: | | |
echo "OLD_VERSION is not defined. Make sure this script is reading the version from the correct file." | |
exit 1 | |
- name: Create fake xcframework for update-package-sha.sh | |
run: | | |
mkdir -p Carthage | |
echo "<FAKE STATIC ZIP>" > Carthage/Sentry.xcframework.zip | |
echo "<FAKE DYNAMIC ZIP>" > Carthage/Sentry-Dynamic.xcframework.zip | |
echo "<FAKE DYNAMIC WITH ARM64E ZIP>" > Carthage/Sentry-Dynamic-WithARM64e.xcframework.zip | |
echo "<FAKE WITHOUT UIKIT OR APPKIT ZIP>" > Carthage/Sentry-WithoutUIKitOrAppKit.xcframework.zip | |
echo "<FAKE WITHOUT UIKIT OR APPKIT WITH ARM64E ZIP>" > Carthage/Sentry-WithoutUIKitOrAppKit-WithARM64e.xcframework.zip | |
- name: Bump version | |
run: ./scripts/bump.sh ${{ steps.generate-version-number.outputs.OLD_VERSION }} ${{ steps.generate-version-number.outputs.NEW_VERSION }} | |
- name: Verify outputs of bump.sh | |
run: make verify-version TO=${{ steps.generate-version-number.outputs.NEW_VERSION }} | |
- name: Verify outputs of update-package-sha.sh | |
run: | | |
./scripts/verify-package-sha.sh \ | |
--static-checksum "7062a80f8a80f8b6d812698af87384751567a6aaa0df6f03b0596d728b22dcfd" \ | |
--dynamic-checksum "f6325cd8f05523d60222451fa61b3cd3d58148e5a21236f82abfd3f92750c87c" \ | |
--dynamic-with-arm64e-checksum "bbb84b054e5792aa705b95541aa4585f793e566a6b95638f8fef8e308d9782c3" \ | |
--without-uikit-or-appkit-checksum "c647afe93889063325b5dfcabf43101749f6a8f37008cca858833ed280d2a84e" \ | |
--without-uikit-or-appkit-with-arm64e-checksum "af5af7edc8e107fe04b905bd23524fdc93914fce8e1bd72ccf281408efff9a47" \ | |
--last-release-runid "${{ github.run_id }}" | |
# This check validates that either version-bump-util passed or was skipped, which allows us | |
# to make version-bump-util a required check with only running the version-bump-util when required. | |
# So, we don't have to run version-bump-util, for example, for unrelated changes. | |
version_bump_util-required-check: | |
needs: | |
[ | |
files-changed, | |
run-version-bump, | |
run-version-bump-script, | |
] | |
name: Test Version Bump Util | |
# This is necessary since a failed/skipped dependent job would cause this job to be skipped | |
if: always() | |
runs-on: ubuntu-latest | |
steps: | |
# If any jobs we depend on fails gets cancelled or times out, this job will fail. | |
# Skipped jobs are not considered failures. | |
- name: Check for failures | |
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') | |
run: | | |
echo "One of the version-bump-util jobs has failed." && exit 1 |