Linux question for GitHub Actions
Cyberbeni opened this issue · 4 comments
I'm creating a GitHub Action to build/cache swift based tools. Is it safe to use swift --version
to decide if I need rebuilding or does using libsourcekitdInProc.so
set additional requirements for when I need a new build as opposed to restoring the previous one.
Thanks, I fixed the typo.
I did some testing before I opened this ticket by caching on ubuntu-18.04 and loading from cache on ubuntu-20.04 and it seemed to work but when I did the regular tests for the PR then ubuntu-20.04 managed to save it to the cache and after that it failed on ubuntu-18.04 with the following error: swiftlint: /lib/x86_64-linux-gnu/libm.so.6: version
GLIBC_2.29' not found (required by swiftlint)`
swift --version
is the same on both systems:
Swift version 5.3.1 (swift-5.3.1-RELEASE)
Target: x86_64-unknown-linux-gnu
I think I also need to add this flag: realm/SwiftLint#3434
Ah, I didn't understand what you were changing when you asked what would be sufficient to require a rebuild. Yes the binary produced by one OS might not be compatible with a different OS.
I guess I'll just wait for this to get done, using uname -v
and swift --version
together seems to work fine for now and they are not changing that often.