Skip to content

Commit 12f1f8c

Browse files
committed
Merge branch 'feature/python-tool-build-apps-with-firebase' of https://github.com/firebase/firebase-cpp-sdk into feature/python-tool-build-apps-with-firebase
2 parents 8e2a08f + be3c208 commit 12f1f8c

File tree

5 files changed

+64
-10
lines changed

5 files changed

+64
-10
lines changed

.github/workflows/cpp-packaging.yml

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: CPP binary SDK packaging
22
on:
3+
push:
4+
branches:
5+
# Run a full packaging step any time a new branch is merged into dev.
6+
- dev
37
workflow_dispatch:
48
inputs:
59
commitIdToPackage:
@@ -15,11 +19,14 @@ on:
1519
env:
1620
# Packaging prerequisites
1721
# Binutils 2.35.1 released Sep 19, 2020
18-
binutilsVer: 2.35.1
22+
binutilsVer: "2.35.1"
1923
# Demumble 1.1.0 released Nov 13, 2018
20-
demumbleVer: 1.1.0
24+
demumbleVer: "1.1.0"
2125
# Use SHA256 for hashing files.
22-
hashCommand: sha256sum
26+
hashCommand: "sha256sum"
27+
# Xcode version 11.7 is the version we build the SDK with.
28+
# Our MacOS runners will use the version in /Applications/Xcode_${xcodeVersion}.app
29+
xcodeVersion: "11.7"
2330

2431
jobs:
2532
log_inputs:
@@ -40,9 +47,12 @@ jobs:
4047
echo "::warning ::Using commit ID '${{ github.event.inputs.commitIdToPackage }}' for building and packaging SDK and tests."
4148
fi
4249
fi
43-
if [[ "${{ github.event.inputs.preserveIntermediateArtifacts }}" != "0" ]]; then
44-
echo "::warning ::Intermediate artifacts will be preserved."
45-
fi
50+
51+
- name: log if preserving intermediate artifacts
52+
if: |
53+
github.event.inputs.preserveIntermediateArtifacts != 0 && github.event.inputs.preserveIntermediateArtifacts != '' &&
54+
github.event.inputs.downloadPublicVersion == '' && github.event.inputs.downloadPreviousRun == ''
55+
run: echo "::warning ::Intermediate artifacts will be preserved."
4656

4757
build_tools:
4858
name: build-tools-${{ matrix.tools_platform }}
@@ -57,6 +67,10 @@ jobs:
5767
- os: macos-latest
5868
tools_platform: darwin
5969
steps:
70+
- name: setup Xcode version (macos)
71+
if: runner.os == 'macOS'
72+
run: sudo xcode-select -s /Applications/Xcode_${{ env.xcodeVersion }}.app/Contents/Developer
73+
6074
- name: fetch and build binutils
6175
run: |
6276
set +e
@@ -113,6 +127,10 @@ jobs:
113127
runs-on: macos-latest
114128
if: ${{ github.event.inputs.downloadPublicVersion == '' && github.event.inputs.downloadPreviousRun == '' }}
115129
steps:
130+
- name: setup Xcode version (macos)
131+
if: runner.os == 'macOS'
132+
run: sudo xcode-select -s /Applications/Xcode_${{ env.xcodeVersion }}.app/Contents/Developer
133+
116134
- name: fetch SDK
117135
uses: actions/[email protected]
118136
with:
@@ -240,6 +258,10 @@ jobs:
240258
build_type: "Debug"
241259

242260
steps:
261+
- name: setup Xcode version (macos)
262+
if: runner.os == 'macOS'
263+
run: sudo xcode-select -s /Applications/Xcode_${{ env.xcodeVersion }}.app/Contents/Developer
264+
243265
- uses: actions/checkout@v2
244266
with:
245267
submodules: true
@@ -360,6 +382,10 @@ jobs:
360382
- sdk_platform: darwin
361383
runs_on_platform: ubuntu-latest
362384
steps:
385+
- name: setup Xcode version (macos)
386+
if: runner.os == 'macOS'
387+
run: sudo xcode-select -s /Applications/Xcode_${{ env.xcodeVersion }}.app/Contents/Developer
388+
363389
- name: fetch SDK
364390
uses: actions/[email protected]
365391
with:
@@ -536,7 +562,12 @@ jobs:
536562
name: cleanup-artifacts
537563
runs-on: ubuntu-latest
538564
needs: [merge_packages]
539-
if: ${{ github.event.inputs.preserveIntermediateArtifacts == 0 && github.event.inputs.downloadPublicVersion == '' && github.event.inputs.downloadPreviousRun == '' }}
565+
if: |
566+
(
567+
(github.event.inputs.preserveIntermediateArtifacts == 0 || github.event.inputs.preserveIntermediateArtifacts == '')
568+
&& github.event.inputs.downloadPublicVersion == ''
569+
&& github.event.inputs.downloadPreviousRun == ''
570+
)
540571
steps:
541572
- uses: geekyeggo/delete-artifact@v1
542573
with:
@@ -576,6 +607,10 @@ jobs:
576607
if: always()
577608
runs-on: ubuntu-latest
578609
steps:
610+
- name: setup Xcode version (macos)
611+
if: runner.os == 'macOS'
612+
run: sudo xcode-select -s /Applications/Xcode_${{ env.xcodeVersion }}.app/Contents/Developer
613+
579614
- name: download SDK zip
580615
uses: actions/download-artifact@v2
581616
with:

.github/workflows/desktop.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66

77
env:
88
CCACHE_DIR: ${{ github.workspace }}/ccache_dir
9+
# Xcode version 11.7 is the version we build the SDK with.
10+
# Our MacOS runners will use the version in /Applications/Xcode_${xcodeVersion}.app
11+
xcodeVersion: "11.7"
912

1013
jobs:
1114
build:
@@ -40,6 +43,10 @@ jobs:
4043
msvc_runtime: "dynamic"
4144

4245
steps:
46+
- name: setup Xcode version (macos)
47+
if: runner.os == 'macOS'
48+
run: sudo xcode-select -s /Applications/Xcode_${{ env.xcodeVersion }}.app/Contents/Developer
49+
4350
- uses: actions/checkout@v2
4451
with:
4552
submodules: true

.github/workflows/ios.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ on:
44
pull_request:
55
types: [opened, reopened, synchronize]
66

7+
env:
8+
# Xcode version 11.7 is the version we build the SDK with.
9+
# Our MacOS runners will use the version in /Applications/Xcode_${xcodeVersion}.app
10+
xcodeVersion: "11.7"
11+
712
jobs:
813
build:
914
name: ios-macos-latest
@@ -12,6 +17,10 @@ jobs:
1217
fail-fast: false
1318

1419
steps:
20+
- name: setup Xcode version (macos)
21+
if: runner.os == 'macOS'
22+
run: sudo xcode-select -s /Applications/Xcode_${{ env.xcodeVersion }}.app/Contents/Developer
23+
1524
- uses: actions/checkout@v2
1625
with:
1726
submodules: true

build_scripts/other/package.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ cd "${origpath}"
2727
# Copy headers to packaged SDK.
2828
mkdir -p "${destpath}/include"
2929
cd "${sdkpath}"
30-
for incdir in */src/include/; do
31-
cp -af "${incdir}" "${destpath}/include/"
30+
for incdir in */src/include; do
31+
cp -af "${incdir}" "${destpath}/"
3232
done
3333
cd "${origpath}"
3434

scripts/gha/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,11 @@ def verify_vcpkg_build(vcpkg_triplet, attempt_auto_fix=False):
193193
# Manually renaming and re-running script makes it go through.
194194
tools_dir_path = os.path.join(vcpkg_root_dir_path, 'downloads', 'tools')
195195
for name in os.listdir(tools_dir_path):
196+
# In the specific windows error that we noticed, the error occurs while
197+
# trying to rename intermediate directories for donwloaded tools
198+
# like "powershell.partial.<pid>" to "powershell". Renaming via python
199+
# also runs into the same error. Workaround is to copy instead of rename.
196200
if '.partial.' in name and os.path.isdir(os.path.join(tools_dir_path, name)):
197-
# Since we can't rename, lets copy the directory to one without partial in the name
198201
expected_name = name.split('.partial.')[0]
199202
shutil.copytree(os.path.join(tools_dir_path, name),
200203
os.path.join(tools_dir_path, expected_name))

0 commit comments

Comments
 (0)