Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Use sccache to speed up builds #522

Merged
merged 1 commit into from
Apr 25, 2018
Merged

Use sccache to speed up builds #522

merged 1 commit into from
Apr 25, 2018

Conversation

jkleinsc
Copy link
Member

@jkleinsc jkleinsc commented Apr 17, 2018

This PR updates our CI to use sccache in order to speed up builds.
cc #516

@electron-bot
Copy link

✅ libchromiumcontent-mas-shared succeeded for 24bedba. Details

@electron-bot
Copy link

✅ libchromiumcontent-osx-shared succeeded for 24bedba. Details

@electron-bot
Copy link

✅ libchromiumcontent-osx-static succeeded for 1f6e1d2. Details

@electron-bot
Copy link

✅ libchromiumcontent-osx-shared succeeded for 1f6e1d2. Details

@electron-bot
Copy link

✅ libchromiumcontent-mas-shared succeeded for 1f6e1d2. Details

@electron-bot
Copy link

✅ libchromiumcontent-mas-static succeeded for 1f6e1d2. Details

@jkleinsc
Copy link
Member Author

It appears that our current S3 configuration isn't working due to this issue:
mozilla/sccache#225

Here is an example build where it missed 100% of a warmed cache:
https://circleci.com/gh/electron/libchromiumcontent/6146

@MarshallOfSound
Copy link
Member

@jkleinsc There is a way around this, pinging you in Slack 👍

command: script/update --clean -t $TARGET_ARCH --use-bundled-sccache
- run:
name: Check sccache stats before build
command: tools/sccache/0.2.6/linux/sccache -s
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can add a wrapper script to run bundled sccache? Like script/sccache that would run bundled sccache for current platform?
These absolute paths with versions and platforms in them look difficult to maintain.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexeykuzmin that's not a bad idea, though I added these calls just to see if sccache was actually doing anything and wasn't planning on leaving them in.

@electron-bot
Copy link

✅ libchromiumcontent-mas-shared succeeded for 402c0f0. Details

@electron-bot
Copy link

✅ libchromiumcontent-osx-shared succeeded for 402c0f0. Details

@electron-bot
Copy link

✅ libchromiumcontent-mas-static succeeded for 402c0f0. Details

@electron-bot
Copy link

✅ libchromiumcontent-osx-static succeeded for 402c0f0. Details

@electron-bot
Copy link

✅ libchromiumcontent-osx-shared succeeded for 6d25ac0. Details

@electron-bot
Copy link

✅ libchromiumcontent-mas-shared succeeded for 6d25ac0. Details

@electron-bot
Copy link

✅ libchromiumcontent-mas-static succeeded for 6d25ac0. Details

@electron-bot
Copy link

✅ libchromiumcontent-osx-static succeeded for 6d25ac0. Details

@electron-bot
Copy link

✅ libchromiumcontent-mas-shared succeeded for 3b985a8. Details

@electron-bot
Copy link

✅ libchromiumcontent-osx-shared succeeded for 3b985a8. Details

@electron-bot
Copy link

✅ libchromiumcontent-osx-static succeeded for 3b985a8. Details

@electron-bot
Copy link

✅ libchromiumcontent-mas-static succeeded for 3b985a8. Details

@electron-bot
Copy link

✅ libchromiumcontent-mas-shared succeeded for 65be064. Details

@electron-bot
Copy link

✅ libchromiumcontent-osx-shared succeeded for 65be064. Details

@electron-bot
Copy link

✅ libchromiumcontent-mas-static succeeded for 65be064. Details

@electron-bot
Copy link

✅ libchromiumcontent-osx-static succeeded for 65be064. Details

@electron-bot
Copy link

✅ libchromiumcontent-osx-shared succeeded for 98b847d. Details

@electron-bot
Copy link

✅ libchromiumcontent-osx-static succeeded for 98b847d. Details

@jkleinsc
Copy link
Member Author

@alexeykuzmin good point. I’ll make the change.

@electron-bot
Copy link

✅ libchromiumcontent-osx-shared succeeded for b01b51d. Details

@electron-bot
Copy link

✅ libchromiumcontent-mas-shared succeeded for b01b51d. Details

@electron-bot
Copy link

✅ libchromiumcontent-mas-static succeeded for b01b51d. Details

@alexeykuzmin
Copy link
Contributor

Git shows the linux version of sccache as simply renamed:
tools/sccache/0.2.6/linux/sccache → tools/sccache/aad2120/linux/sccache.

Is it true? )

@electron-bot
Copy link

✅ libchromiumcontent-osx-static succeeded for b01b51d. Details

@jkleinsc
Copy link
Member Author

@alexeykuzmin

Git shows the linux version of sccache as simply renamed:
tools/sccache/0.2.6/linux/sccache → tools/sccache/aad2120/linux/sccache.

Is it true? )

No, because if you look at the linux build result here, its using the Azure storage which wasn't available in 0.2.6: https://circleci.com/gh/electron/libchromiumcontent/6413

@alexeykuzmin
Copy link
Contributor

alexeykuzmin commented Apr 24, 2018

@jkleinsc Shall we merge it? )

@electron-bot
Copy link

✅ libchromiumcontent-mas-shared succeeded for 7fb4ecd. Details

@electron-bot
Copy link

✅ libchromiumcontent-osx-shared succeeded for 7fb4ecd. Details

@electron-bot
Copy link

✅ libchromiumcontent-osx-static succeeded for 7fb4ecd. Details

@electron-bot
Copy link

✅ libchromiumcontent-mas-static succeeded for 7fb4ecd. Details

@@ -50,7 +56,7 @@ jobs:
command: script/bootstrap
- run:
name: Update
command: script/update --clean -t $TARGET_ARCH
command: script/update --clean -t $TARGET_ARCH --use-bundled-sccache
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somehow missed it.
I thought we agreed on not using cache for Release builds.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexeykuzmin why would we not use cache for Release builds???

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean it doesn't really gain us much if we only use this for shared builds. We still end up having to wait for the static builds. Given that we are using a cache that only the CI has write access to, I'm not sure why we wouldn't use it for Release builds.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jkleinsc For maximum safety, release builds should be generated in a 100% deterministic and isolated way. Generating them without cache is what everyone was 👍 on from memory

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright then, I changed it to just run for shared builds.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jkleinsc
I would personally vote for using cache everywhere.
But some people are concerned about potential security issues more than I am )

Anyway, I hope that some day we will build Release builds only when we are actually releasing something.

@jkleinsc jkleinsc changed the title Use sccache with s3 to speed up builds Use sccache to speed up builds Apr 25, 2018
@electron-bot
Copy link

❌ libchromiumcontent-osx-static failed for a9f55cd. Details

@electron-bot
Copy link

❌ libchromiumcontent-osx-shared failed for a9f55cd. Details

@electron-bot
Copy link

❌ libchromiumcontent-mas-static failed for a9f55cd. Details

@electron-bot
Copy link

❌ libchromiumcontent-mas-shared failed for a9f55cd. Details

New binaries with Azure support

Only use sccache for shared(debug) builds
@electron-bot
Copy link

✅ libchromiumcontent-osx-shared succeeded for 9051851. Details

@electron-bot
Copy link

✅ libchromiumcontent-mas-shared succeeded for 9051851. Details

@electron-bot
Copy link

✅ libchromiumcontent-mas-static succeeded for 9051851. Details

@electron-bot
Copy link

✅ libchromiumcontent-osx-static succeeded for 9051851. Details

@jkleinsc jkleinsc merged commit 789d7be into master Apr 25, 2018
@jkleinsc jkleinsc deleted the use-sccache branch April 25, 2018 17:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants