@@ -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
4040 steps :
4141
4242 - name : Checkout source
43- uses : actions/checkout@v4
43+ uses : actions/checkout@v5
4444 with :
4545 submodules : recursive
4646 show-progress : false
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
9293 steps :
9394
9495 - name : Checkout source
95- uses : actions/checkout@v4
96+ uses : actions/checkout@v5
9697 with :
9798 submodules : recursive
9899 show-progress : false
@@ -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,23 +126,23 @@ 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
141143 steps :
142144 - name : Checkout source
143- uses : actions/checkout@v4
145+ uses : actions/checkout@v5
144146 with :
145147 submodules : recursive
146148 show-progress : false
@@ -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
@@ -185,7 +189,7 @@ jobs:
185189
186190 steps :
187191 - name : Checkout source
188- uses : actions/checkout@v4
192+ uses : actions/checkout@v5
189193 with :
190194 submodules : recursive
191195 show-progress : false
@@ -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,11 +221,11 @@ 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
221- uses : actions/checkout@v4
228+ uses : actions/checkout@v5
222229 with :
223230 submodules : recursive
224231 show-progress : false
@@ -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