6060 features : " async,macos_26_0"
6161 runs-on : ${{ matrix.os }}
6262 name : Build - ${{ matrix.name }}
63+ needs : [lint]
6364 steps :
6465 - uses : actions/checkout@v4
6566 - name : Setup Rust
8485 run : cargo test --verbose --features "${{ matrix.features }}"
8586
8687 # ==========================================================================
87- # Memory Leak Check
88+ # Memory Leak Check (runs parallel to build)
8889 # ==========================================================================
8990 leak-check :
9091 runs-on : macos-14
@@ -110,43 +111,11 @@ jobs:
110111 run : cargo run --example 15_memory_leak_check --features "async,macos_14_4"
111112
112113 # ==========================================================================
113- # Documentation (only on main)
114- # ==========================================================================
115- docs :
116- runs-on : macos-latest
117- needs : [lint, build, leak-check]
118- if : github.ref == 'refs/heads/main' && github.event_name == 'push'
119- permissions :
120- contents : read
121- pages : write
122- id-token : write
123- environment :
124- name : github-pages
125- url : ${{ steps.deployment.outputs.page_url }}
126- steps :
127- - uses : actions/checkout@v4
128- - name : Setup Rust
129- uses : dtolnay/rust-toolchain@stable
130- - name : Build documentation
131- run : cargo doc --no-deps --all-features
132- - name : Add redirect
133- run : echo '<meta http-equiv="refresh" content="0; url=screencapturekit/index.html">' > target/doc/index.html
134- - name : Setup Pages
135- uses : actions/configure-pages@v4
136- - name : Upload artifact
137- uses : actions/upload-pages-artifact@v3
138- with :
139- path : target/doc
140- - name : Deploy to GitHub Pages
141- id : deployment
142- uses : actions/deploy-pages@v4
143-
144- # ==========================================================================
145- # Release (only on main, after successful build)
114+ # Release (only on main, after successful build and leak-check)
146115 # ==========================================================================
147116 release-pr :
148117 runs-on : macos-latest
149- needs : [lint, build]
118+ needs : [lint, build, leak-check ]
150119 if : github.ref == 'refs/heads/main' && github.event_name == 'push'
151120 environment : release
152121 concurrency :
@@ -171,7 +140,7 @@ jobs:
171140
172141 release :
173142 runs-on : macos-latest
174- needs : [lint, build]
143+ needs : [lint, build, leak-check ]
175144 if : github.ref == 'refs/heads/main' && github.event_name == 'push'
176145 environment : release
177146 permissions :
0 commit comments