1- name : Build SPM
1+ name : Build SwiftPM
22
33on :
44 workflow_call :
@@ -43,14 +43,14 @@ jobs:
4343 uses : actions/cache/restore@v4
4444 with :
4545 key : hermes-v1-${{ steps.resolve.outputs.hermes-commit }}-Debug
46- path : /tmp/ hermes-destroot
46+ path : hermes-destroot
4747
4848 - name : Upload cached Hermes artifacts
4949 if : steps.cache.outputs.cache-hit == 'true'
5050 uses : actions/upload-artifact@v4
5151 with :
5252 name : hermes-artifacts
53- path : /tmp/ hermes-destroot
53+ path : hermes-destroot
5454 retention-days : 1
5555
5656 build-hermesc :
@@ -68,17 +68,17 @@ jobs:
6868 run : sudo xcode-select --switch /Applications/Xcode_16.2.app
6969
7070 - name : Clone Hermes
71- run : |
72- git clone --depth 1 https://github.com/facebook/hermes.git /tmp/hermes
73- cd /tmp /hermes
74- git fetch --depth 1 origin ${{ needs.resolve-hermes.outputs.hermes-commit }}
75- git checkout ${{ needs.resolve- hermes.outputs.hermes-commit }}
71+ uses : actions/checkout@v4
72+ with :
73+ repository : facebook /hermes
74+ ref : ${{ needs.resolve-hermes.outputs.hermes-commit }}
75+ path : hermes
7676
7777 - name : Build hermesc
78- working-directory : /tmp/ hermes
78+ working-directory : hermes
7979 env :
80- HERMES_PATH : /tmp /hermes
81- JSI_PATH : /tmp /hermes/API/jsi
80+ HERMES_PATH : ${{ github.workspace }} /hermes
81+ JSI_PATH : ${{ github.workspace }} /hermes/API/jsi
8282 MAC_DEPLOYMENT_TARGET : ' 14.0'
8383 run : |
8484 source $GITHUB_WORKSPACE/packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh
8888 uses : actions/upload-artifact@v4
8989 with :
9090 name : hermesc
91- path : /tmp/ hermes/build_host_hermesc
91+ path : hermes/build_host_hermesc
9292 retention-days : 1
9393
9494 build-hermes-slice :
@@ -118,27 +118,27 @@ jobs:
118118 sudo xcodebuild -runFirstLaunch
119119
120120 - name : Clone Hermes
121- run : |
122- git clone --depth 1 https://github.com/facebook/hermes.git /tmp/hermes
123- cd /tmp /hermes
124- git fetch --depth 1 origin ${{ needs.resolve-hermes.outputs.hermes-commit }}
125- git checkout ${{ needs.resolve- hermes.outputs.hermes-commit }}
121+ uses : actions/checkout@v4
122+ with :
123+ repository : facebook /hermes
124+ ref : ${{ needs.resolve-hermes.outputs.hermes-commit }}
125+ path : hermes
126126
127127 - name : Download hermesc
128128 uses : actions/download-artifact@v4
129129 with :
130130 name : hermesc
131- path : /tmp/ hermes/build_host_hermesc
131+ path : hermes/build_host_hermesc
132132
133133 - name : Restore hermesc permissions
134- run : chmod +x /tmp /hermes/build_host_hermesc/bin/hermesc
134+ run : chmod +x ${{ github.workspace }} /hermes/build_host_hermesc/bin/hermesc
135135
136136 - name : Build Hermes slice (${{ matrix.slice }})
137- working-directory : /tmp/ hermes
137+ working-directory : hermes
138138 env :
139139 BUILD_TYPE : Debug
140- HERMES_PATH : /tmp /hermes
141- JSI_PATH : /tmp /hermes/API/jsi
140+ HERMES_PATH : ${{ github.workspace }} /hermes
141+ JSI_PATH : ${{ github.workspace }} /hermes/API/jsi
142142 IOS_DEPLOYMENT_TARGET : ' 15.1'
143143 MAC_DEPLOYMENT_TARGET : ' 14.0'
144144 XROS_DEPLOYMENT_TARGET : ' 1.0'
@@ -150,7 +150,7 @@ jobs:
150150 uses : actions/upload-artifact@v4
151151 with :
152152 name : hermes-slice-${{ matrix.slice }}
153- path : /tmp/ hermes/destroot
153+ path : hermes/destroot
154154 retention-days : 1
155155
156156 assemble-hermes :
@@ -172,26 +172,26 @@ jobs:
172172
173173 - name : Assemble destroot from slices
174174 run : |
175- mkdir -p /tmp /hermes/destroot/Library/Frameworks
175+ mkdir -p ${{ github.workspace }} /hermes/destroot/Library/Frameworks
176176 for slice_dir in /tmp/slices/hermes-slice-*; do
177177 slice_name=$(basename "$slice_dir" | sed 's/hermes-slice-//')
178178 echo "Copying slice: $slice_name"
179- cp -R "$slice_dir/Library/Frameworks/$slice_name" /tmp /hermes/destroot/Library/Frameworks/
179+ cp -R "$slice_dir/Library/Frameworks/$slice_name" ${{ github.workspace }} /hermes/destroot/Library/Frameworks/
180180 # Copy include and bin directories (identical across slices, only need one copy)
181- if [ -d "$slice_dir/include" ] && [ ! -d /tmp /hermes/destroot/include ]; then
182- cp -R "$slice_dir/include" /tmp /hermes/destroot/
181+ if [ -d "$slice_dir/include" ] && [ ! -d ${{ github.workspace }} /hermes/destroot/include ]; then
182+ cp -R "$slice_dir/include" ${{ github.workspace }} /hermes/destroot/
183183 fi
184184 if [ -d "$slice_dir/bin" ]; then
185- cp -R "$slice_dir/bin" /tmp /hermes/destroot/
185+ cp -R "$slice_dir/bin" ${{ github.workspace }} /hermes/destroot/
186186 fi
187187 done
188188 echo "Assembled destroot contents:"
189- ls -la /tmp /hermes/destroot/Library/Frameworks/
189+ ls -la ${{ github.workspace }} /hermes/destroot/Library/Frameworks/
190190
191191 - name : Create universal xcframework
192- working-directory : /tmp/ hermes
192+ working-directory : hermes
193193 env :
194- HERMES_PATH : /tmp /hermes
194+ HERMES_PATH : ${{ github.workspace }} /hermes
195195 run : |
196196 source $GITHUB_WORKSPACE/packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh
197197 create_universal_framework "iphoneos" "iphonesimulator" "macosx" "xros" "xrsimulator"
@@ -200,13 +200,13 @@ jobs:
200200 uses : actions/cache/save@v4
201201 with :
202202 key : hermes-v1-${{ needs.resolve-hermes.outputs.hermes-commit }}-Debug
203- path : /tmp/ hermes/destroot
203+ path : hermes/destroot
204204
205205 - name : Upload Hermes artifacts
206206 uses : actions/upload-artifact@v4
207207 with :
208208 name : hermes-artifacts
209- path : /tmp/ hermes/destroot
209+ path : hermes/destroot
210210 retention-days : 1
211211
212212 build-spm :
0 commit comments