Speed up CI workflows
See original GitHub issueIs your enhancement request related to a problem? Please describe. When we open a new PR, the CI workflows will run about one to two hours. So I wrote a script to analyze the time every workflow spends. The key is CI workflow name and the value is time(seconds)
{
"CI - Unit - Brokers - Broker": 13255,
"CI - Unit": 5160,
"CI - Unit - Brokers - Broker Group 1": 3939,
"CI - Unit - Brokers - Other": 3622,
"CI - Integration - Pulsar-IO Sinks and Sources": 3620,
"CI - Integration - Cli": 3620,
"CI - CPP build on Windows": 3619,
"CI - Integration - Process": 3617,
"CI - Integration - Thread": 3617,
"CI - Unit - Brokers - Broker Group 2": 3090,
"CI - Integration - Function State": 3024,
"CI - Integration - Sql": 2816,
"CI - Python - Build 3.9 client": 2762,
"CI - Integration - Messaging": 2651,
"CI - Integration - Backwards Compatibility": 2577,
"CI - Integration - Pulsar-IO Oracle Source": 2563,
"CI - Unit - Brokers - Publish - Throttle": 2531,
"CI - Shade - Test": 2500,
"CI - Unit - Brokers - Transaction": 2492,
"CI - Unit - Flaky": 2441,
"CI - Integration - Function & IO": 2432,
"CI - Unit - Brokers - Flaky": 2308,
"CI - Unit - Broker Auth SASL": 2274,
"CI - Integration - Standalone": 2235,
"CI - Integration - Schema": 2169,
"CI - Integration - Transaction": 2074,
"CI - Integration - Tiered FileSystem": 2047,
"CI - Docker Build": 2023,
"CI - Integration - Tiered JCloud": 1995,
"CI - Unit - Brokers - Broker Group": 1868,
"CI - Unit - Brokers - Others": 1637,
"CI - Build - MacOS": 1513,
"CI - Unit - Brokers - Long - Time": 1243,
"CI - CPP, Python Tests": 1117,
"CI - Unit - Adaptors": 1084,
"CI - Unit - Brokers - Client Impl": 993,
"CI - Misc": 969,
"CI - Unit - Brokers - Client Api": 949,
"CI - Unit - Proxy": 799,
"CI - Unit - Brokers - Default": 699,
"CI - CPP build on CentOS 7": 608,
"CI - Unit - Broker - JDK8": 455,
"Pulsar Bot": 213,
"Auto Labeling": 201,
"CI - Go Functions style check": 157,
"CI - Go Functions Tests": 157,
"CI - Maven Dependency Cache Update": 155,
"CI - Pulsar - Build - 2.6": 141,
"CI - Cancel duplicate workflows": 46,
"CI - Misc - OWASP Dependency Check": 32,
"CI - Deployment - Helm": 31
}
As we can see that CI - Integration xxx
, CI - Unit xxx
and CPP build on Windows
cost most. Let’s step into these worfklows.
CI - Integration xxx
Like all the other CI - Integration xxx
, CI - Integration - Pulsar-IO Sinks and Sources
can be divided into three parts:
CI - Unit xxx
CPP build on Windows
- All these
Intergration
andUnit
jobs can be abstracted intoBuild
andTest
.Build
containsmvn install without test
anddocker build
, andTest
ismvn test
. There are so many workflow jobs executeBuild
step and cost most. vcpkg install
dependencies cost most.
Describe the solution you’d like
- Share maven install result files between all
Intergration
andUnit
jobs. So we need to make a workflow to pre cache the result files first and then trigger the jobs. But consider thatGithub Action
cannot re-run the fail steps now, when a job runs with fail, we need to re-run the whole workflow. So we also need to do some tricks to make the workflow to be idempotent. - Cache the vcpkg dependencies.
- Use docker base images when docker build.
Describe alternatives you’ve considered Remove useless or repeat jobs.
Additional context Add any other context or screenshots about the feature request here.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:16 (16 by maintainers)
Top Results From Across the Web
Battle tested strategies for speeding up CI builds | by Dev Shah
After a lot of research, trial and error, we were able to collate the below 5 strategies to speed up CI workflows. We...
Read more >5 Ways to Speed Up the CI/CD Pipeline - JFrog
#1. Use CI/CD branching · #2. Employ canary releases · #3. Avoid making too many feature changes at once · #4. Use containers...
Read more >5 DevOps tips to speed up your developer workflow
From learning YAML to scripting with Bash, here are a few simple tips for developers who want to speed up their workflows.
Read more >Speed Up Your CI/CD with Containerization - Sharkbyte
Let's take a look at what containerization is and how it can help speed up your continuous integration and deployment processes.
Read more >Speed up Gitlab CI, optimize your CI/CD workflow | Padok
Set up an efficient CI/CD workflow. You will learn here how to optimize and speed up a GitLab CI pipeline while keeping the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s very reliable and fast in practice. The limit of 10GB is per fork, so it’s more than enough.
I didn’t finish the rebasing yet, I’ll continue on Monday.
@yaalsn Please review #14819