#Is there any reason why Tauri recompiles only these packages in ci when caching is working?

26 messages · Page 1 of 1 (latest)

dim kayak
#

I am using rust-cache in github actions and it works fine, only these packages are recompiled and I wonder why?

Updating crates.io index
 Compiling vcpkg v0.2.15
 Compiling openssl v0.10.64
 Compiling openssl-macros v0.1.1
 Compiling native-tls v0.2.12
 Compiling openssl-probe v0.1.5
 Compiling rustls-pki-types v1.7.0
 Compiling ck3oop-ui-rs v0.0.4 (/home/runner/work/ck3oop/ck3oop/ck3oop-ui/src-tauri)
 Compiling openssl-sys v0.9.102
 Compiling rustls-pemfile v2.1.2
 Compiling ck3oop-core-rs v0.1.2 (/home/runner/work/ck3oop/ck3oop/ck3oop-core-rs)
 Compiling tokio-native-tls v0.3.1
 Compiling hyper-tls v0.6.0
 Compiling reqwest v0.12.5
 Compiling tauri v2.0.0-beta.22
 Compiling tauri-plugin-shell v2.0.0-beta.7
Finished `release` profile [optimized] target(s) in 41.01s
blazing geode
#

In my experience the cache degrades over time and doesn't seem to be able to update itself. The problem is that if an inner crate has a new semver compatible update, all crates that depend on it will get rebuilt too.

dim kayak
blazing geode
#

I mean, it really looks like it since all crates are ssl/tls related and the first (second) one is openssl

dim kayak
#

Yea but I tried multiple builds - like a lot - in quick successions like 5 minutes after another so here it is.
Ill check

stiff fable
dim kayak
loud cosmos
# dim kayak Thanks , already running, I wonder why there's https://github.com/marketplace/ac...

Not entirely sure honestly, think it's mostly related to the official cache action having had pretty weird documentation in the past, and some people seem to think it's confusing to use, but honestly I couldn't imagine a better solution than what they have right now, just specifying which paths are part of the cache, which key to use, hash file patterns to create a key, you just add it once in your workflow and the upload action is added automagically, it really is the best thing ever. The only thing I'd consider using something else for I guess is if it's some composite action that wraps the cache action so it can take care of all these common path patterns for you

If you want even more performance btw, https://github.com/marketplace/actions/sccache-action made by Mozilla, uses https://github.com/mozilla/sccache, can be configured to get even more caching done

dim kayak
#

Yea exactly what I think it just looks amazing and it's very fast - also it doesn't recompile anymore so it's a fix for this issue.
Now I must check if I can cache all Linux prerequisities for Tauri (apt packages) - valid for 24h for example.
(but I don't think it's a good idea - proper way would be to have own runner image I suposse)

Trying sccache but I wonder if that will help with just basic Tauri app

loud cosmos
#

With mold I recompile apps in roughly 4 seconds, versus using the default that builds in like 10-12 seconds

dim kayak
#

Moment I migrated to sccache these packages start to recompile:

✓ built in 134ms
   Compiling vswhom-sys v0.1.2
   Compiling vswhom v0.1.0
   Compiling embed-resource v2.4.2
   Compiling tauri-winres v0.1.1
   Compiling tauri-build v2.0.0-beta.17
   Compiling tauri v2.0.0-beta.22
   Compiling tauri-app-rs v0.0.0 (D:\a\tauri-e2e\tauri-e2e\tauri-app\src-tauri)
   Compiling tauri-plugin-shell v2.0.0-beta.7
loud cosmos
dim kayak
#

Yea I know - its second time, rerunning third now

#

Interesting that on Linux it doesn't cache anything, while on Windows it does.

#

Nah Ill skip this, app is so small that there are only gonna be problems with sscache^^

loud cosmos
#

If you haven't disabled incremental compilation that might be why. But yea, sccache tends to be overkill, it doesn't do that big a difference if you're already using actions/cache, its primary function is to give you a networked cache so you could e.g. host an S3 bucket on AWS that you and your team connects to in order to collaboratively maintain a cache, so it'd make the most difference on the first compilation, if set up correctly

dim kayak
#

Trying again clearing old caches and using CARGO_INCREMENTAL=0

#

When used alongside actions/cache all it does is hit 5 compile requests on Linux.

#

Around 2:23 for basic tauri app on linux with quick e2e (only actions/cache) is enough I think

#

What would really speed this up is not caching but faster github runner^^

dim kayak
#

How can I mark this as solved?

loud cosmos
#

Or this command should work, /thread solve