Skip to content

Commit

Permalink
add release optimized args for release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
DolceTriade committed Mar 9, 2024
1 parent 9fd0bd9 commit cd59b55
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .bazel-lib/bazelrc/release.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build:release --@rules_rust//:extra_exec_rustc_flags=-Copt-level=3
build:release --@rules_rust//:extra_exec_rustc_flags=-Cembed-bitcode=yes
build:release --@rules_rust//:extra_exec_rustc_flags=-Clto=thin
build:release --@rules_rust//:extra_exec_rustc_flags=-Zdylib-lto
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import %workspace%/.bazel-lib/bazelrc/performance.bazelrc
import %workspace%/.bazel-lib/bazelrc/nix-toolchains.bazelrc
import %workspace%/.bazel-lib/bazelrc/clippy.bazelrc
import %workspace%/.bazel-lib/bazelrc/osx.bazelrc
import %workspace%/.bazel-lib/bazelrc/release.bazelrc

try-import %workspace%/.bazelenvrc
try-import %workspace%/user.bazelrc
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
- uses: HatsuneMiku3939/direnv-action@v1
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- run: bazel run -c opt --embed_label="$(git describe --tags HEAD)" //blade:blade_push
- run: bazel run --config=release -c opt --embed_label="$(git describe --tags HEAD)" //blade:blade_push

0 comments on commit cd59b55

Please sign in to comment.