@@ -28,11 +28,13 @@ jobs:
2828 os : ubuntu-latest
2929 archive : tar.gz
3030 cpu_version : x86-64-v3
31+ suffix : modern
3132 rustflags : " -C target-cpu=x86-64-v3"
3233 - target : x86_64-unknown-linux-gnu
3334 os : ubuntu-latest
3435 archive : tar.gz
3536 cpu_version : x86-64-v4
37+ suffix : avx512
3638 rustflags : " -C target-cpu=x86-64-v4"
3739
3840 # --- Linux ARM ---
4749 macos_sign : true
4850 cpu_version : x86-64-v2
4951 rustflags : " -C target-cpu=x86-64-v2"
52+ - target : x86_64-apple-darwin
53+ os : macos-latest
54+ archive : tar.gz
55+ macos_sign : true
56+ cpu_version : x86-64-v3
57+ suffix : modern
58+ rustflags : " -C target-cpu=x86-64-v3"
59+ - target : x86_64-apple-darwin
60+ os : macos-latest
61+ archive : tar.gz
62+ macos_sign : true
63+ cpu_version : x86-64-v4
64+ suffix : avx512
65+ rustflags : " -C target-cpu=x86-64-v4"
5066
5167 # --- macOS ARM ---
5268 - target : aarch64-apple-darwin
@@ -64,11 +80,13 @@ jobs:
6480 os : windows-latest
6581 archive : zip
6682 cpu_version : x86-64-v3
83+ suffix : modern
6784 rustflags : " -C target-cpu=x86-64-v3"
6885 - target : x86_64-pc-windows-msvc
6986 os : windows-latest
7087 archive : zip
7188 cpu_version : x86-64-v4
89+ suffix : avx512
7290 rustflags : " -C target-cpu=x86-64-v4"
7391
7492 # --- Windows ARM ---
99117 env :
100118 RUSTFLAGS : ${{ matrix.rustflags || '' }}
101119 CARGO_PROFILE_RELEASE_OPT_LEVEL : " 3"
102- CARGO_PROFILE_RELEASE_LTO : " fat"
103- CARGO_PROFILE_RELEASE_CODEGEN_UNITS : " 1"
120+ CARGO_PROFILE_RELEASE_LTO : " thin"
104121 run : cargo build --release --target ${{ matrix.target }}
105122
106123 # --- macOS: import certificate and sign the binary ---
@@ -111,19 +128,27 @@ jobs:
111128 APPLE_CERTIFICATE : ${{ secrets.APPLE_CERTIFICATE }}
112129 APPLE_CERTIFICATE_PASSWORD : ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
113130 run : |
131+ # Write the .p12 to disk
114132 echo "$APPLE_CERTIFICATE" | base64 --decode > certificate.p12
133+
134+ # Create a temporary keychain so we don't touch the login keychain
115135 security create-keychain -p actions-keychain phpantom.keychain
116136 security set-keychain-settings -lut 21600 phpantom.keychain
117137 security unlock-keychain -p actions-keychain phpantom.keychain
138+
139+ # Import the certificate + private key
118140 security import certificate.p12 \
119141 -k phpantom.keychain \
120142 -P "$APPLE_CERTIFICATE_PASSWORD" \
121143 -T /usr/bin/codesign
122144 security list-keychain -d user -s phpantom.keychain
145+
146+ # Allow codesign to use the key without a UI prompt
123147 security set-key-partition-list \
124148 -S apple-tool:,apple: \
125149 -k actions-keychain \
126150 phpantom.keychain
151+
127152 rm certificate.p12
128153
129154 - name : Sign binary (macOS)
@@ -146,6 +171,7 @@ jobs:
146171 APPLE_ID_PASSWORD : ${{ secrets.APPLE_ID_PASSWORD }}
147172 APPLE_TEAM_ID : ${{ secrets.APPLE_TEAM_ID }}
148173 run : |
174+ # Zip just for submission — notarytool requires an archive
149175 ditto -c -k --keepParent \
150176 target/${{ matrix.target }}/release/phpantom_lsp \
151177 phpantom_lsp-notarize.zip
@@ -170,24 +196,24 @@ jobs:
170196 run : |
171197 cd target/${{ matrix.target }}/release
172198 # Appends the cpu_version (e.g., -x86-64-v3) to the archive name if it exists
173- SUFFIX="${{ matrix.cpu_version && format('-{0}', matrix.cpu_version ) || '' }}"
199+ SUFFIX="${{ matrix.suffix && format('-{0}', matrix.suffix ) || '' }}"
174200 tar czf ../../../phpantom_lsp-${{ matrix.target }}${SUFFIX}.tar.gz phpantom_lsp
175201 cd ../../..
176202
177203 - name : Package (windows)
178204 if : matrix.archive == 'zip'
179205 shell : pwsh
180206 run : |
181- $suffix = "${{ matrix.cpu_version }}" ? "-${{ matrix.cpu_version }}" : ""
207+ $suffix = "${{ matrix.suffix }}" ? "-${{ matrix.suffix }}" : ""
182208 Compress-Archive `
183209 -Path "target/${{ matrix.target }}/release/phpantom_lsp.exe" `
184210 -DestinationPath "phpantom_lsp-${{ matrix.target }}$suffix.zip"
185211
186212 - name : Upload artifact
187213 uses : actions/upload-artifact@v4
188214 with :
189- name : phpantom_lsp-${{ matrix.target }}-${{ matrix.cpu_version || 'native ' }}
190- path : phpantom_lsp-${{ matrix.target }}${{ matrix.cpu_version && format('-{0}', matrix.cpu_version ) || '' }}.${{ matrix.archive }}
215+ name : phpantom_lsp-${{ matrix.target }}-${{ matrix.suffix || '' }}
216+ path : phpantom_lsp-${{ matrix.target }}${{ matrix.suffix && format('-{0}', matrix.suffix ) || '' }}.${{ matrix.archive }}
191217
192218 release :
193219 name : Create Release
0 commit comments