Skip to content

Commit 2264980

Browse files
committed
Update GitHub workflows
1 parent e811206 commit 2264980

File tree

5 files changed

+36
-28
lines changed

5 files changed

+36
-28
lines changed

.github/workflows/publish-javascript.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
name: Publish
2020
runs-on: ubuntu-latest
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:
@@ -29,7 +29,7 @@ jobs:
2929

3030
steps:
3131
- name: Checkout source
32-
uses: actions/checkout@v4
32+
uses: actions/checkout@v5
3333
with:
3434
submodules: recursive
3535
show-progress: false
@@ -65,7 +65,7 @@ jobs:
6565
id: publish-dry-run
6666
env:
6767
NPM_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
68-
if: github.ref == 'refs/heads/main' && github.repository_owner == 'Systemcluster' && env.NPM_TOKEN == ''
68+
if: env.NPM_TOKEN == ''
6969
run: |
7070
cd packages/javascript
7171
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
@@ -75,7 +75,7 @@ jobs:
7575
id: publish
7676
env:
7777
NPM_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
78-
if: github.ref == 'refs/heads/main' && github.repository_owner == 'Systemcluster' && env.NPM_TOKEN != ''
78+
if: env.NPM_TOKEN != ''
7979
run: |
8080
cd packages/javascript
8181
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc

.github/workflows/publish-python.yml

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -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
@@ -40,7 +40,7 @@ jobs:
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
@@ -54,6 +54,7 @@ jobs:
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
@@ -92,7 +93,7 @@ jobs:
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:

.github/workflows/publish.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
name: Publish
2020
runs-on: ${{ matrix.os }}
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
outputs:
2424
tag: ${{ steps.publish.outputs.tag }}
@@ -33,7 +33,7 @@ jobs:
3333

3434
steps:
3535
- name: Checkout source
36-
uses: actions/checkout@v4
36+
uses: actions/checkout@v5
3737
with:
3838
submodules: recursive
3939
show-progress: false
@@ -47,7 +47,6 @@ jobs:
4747
- name: Publish crates
4848
uses: Systemcluster/actions@release-crates-v0
4949
id: publish
50-
if: github.ref == 'refs/heads/main' && github.repository_owner == 'Systemcluster'
5150
with:
5251
crates-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
5352
dry-run: ${{ !secrets.CARGO_REGISTRY_TOKEN }}

.github/workflows/tests.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
steps:
4040
- name: Checkout source
41-
uses: actions/checkout@v4
41+
uses: actions/checkout@v5
4242
with:
4343
submodules: recursive
4444
show-progress: false
@@ -98,7 +98,7 @@ jobs:
9898

9999
steps:
100100
- name: Checkout source
101-
uses: actions/checkout@v4
101+
uses: actions/checkout@v5
102102
with:
103103
submodules: recursive
104104
show-progress: false
@@ -153,7 +153,7 @@ jobs:
153153

154154
steps:
155155
- name: Checkout source
156-
uses: actions/checkout@v4
156+
uses: actions/checkout@v5
157157
with:
158158
submodules: recursive
159159
show-progress: false
@@ -177,6 +177,8 @@ jobs:
177177
cargo clippy
178178
179179
- name: Build
180+
env:
181+
CFLAGS: -Wno-error=date-time
180182
run: |
181183
cd packages/python
182184
mv ../../README.md .
@@ -205,7 +207,7 @@ jobs:
205207

206208
steps:
207209
- name: Checkout source
208-
uses: actions/checkout@v4
210+
uses: actions/checkout@v5
209211
with:
210212
submodules: recursive
211213
show-progress: false

packages/javascript/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@
5858
"build:bundler": "wasm-pack build --release --no-pack --target bundler --out-dir dist --out-name index --features std,convert,inspect -Zbuild-std=panic_abort,core,alloc,std",
5959
"build:minimal": "wasm-pack build --release --no-pack --target bundler --out-dir dist --out-name minimal --features std,default -Zbuild-std=panic_abort,core,alloc,std",
6060
"build:full": "wasm-pack build --release --no-pack --target bundler --out-dir dist --out-name full --features std,convert,split,regex-perf,inspect -Zbuild-std=panic_abort,core,alloc,std",
61-
"build": "cross-env RUSTC_BOOTSTRAP=1 RUSTFLAGS=\"-Ctarget-cpu=mvp -Ctarget-feature=+crt-static,+sign-ext,+bulk-memory,+nontrapping-fptoint,+multivalue,+reference-types -Zwasm-c-abi=spec\" concurrently -m 1 'npm:build:node' 'npm:build:web' 'npm:build:bundler' 'npm:build:minimal' 'npm:build:full'",
62-
"prepare": "cross-env RUSTC_BOOTSTRAP=1 RUSTFLAGS=\"-Ctarget-cpu=mvp -Ctarget-feature=+crt-static,+sign-ext,+bulk-memory,+nontrapping-fptoint,+multivalue,+reference-types -Zwasm-c-abi=spec\" concurrently -m 1 'npm:build:node' 'npm:build:web' 'npm:build:bundler' 'npm:build:minimal' 'npm:build:full'"
61+
"build": "cross-env RUSTC_BOOTSTRAP=1 RUSTFLAGS=\"-Ctarget-cpu=mvp -Ctarget-feature=+crt-static,+sign-ext,+bulk-memory,+nontrapping-fptoint,+multivalue,+reference-types -Clto -Zwasm-c-abi=spec -Zvirtual-function-elimination -Zlocation-detail=none\" concurrently -m 1 'npm:build:node' 'npm:build:web' 'npm:build:bundler' 'npm:build:minimal' 'npm:build:full'",
62+
"prepare": "cross-env RUSTC_BOOTSTRAP=1 RUSTFLAGS=\"-Ctarget-cpu=mvp -Ctarget-feature=+crt-static,+sign-ext,+bulk-memory,+nontrapping-fptoint,+multivalue,+reference-types -Clto -Zwasm-c-abi=spec -Zvirtual-function-elimination -Zlocation-detail=none\" concurrently -m 1 'npm:build:node' 'npm:build:web' 'npm:build:bundler' 'npm:build:minimal' 'npm:build:full'"
6363
},
6464
"devDependencies": {
6565
"concurrently": "^9.1.0",

0 commit comments

Comments
 (0)