mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-06-30 12:33:31 +00:00
Faster debug builds (#2483)
* Config dev profile for faster debug builds * Remove redundant changes to Cargo.toml in CI * Forgot Windows --------- Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
This commit is contained in:
parent
518d5836f6
commit
f4a79a2fcd
21
.github/actions/setup-rust/action.yaml
vendored
21
.github/actions/setup-rust/action.yaml
vendored
|
@ -34,27 +34,6 @@ runs:
|
|||
shell: bash
|
||||
run: echo '{}' | npx -y mustache - .cargo/config.toml.mustache .cargo/config.toml
|
||||
|
||||
- name: Turn Off Debuginfo and bump opt-level
|
||||
shell: bash
|
||||
if: ${{ runner.os != 'Windows' }}
|
||||
run: |
|
||||
sed '/\[profile.dev]/a\
|
||||
debug = 0
|
||||
' Cargo.toml > Cargo.toml.tmp && mv Cargo.toml.tmp Cargo.toml
|
||||
|
||||
sed '/\[profile.dev]/a\
|
||||
opt-level=1
|
||||
' Cargo.toml > Cargo.toml.tmp && mv Cargo.toml.tmp Cargo.toml
|
||||
|
||||
- name: Turn Off Debuginfo and bump opt-level
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
shell: powershell
|
||||
run: |
|
||||
(Get-Content Cargo.toml) -replace '\[profile.dev\]', '[profile.dev]
|
||||
debug = 0' | Set-Content Cargo.toml
|
||||
(Get-Content Cargo.toml) -replace '\[profile.dev\]', '[profile.dev]
|
||||
opt-level=1' | Set-Content Cargo.toml
|
||||
|
||||
- name: Restore cached Prisma codegen
|
||||
id: cache-prisma-restore
|
||||
uses: actions/cache/restore@v4
|
||||
|
|
|
@ -108,6 +108,12 @@ pdfium-render = { git = "https://github.com/fogodev/pdfium-render.git", rev = "e
|
|||
[profile.dev]
|
||||
# Make compilation faster on macOS
|
||||
split-debuginfo = "unpacked"
|
||||
opt-level = 0
|
||||
debug = 0
|
||||
strip = "none"
|
||||
lto = false
|
||||
codegen-units = 256
|
||||
incremental = true
|
||||
|
||||
# Set the settings for build scripts and proc-macros.
|
||||
[profile.dev.build-override]
|
||||
|
|
Loading…
Reference in a new issue