Skip to content

Commit c409172

Browse files
committed
Enable fat LTO in release build
Closes #158
1 parent 5e2ede8 commit c409172

File tree

2 files changed

+39
-28
lines changed

2 files changed

+39
-28
lines changed

.github/workflows/Release.yml

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@ name: Release
22

33
on:
44
push:
5-
branches: [ main ]
6-
tags: [ 'v*' ]
5+
branches: [main]
6+
tags: ["v*"]
77
pull_request:
88

9+
env:
10+
CARGO_PROFILE_RELEASE_LTO: "true"
11+
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: "1"
12+
913
jobs:
1014
macos:
1115
runs-on: macos-latest
@@ -18,7 +22,7 @@ jobs:
1822
uses: PyO3/maturin-action@v1
1923
with:
2024
args: --release --out dist --universal2
21-
sccache: 'true'
25+
sccache: "true"
2226
- name: Upload wheels
2327
uses: actions/upload-artifact@v4
2428
with:
@@ -70,7 +74,7 @@ jobs:
7074
with:
7175
target: ${{ matrix.platform.target }}
7276
args: --release --out dist
73-
sccache: 'true'
77+
sccache: "true"
7478
- name: Upload wheels
7579
uses: actions/upload-artifact@v4
7680
with:
@@ -107,17 +111,24 @@ jobs:
107111
runs-on: ubuntu-latest
108112
strategy:
109113
matrix:
110-
platform: [
111-
{ target: "x86_64-unknown-linux-musl", image_tag: "x86_64-musl" },
112-
{ target: "i686-unknown-linux-musl", image_tag: "i686-musl" },
113-
{ target: "aarch64-unknown-linux-musl", image_tag: "aarch64-musl" },
114-
{ target: "armv7-unknown-linux-musleabihf", image_tag: "armv7-musleabihf" },
115-
{ target: "armv7-unknown-linux-musleabi", image_tag: "armv7-musleabi" },
116-
]
114+
platform:
115+
[
116+
{ target: "x86_64-unknown-linux-musl", image_tag: "x86_64-musl" },
117+
{ target: "i686-unknown-linux-musl", image_tag: "i686-musl" },
118+
{ target: "aarch64-unknown-linux-musl", image_tag: "aarch64-musl" },
119+
{
120+
target: "armv7-unknown-linux-musleabihf",
121+
image_tag: "armv7-musleabihf",
122+
},
123+
{
124+
target: "armv7-unknown-linux-musleabi",
125+
image_tag: "armv7-musleabi",
126+
},
127+
]
117128
container:
118129
image: docker://ghcr.io/rust-cross/rust-musl-cross:${{ matrix.platform.image_tag }}
119130
env:
120-
CFLAGS_armv7_unknown_linux_musleabihf: '-mfpu=vfpv3-d16'
131+
CFLAGS_armv7_unknown_linux_musleabihf: "-mfpu=vfpv3-d16"
121132
steps:
122133
- uses: actions/checkout@v4
123134
- name: Build
@@ -127,7 +138,7 @@ jobs:
127138
manylinux: auto
128139
container: off
129140
args: --release -o dist
130-
sccache: 'true'
141+
sccache: "true"
131142
- name: Upload wheels
132143
uses: actions/upload-artifact@v4
133144
with:
@@ -222,7 +233,7 @@ jobs:
222233
name: Release
223234
runs-on: ubuntu-latest
224235
if: "startsWith(github.ref, 'refs/tags/')"
225-
needs: [ macos, windows, linux ]
236+
needs: [macos, windows, linux]
226237
steps:
227238
- uses: actions/download-artifact@v4
228239
with:

Cargo.lock

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)