Skip to content

Commit

Permalink
ci: add lto and strip to weekly build (GreptimeTeam#841)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunng87 authored Jan 6, 2023
1 parent 627d444 commit 5b675f5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
run: protoc --version ; cargo version ; rustc --version ; gcc --version ; g++ --version

- name: Run cargo build
run: cargo build ${{ matrix.opts }} --release --locked --target ${{ matrix.arch }}
run: cargo build ${{ matrix.opts }} --profile weekly --locked --target ${{ matrix.arch }}

- name: Calculate checksum and rename binary
shell: bash
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ repos:
- id: conventional-pre-commit
stages: [commit-msg]

- repo: https://github.com/DevinR528/cargo-sort
rev: e6a795bc6b2c0958f9ef52af4863bbd7cc17238f
hooks:
- id: cargo-sort
args: ["--workspace"]
# - repo: https://github.com/DevinR528/cargo-sort
# rev: e6a795bc6b2c0958f9ef52af4863bbd7cc17238f
# hooks:
# - id: cargo-sort
# args: ["--workspace"]

- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
Expand Down
7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,10 @@ tonic = "0.8"

[profile.release]
debug = true

[profile.weekly]
inherits = "release"
strip = true
lto = true
debug = false
incremental = false

0 comments on commit 5b675f5

Please sign in to comment.