Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Faster code downgrade to speedup CI #4352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
ondrejmirtes merged 4 commits into phpstan:2.1.x from staabm:upgr
Sep 20, 2025
Merged

Faster code downgrade to speedup CI #4352

ondrejmirtes merged 4 commits into phpstan:2.1.x from staabm:upgr
Sep 20, 2025

Conversation

Copy link
Contributor

@staabm staabm commented Sep 20, 2025
edited
Loading

make use of ondrejmirtes/simple-downgrader#14

downgrading phpstan-src in CI before this PR took ~10min (windows) and ~4m30s (ubuntu)

we are now down to ~15-25 seconds

canvural and talkinnl reacted with rocket emoji
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
php-version: "8.4"
Copy link
Member

@ondrejmirtes ondrejmirtes Sep 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd do this a bit differently:

  1. Install ${{ matrix.php-version }}
  2. Run the composer steps
  3. Only when downgrading: install 8.4
  4. Transform source code
  5. Only when downgrading: install ${{ matrix.php-version }} again

You can try playing with https://docs.github.com/en/actions/tutorials/create-actions/create-a-composite-action to see if we can achieve DRY across different workflows.

staabm reacted with thumbs up emoji
Copy link
Member

@ondrejmirtes ondrejmirtes Sep 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I want to avoid is always start by installing 8.4 which is immediately going to be ovewritten with matrix version.

Copy link
Contributor Author

@staabm staabm Sep 20, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd do this a bit differently:

done

You can try playing with docs.github.com/en/actions/tutorials/create-actions/create-a-composite-action to see if we can achieve DRY across different workflows.

I would do that in a followup

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure what todo with the "Compile PHAR" - or what the actual problem is.

Copy link
Member

@ondrejmirtes ondrejmirtes Sep 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you link the failure? I don't see anything big.

If you mean "Checksum PHAR" - that's fine. The idea behind that job is that the PHAR checksum should not change when src/ doesn't change.

If we change something about the compilation process then it's fine if PHAR contents change. I suspect that some ConstFetches now use FQN like \null so the source slightly changed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you mean "Checksum PHAR" - that's fine.

yep, that one. wasn't sure what it means

@staabm staabm marked this pull request as ready for review September 20, 2025 19:35
Copy link
Collaborator

This pull request has been marked as ready for review.

run: "composer install --no-interaction --no-progress"

- name: "Change to simple-downgrade PHP version"
uses: "shivammathur/setup-php@v2"
Copy link
Member

@ondrejmirtes ondrejmirtes Sep 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No if condition here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
php-version: "8.4"
Copy link
Member

@ondrejmirtes ondrejmirtes Sep 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you link the failure? I don't see anything big.

If you mean "Checksum PHAR" - that's fine. The idea behind that job is that the PHAR checksum should not change when src/ doesn't change.

If we change something about the compilation process then it's fine if PHAR contents change. I suspect that some ConstFetches now use FQN like \null so the source slightly changed.

@ondrejmirtes ondrejmirtes merged commit 7776279 into phpstan:2.1.x Sep 20, 2025
454 of 457 checks passed
Copy link
Member

Really great! 🎉

@staabm staabm deleted the upgr branch September 20, 2025 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@ondrejmirtes ondrejmirtes ondrejmirtes requested changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /