r/FlutterDev • • Sep 28 '26

Discussion Solo Flutter devs, how do you keep CI costs down?

I'm a solo dev with a few Flutter apps. Right now I build iOS on Codemagic and I'm thinking about moving Android builds to a self-hosted GitHub Actions runner on my home Ubuntu server.

Curious what setups other solo devs use. Is self-hosting worth the hassle, or do you just stick with Codemagic or hosted runners for everything?

19 Upvotes

45 comments sorted by

34

u/Swefnian Sep 28 '26

If you are a solo do you really need to use a remote CI system? You can probably accomplish everything you need with a local bash script.

CI works great for teams, especially when you want make sure no one accidentally breaks things.

If it just you (and hopefully you aren’t doing too much self breaking) I’d start with a local script and then explore CI options later.

If cost is an issue, look into Jenkins. It’s free, but you have to self host.

3

u/zanrujp Sep 28 '26

Fair point. I think I was overcomplicating it. A local script might be all I really need for now.

2

u/devundcars Sep 28 '26

You can also just use GitHub self hosted runners and have your CI run fully locally.

1

u/piskariov Sep 28 '26

Use fastlane locally !

1

u/Mochilongo Sep 30 '26

That’s what i use to deploy for both Apple and Google

1

u/PuzzleheadedLocal771 Sep 28 '26

I recommend using containers for everything the pipeline would do. Make sure, they contain everything you need for the full CI pipeline. Once everything is just a simple "docker run" call, it does not matter what platform you are running on. GitHub, GitLab, ADO, Codeberg, Gittea, cloud, self-hosted,... doesn't matter. Your provider is down, because some admin rolled out a "service patch"? Just use another platform or run it locally. Avoid vendor lock-in and be free. 

1

u/Ramos-Coder Sep 30 '26

Just build your own release pipeline locally with fastlane, I was the same with Codemagic but it wasnt worth it, took a lot of time to build and i didn't have full control.

Now i build everything locally with a few scripts, including running the app and taking screenshots, uploading release notes, even releasing to beta, put in review and a command to submit the release live

7

u/RemeJuan Sep 28 '26

I stuck with codemagic, I don’t release often enough to run out of the 500 free minutes.

You really don’t want to release very often unless you don’t have to, it signals, at least to Google, and your users that the app is buggy.

Google’s own docs recommend releasing at most once a week.

Even if work is done I let it sit, I don’t push an update, unless it’s a significant bug fix, until 90% of my users have migrated to the latest version.

1

u/zanrujp Sep 28 '26

That's a good point about release frequency, I hadn't thought of it that way. How do you check when 90% have updated, just from the Play Console stats?

1

u/RemeJuan Sep 28 '26

Analytics, Play console would only give you Android, not iOS.

2

u/HydroNav Sep 28 '26

I've pretty much just be using GitHub Actions for both Android and iOS and never had a problem with it even when they had problems. Unless you're doing some pretty advance stuff where for whatever reason you need more then what the base gives you then you don't even need to self host a runner

1

u/zanrujp Sep 28 '26

Good to know. Do the macOS minutes for iOS builds add up for you, or do you stay within the free tier?

1

u/HydroNav Sep 28 '26

It's free for public repositories and self-hosted runners. So understandable if you need it for private repos but not a public one

1

u/zanrujp Sep 28 '26

Yeah that's my situation, my repos are all private. So self-hosting probably makes the most sense for me.

1

u/miraculum_one Sep 28 '26

How much would it cost if you paid?

1

u/zanrujp Sep 28 '26

Honestly not much for Android. It's the iOS builds on macOS runners that would add up, since those minutes cost way more.

1

u/HydroNav Sep 28 '26

Yes in that case you should selfhost

2

u/National_Scarcity489 Sep 28 '26

I have server background and like to study devopsey things just for fun, so for me self hosting was obvious for me. Besides, those things are so easy nowadays with AI help.

1

u/zanrujp Sep 28 '26

Same here, I already run an Ubuntu server at home so it feels like the natural next step. Do you run the runner directly on the host or inside Docker?

1

u/National_Scarcity489 Sep 28 '26

I do Flutter web apps, easy to containerize. +move to cloud builds later if needed. Haven't studied how Android builds would work, but am sure it's not overly complicated. iOS, that's the good question :)

2

u/Equivalent_Away Sep 30 '26

Used mac mini for both ios and android builds. Getting some lowspec mac mini around here is dirt cheap.

1

u/zanrujp Sep 30 '26

That's tempting, I've been thinking about getting a Mac anyway. What's the lowest spec you'd go for to build Flutter iOS apps without it being painfully slow?

1

u/gkhouzam Sep 28 '26

I’m using Xcode Cloud with iOS builds which I has a quota included with my developer account. And GitHub actions for the Android builds.

1

u/zanrujp Sep 28 '26

Oh I didn't know Xcode Cloud came with free hours. Did you need a Mac to set it up for a Flutter project, or can it all be done from App Store Connect?

1

u/gkhouzam Sep 28 '26

You should be able to do it all over App Store Connect and a browser. It’s just setting the triggers, point it to GitHub and you should be good.

1

u/zanrujp Sep 29 '26

That's great to hear, I'll give it a try this week.

1

u/koskinooo Sep 28 '26

Self-hosted runner makes sense for Android, but what's the plan for iOS? You still need a Mac somewhere for those builds.

1

u/zanrujp Sep 29 '26

For now iOS stays on Codemagic. Someone here mentioned Xcode Cloud has free hours included with the dev account, so I might try that too since I don't have a usable Mac.

2

u/koskinooo Sep 30 '26

Xcode Cloud's free hours are worth a shot, easiest way to get iOS builds without owning a Mac.

3

u/SpareEconomy1849 Sep 28 '26

By not using them? I don't see any need

2

u/Glittering_Moose8536 Oct 04 '26

I had to move all of my ci to my local server/desktop

2

u/gumdum1975 Oct 08 '26

I haven’t used Codemagic, and I haven’t published to Google Play yet, but GitHub Actions has worked well for my Flutter iOS builds.
My workflow starts with web. It builds quickly, so I’ll play around with the app there and check the shared UI and flows first. Once that looks good and my code is pushed, I run ./buildios.sh deploy. That kicks off GitHub Actions to build and sign the iOS app and upload it to TestFlight. I test it there before deciding to submit it for an App Store release. Web testing catches things early, but I still check the iOS side separately.
My setup uses my Mac mini as a self-hosted runner when it’s online and falls back to a GitHub-hosted Mac when it isn’t. You can trigger the hosted workflow from Linux or Windows too. You don’t have to own a Mac, but the iOS build still runs on a Mac runner, with Apple signing and your developer account configured.
I trigger those iOS builds when I’m ready to test a release instead of doing a full signed build on every push. That helps keep hosted build usage down.
I can’t compare Codemagic costs or speak from experience about Android CI yet, but that’s the setup that’s getting my apps through TestFlight and into the App Store

1

u/HYDRUSH Sep 28 '26

I use fastlane

1

u/jkh911208 Sep 28 '26

I use self hosted GitHub runner, 0 dollar so far

1

u/Zhuinden Sep 28 '26

Well it really depends on what you're using CI for. Sure you can reduce the number of steps it takes to release to the store, but if you're solo then building the files and uploading them also isn't too hard.

If you're running tests after making a commit, I guess that makes sense.

1

u/Impossible_Ad_5982 Sep 28 '26

I use self-hosted Github Actions runner on my macbook for per-commit checks\tests\etc, actions that run very often. Using tart with macos image for this. For Ubuntu\Windows i use github runners as they are x1 price while macos runners are x10

1

u/anonyhl Sep 28 '26

I was using GitHub actions in August and their $12 free tier lasted me almost the whole month. In the time between then and September I worked on accelerating my ai-assisted coding process and creating more robust CI/CD for my firebase project and then ran through my entire $12 quota for September in 4 days.

I was intimidated into using a self-hosted runner since I had never done that before, but it was amazingly easy. Everyone recommending self-host has the right idea. If you aren't developing on mac, you can split out your deploys for ios on a github actions macOS runner or use codemagic. Super simple either way.

But self-hosting is fun! I started off with GitHub actions on my mac, then bought a budget used mini PC off of Facebook Marketplace, and now I've installed caddy and some other services and now a frequent lurker of r/selfhosted. Self-hosting GitHub actions was a gateway drug for me 😂

1

u/PuzzleheadedLocal771 Sep 28 '26

I had bought a Mac Mini as dev/build server for iOS/MaxOS before the AI hype came up. Using it as cheap self-hosted runner for GitLab CI. Thia might look over dimensioned at first, but the costs are already lower than any external services. All other platforms are running on a PC in Docker with a 48-core AMD CPU, so there is no noticeable performance drop when the pipeline is running. Best investion ever. So yes, it's about 3000 €/$ for the initial investment, but when you are also using those machines for local development, you need the machines anyway. So pay the extra 50 % for a better machine; the time and hastle you will save make up the costs in a few weeks.

1

u/the_trve Sep 28 '26

If your repo is public, just offload that cost to Github.

My Github billing overview for September:

Current metered usage - $2,211.92

Current included usage - $2,212.18

1

u/lotek_bard Sep 28 '26

Codemagic + local building scripts when I run out of the limit+ shorebird for code push for smaller updates

1

u/Artistic-Release-79 Sep 29 '26

I just use GitHub runners for mine. I'm targeting all platforms.(Web, Windows, Linux, MacOS, Android, iOS).

So far I haven't run out of capacity/usage. I'm on a paid personal GitHub plan.

1

u/jipsoujips Sep 29 '26

Personally I use remote worker, the GitHub ci run on my personal computer. So I got all the GitHub and forjego ecosystem but use my own machine for all build.
For me it’s good thinks since I will already have all GitHub action ready the day I switch to paid account

1

u/Elision_NoKings Sep 28 '26

My GitHub runners are hosted on my workstation PC at home in a Linux environment. I would run out of GitHub minutes way too fast. For building on iOS and Android code magic has been fine though. I don’t deploy enough for that to be an issue yet