@@ -3,14 +3,18 @@ name: Build SPC Binary
3
3
on :
4
4
push :
5
5
branches : [ "main" ]
6
+ pull_request :
7
+ branches : [ "main" ]
8
+ paths :
9
+ - ' .github/workflows/release-build.yml'
6
10
release :
7
11
types :
8
12
- published
9
13
workflow_dispatch :
10
14
11
15
env :
12
16
PHP_VERSION : 8.4
13
- MICRO_VERSION : 8.4.10
17
+ MICRO_VERSION : 8.4.11
14
18
15
19
jobs :
16
20
build-release-artifacts :
@@ -117,7 +121,8 @@ jobs:
117
121
files : dist/${{ matrix.operating-system.filename }}
118
122
119
123
- name : " Deploy to self-hosted OSS"
120
- if : github.repository == 'crazywhalecc/static-php-cli'
124
+ # only run this step if the repository is static-php-cli and the branch is main
125
+ if : github.repository == 'crazywhalecc/static-php-cli' && github.ref == 'refs/heads/main'
121
126
uses :
static-php/[email protected]
122
127
with :
123
128
aws_key_id : ${{ secrets.AWS_KEY_ID }}
@@ -132,3 +137,39 @@ jobs:
132
137
with :
133
138
path : spc${{ env.SUFFIX }}
134
139
name : spc-${{ matrix.operating-system.name }}${{ env.SUFFIX }}
140
+ test-spc :
141
+ name : " Test SPC Binary for ${{ matrix.operating-system.name }}"
142
+ runs-on : ${{ matrix.operating-system.os }}
143
+ needs : [build-release-artifacts]
144
+ strategy :
145
+ matrix :
146
+ operating-system :
147
+ - name : " linux-x86_64"
148
+ os : " ubuntu-latest"
149
+ - name : " macos-x86_64"
150
+ os : " macos-13"
151
+ - name : " linux-aarch64"
152
+ os : " ubuntu-24.04-arm"
153
+ - name : " macos-aarch64"
154
+ os : " macos-latest"
155
+ - name : " windows-x64"
156
+ os : " windows-latest"
157
+ steps :
158
+ - name : " Checkout"
159
+ uses : actions/checkout@v4
160
+
161
+ - name : " Download Artifact"
162
+ uses : actions/download-artifact@v4
163
+ env :
164
+ SUFFIX : ${{ matrix.operating-system.name == 'windows-x64' && '.exe' || '' }}
165
+ with :
166
+ name : spc-${{ matrix.operating-system.name }}${{ env.SUFFIX }}
167
+
168
+ - name : " Chmod"
169
+ if : matrix.operating-system.name != 'windows-x64'
170
+ run : chmod +x spc
171
+
172
+ - name : " Run SPC Tests"
173
+ env :
174
+ SUFFIX : ${{ matrix.operating-system.name == 'windows-x64' && '.exe' || '' }}
175
+ run : ./spc${{ env.SUFFIX }} dev:extensions
0 commit comments