Faster code downgrade to speedup CI#4352
Conversation
.github/workflows/lint.yml
Outdated
| with: | ||
| coverage: "none" | ||
| php-version: "${{ matrix.php-version }}" | ||
| php-version: "8.4" |
There was a problem hiding this comment.
I'd do this a bit differently:
- Install
${{ matrix.php-version }} - Run the composer steps
- Only when downgrading: install 8.4
- Transform source code
- 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.
There was a problem hiding this comment.
What I want to avoid is always start by installing 8.4 which is immediately going to be ovewritten with matrix version.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
not sure what todo with the "Compile PHAR" - or what the actual problem is.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
If you mean "Checksum PHAR" - that's fine.
yep, that one. wasn't sure what it means
|
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" |
.github/workflows/lint.yml
Outdated
| with: | ||
| coverage: "none" | ||
| php-version: "${{ matrix.php-version }}" | ||
| php-version: "8.4" |
There was a problem hiding this comment.
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.
|
Really great! 🎉 |
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