Skip to content

Commit cf715d0

Browse files
committed
Ensure all steps have blank lines in between them, and make sure to compute SDK hash with "bash" shell.
1 parent 8114370 commit cf715d0

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/cpp-packaging.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,14 @@ jobs:
7878
cd -
7979
mkdir -p packaging-tools
8080
cp -af /tmp/binutils/bin/* packaging-tools
81+
8182
- name: fetch demumble
8283
uses: actions/[email protected]
8384
with:
8485
repository: nico/demumble
8586
path: demumble-src
8687
ref: v${{ env.demumbleVer }}
88+
8789
- name: build demumble
8890
run: |
8991
cd demumble-src
@@ -93,11 +95,13 @@ jobs:
9395
cd -
9496
mkdir -p packaging-tools-
9597
cp -af demumble-src/demumble packaging-tools
98+
9699
- name: archive tools
97100
run: |
98101
cd packaging-tools
99102
ls
100103
tar -czhf ../packaging-tools.tgz .
104+
101105
- name: upload artifacts
102106
uses: actions/upload-artifact@v2
103107
with:
@@ -114,14 +118,17 @@ jobs:
114118
with:
115119
path: sdk-src
116120
ref: ${{ github.event.inputs.commitIdToPackage }}
121+
117122
- name: install prerequisites
118123
run: sdk-src/build_scripts/ios/install_prereqs.sh
124+
119125
- name: build sdk
120126
run: |
121127
sdk-src/build_scripts/ios/build.sh -b firebase-cpp-sdk-ios-build -s sdk-src
122128
sdk-src/build_scripts/ios/package.sh firebase-cpp-sdk-ios-build firebase-cpp-sdk-ios-package
123129
cd firebase-cpp-sdk-ios-package
124130
tar -czhf ../firebase-cpp-sdk-ios-package.tgz .
131+
125132
- name: Print built libraries
126133
shell: bash
127134
run: |
@@ -131,10 +138,12 @@ jobs:
131138
find firebase-cpp-sdk-*-build -name "*.a"
132139
find firebase-cpp-sdk-*-build -name "*.so"
133140
find firebase-cpp-sdk-*-build -name "*.framework"
141+
134142
- name: Print package contents
135143
shell: bash
136144
run: |
137145
find firebase-cpp-sdk-*-package -type f
146+
138147
- name: upload artifacts
139148
uses: actions/upload-artifact@v2
140149
with:
@@ -155,14 +164,17 @@ jobs:
155164
with:
156165
path: sdk-src
157166
ref: ${{ github.event.inputs.commitIdToPackage }}
167+
158168
- name: install prerequisites
159169
run: sdk-src/build_scripts/android/install_prereqs.sh
170+
160171
- name: build sdk
161172
run: |
162173
sdk-src/build_scripts/android/build.sh firebase-cpp-sdk-android-${{ matrix.stl }}-build sdk-src ${{ matrix.stl }}
163174
sdk-src/build_scripts/android/package.sh firebase-cpp-sdk-android-${{ matrix.stl }}-build firebase-cpp-sdk-android-${{ matrix.stl }}-package ${{ matrix.stl }}
164175
cd firebase-cpp-sdk-android-${{ matrix.stl }}-package
165176
tar -czhf ../firebase-cpp-sdk-android-${{ matrix.stl}}-package.tgz .
177+
166178
- name: Print built libraries
167179
shell: bash
168180
run: |
@@ -172,10 +184,12 @@ jobs:
172184
find firebase-cpp-sdk-*-build -name "*.a"
173185
find firebase-cpp-sdk-*-build -name "*.so"
174186
find firebase-cpp-sdk-*-build -name "*.framework"
187+
175188
- name: Print package contents
176189
shell: bash
177190
run: |
178191
find firebase-cpp-sdk-*-package -type f
192+
179193
- name: upload artifacts
180194
uses: actions/upload-artifact@v2
181195
with:
@@ -294,6 +308,7 @@ jobs:
294308
cd firebase-cpp-sdk-${{ env.SDK_NAME }}-build
295309
find .. -type f -print > src_file_list.txt
296310
tar -czhf ../firebase-cpp-sdk-${{ env.SDK_NAME }}-build.tgz .
311+
297312
- name: Print built libraries
298313
shell: bash
299314
run: |
@@ -303,6 +318,7 @@ jobs:
303318
find firebase-cpp-sdk-*-build -name "*.a"
304319
find firebase-cpp-sdk-*-build -name "*.so"
305320
find firebase-cpp-sdk-*-build -name "*.framework"
321+
306322
- name: upload artifacts
307323
uses: actions/upload-artifact@v2
308324
with:
@@ -363,21 +379,25 @@ jobs:
363379
with:
364380
path: sdk-src
365381
ref: ${{ github.event.inputs.commitIdToPackage }}
382+
366383
- name: download artifact
367384
uses: actions/download-artifact@v2
368385
with:
369386
# download-artifact doesn't support wildcards, but by default
370387
# will download all artifacts. Sadly this is what we must do.
371388
path: artifacts
389+
372390
- name: Setup python
373391
uses: actions/setup-python@v2
374392
with:
375393
python-version: 3.7
394+
376395
- name: Install prerequisites
377396
run: |
378397
cd sdk-src
379398
python scripts/gha/install_prereqs_desktop.py
380399
cd ..
400+
381401
- name: postprocess and package built SDK
382402
run: |
383403
mkdir -p bin
@@ -401,10 +421,12 @@ jobs:
401421
fi
402422
cd firebase-cpp-sdk-${{ matrix.sdk_platform }}${{ matrix.suffix }}-package
403423
tar -czhf ../firebase-cpp-sdk-${{ matrix.sdk_platform }}${{ matrix.suffix }}-package.tgz .
424+
404425
- name: Print package contents
405426
shell: bash
406427
run: |
407428
find firebase-cpp-sdk-*-package -type f
429+
408430
- name: upload SDK zip
409431
uses: actions/upload-artifact@v2
410432
with:
@@ -443,9 +465,11 @@ jobs:
443465
set -e
444466
445467
- name: compute SDK hash
468+
shell: bash
446469
run: |
447470
${{ env.hashCommand }} --tag firebase_cpp_sdk.zip > firebase_cpp_sdk_hash.txt
448471
echo "::warning ::$(cat firebase_cpp_sdk_hash.txt)"
472+
449473
- name: upload hash
450474
uses: actions/upload-artifact@v2
451475
with:
@@ -478,6 +502,7 @@ jobs:
478502
path: artifacts
479503

480504
- name: merge SDK packages
505+
shell: bash
481506
run: |
482507
set -ex
483508
mkdir -p firebase-cpp-sdk-final/firebase_cpp_sdk
@@ -496,9 +521,11 @@ jobs:
496521
zip -9 -r -y ../firebase_cpp_sdk.zip firebase_cpp_sdk
497522
cd ..
498523
- name: compute SDK hash
524+
shell: bash
499525
run: |
500526
${{ env.hashCommand }} --tag firebase_cpp_sdk.zip > firebase_cpp_sdk_hash.txt
501527
echo "::warning ::$(cat firebase_cpp_sdk_hash.txt)"
528+
502529
- name: Print final package contents
503530
shell: bash
504531
run: |
@@ -510,6 +537,7 @@ jobs:
510537
with:
511538
name: firebase_cpp_sdk_hash.txt
512539
path: firebase_cpp_sdk_hash.txt
540+
513541
- name: upload SDK zip
514542
uses: actions/upload-artifact@v2
515543
with:
@@ -566,24 +594,28 @@ jobs:
566594
with:
567595
name: firebase_cpp_sdk.zip
568596
path: .
597+
569598
- name: download hash
570599
uses: actions/download-artifact@v2
571600
with:
572601
name: firebase_cpp_sdk_hash.txt
573602
path: .
603+
574604
- name: List binary SDK files.
575605
run: |
576606
# Verify zipfile hash first.
577607
${{ env.hashCommand }} -c --quiet firebase_cpp_sdk_hash.txt
578608
unzip -q firebase_cpp_sdk.zip
579609
find . -print
610+
580611
- name: Verify SDK package files.
581612
run: |
582613
if [[ -r firebase_cpp_sdk/file_hashes.txt ]]; then
583614
${{ env.hashCommand }} -c --quiet firebase_cpp_sdk/file_hashes.txt
584615
else
585616
echo "::warning ::SDK package does not contain file_hashes.txt, cannot verify files in package."
586617
fi
618+
587619
- name: fetch integration test source
588620
uses: actions/[email protected]
589621
with:

0 commit comments

Comments
 (0)