@@ -18,14 +18,14 @@ jobs:
1818
1919 name : Build Linux (GNU)
2020 runs-on : ${{ matrix.platform.runner }}
21- if : ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
21+ if : ${{ github.event_name != 'workflow_run' || ( github.event.workflow_run.conclusion == 'success' && github.ref == 'refs/heads/main' && github.repository_owner == 'Systemcluster') }}
2222
2323 strategy :
2424 matrix :
2525 platform :
2626 - runner : ubuntu-latest
2727 target : x86_64
28- rustflags : -Ctarget-cpu=x86-64-v2
28+ rustflags : -Ctarget-cpu=x86-64-v2 -Clto -Zvirtual-function-elimination -Zlocation-detail=none
2929 - runner : ubuntu-latest
3030 target : x86
3131 - runner : ubuntu-latest
5454 uses : PyO3/maturin-action@v1
5555 env :
5656 RUSTFLAGS : ${{ matrix.platform.rustflags }}
57+ CFLAGS : -Wno-error=date-time
5758 with :
5859 target : ${{ matrix.platform.target }}
5960 rust-toolchain : ${{ matrix.toolchain }}
@@ -72,14 +73,14 @@ jobs:
7273
7374 name : Build Linux (musl)
7475 runs-on : ${{ matrix.platform.runner }}
75- if : ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
76+ if : ${{ github.event_name != 'workflow_run' || ( github.event.workflow_run.conclusion == 'success' && github.ref == 'refs/heads/main' && github.repository_owner == 'Systemcluster') }}
7677
7778 strategy :
7879 matrix :
7980 platform :
8081 - runner : ubuntu-latest
8182 target : x86_64
82- rustflags : -Ctarget-cpu=x86-64-v2
83+ rustflags : -Ctarget-cpu=x86-64-v2 -Clto -Zvirtual-function-elimination -Zlocation-detail=none
8384 - runner : ubuntu-latest
8485 target : x86
8586 - runner : ubuntu-latest
@@ -106,6 +107,7 @@ jobs:
106107 uses : PyO3/maturin-action@v1
107108 env :
108109 RUSTFLAGS : ${{ matrix.platform.rustflags }}
110+ CFLAGS : -Wno-error=date-time
109111 with :
110112 target : ${{ matrix.platform.target }}
111113 rust-toolchain : ${{ matrix.toolchain }}
@@ -124,17 +126,17 @@ jobs:
124126
125127 name : Build Windows
126128 runs-on : ${{ matrix.platform.runner }}
127- if : ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
129+ if : ${{ github.event_name != 'workflow_run' || ( github.event.workflow_run.conclusion == 'success' && github.ref == 'refs/heads/main' && github.repository_owner == 'Systemcluster') }}
128130
129131 strategy :
130132 matrix :
131133 platform :
132134 - runner : windows-latest
133135 target : x64
134- rustflags : -Ctarget-cpu=x86-64-v2 -Ctarget-feature=+crt-static
136+ rustflags : -Ctarget-cpu=x86-64-v2 -Ctarget-feature=+crt-static -Clto -Zvirtual-function-elimination -Zlocation-detail=none
135137 - runner : windows-latest
136138 target : x86
137- rustflags : -Ctarget-feature=+crt-static
139+ rustflags : -Ctarget-feature=+crt-static -Clto -Zvirtual-function-elimination -Zlocation-detail=none
138140 toolchain :
139141 - stable
140142
@@ -153,6 +155,8 @@ jobs:
153155
154156 - name : Build wheels
155157 uses : PyO3/maturin-action@v1
158+ env :
159+ CFLAGS : -Wno-error=date-time
156160 with :
157161 target : ${{ matrix.platform.target }}
158162 rust-toolchain : ${{ matrix.toolchain }}
@@ -170,7 +174,7 @@ jobs:
170174
171175 name : Build macOS
172176 runs-on : ${{ matrix.platform.runner }}
173- if : ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
177+ if : ${{ github.event_name != 'workflow_run' || ( github.event.workflow_run.conclusion == 'success' && github.ref == 'refs/heads/main' && github.repository_owner == 'Systemcluster') }}
174178
175179 strategy :
176180
@@ -197,6 +201,9 @@ jobs:
197201
198202 - name : Build wheels
199203 uses : PyO3/maturin-action@v1
204+ env :
205+ CFLAGS : -Wno-error=date-time
206+ MACOSX_DEPLOYMENT_TARGET : 13.7
200207 with :
201208 target : ${{ matrix.platform.target }}
202209 rust-toolchain : ${{ matrix.toolchain }}
@@ -214,7 +221,7 @@ jobs:
214221
215222 name : Build sdist
216223 runs-on : ubuntu-latest
217- if : ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
224+ if : ${{ github.event_name != 'workflow_run' || ( github.event.workflow_run.conclusion == 'success' && github.ref == 'refs/heads/main' && github.repository_owner == 'Systemcluster') }}
218225
219226 steps :
220227 - name : Checkout source
@@ -240,7 +247,7 @@ jobs:
240247
241248 name : Publish
242249 runs-on : ubuntu-latest
243- if : ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
250+ if : ${{ github.event_name != 'workflow_run' || ( github.event.workflow_run.conclusion == 'success' && github.ref == 'refs/heads/main' && github.repository_owner == 'Systemcluster') }}
244251 needs : [linux-gnu, linux-musl, windows, macos, sdist]
245252
246253 steps :
0 commit comments