@@ -17,7 +17,7 @@ concurrency:
1717jobs :
1818 specs_checking :
1919 # Don't run on private repo unless it is a PR.
20- if : (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == ' workflow_dispatch'
20+ if : (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
2121 runs-on : macos-12
2222 env :
2323 bot_token_secret : ${{ secrets.GHASecretsGPGPassphrase1 }}
@@ -49,13 +49,13 @@ jobs:
4949 sdk_version_config="${GITHUB_WORKSPACE}/scripts/create_spec_repo/RC_firebase_sdk.textproto" \
5050 local_sdk_repo_dir="${local_sdk_repo_dir}" \
5151 podspec_repo_branch="${podspec_repo_branch}" \
52- scripts/release_testing_setup.sh prerelease_testing
52+ scripts/release_testing_setup.sh release_testing
5353 - name : Clean spec repo
5454 run : |
5555 botaccess=`cat bot-access.txt`
5656 git clone --quiet https://"$botaccess"@github.com/FirebasePrivate/SpecsTesting.git "${local_repo}"
5757 cd "${local_repo}"
58- # Remove all unhided dirs, i.e. all podspec dir from the spec repo.
58+ # Remove all unhidden dirs, i.e. all podspec dir from the spec repo.
5959 rm -Rf -- */
6060 git add .
6161 # commit without diff will throw an error. `git diff --exit-code` can avoid such error.
@@ -71,10 +71,47 @@ jobs:
7171 path : |
7272 ${{ env.local_sdk_repo_dir }}/*.podspec
7373 ${{ env.local_sdk_repo_dir }}/*.podspec.json
74- buildup_SpecsTesting_repo :
74+ buildup_SpecsTesting_repo_FirebaseCore :
7575 needs : specs_checking
7676 # Don't run on private repo unless it is a PR.
77- if : (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
77+ if : github.repository == 'Firebase/firebase-ios-sdk'
78+ runs-on : macos-12
79+ env :
80+ bot_token_secret : ${{ secrets.GHASecretsGPGPassphrase1 }}
81+ local_repo : specstesting
82+ local_sdk_repo_dir : /tmp/test/firebase-ios-sdk
83+ targeted_pod : FirebaseCore
84+ steps :
85+ - uses : actions/checkout@v2
86+ - uses : actions/download-artifact@v3
87+ with :
88+ name : firebase-ios-sdk
89+ path : ${{ env.local_sdk_repo_dir }}
90+ - name : Get token
91+ run : |
92+ scripts/decrypt_gha_secret.sh scripts/gha-encrypted/bot-access.txt.gpg \
93+ bot-access.txt "$bot_token_secret"
94+ - name : Update SpecsTesting repo
95+ run : |
96+ botaccess=`cat bot-access.txt`
97+ cd scripts/create_spec_repo/
98+ swift build
99+ pod repo add --silent "${local_repo}" https://"$botaccess"@github.com/FirebasePrivate/SpecsTesting.git
100+ BOT_TOKEN="${botaccess}" ${GITHUB_WORKSPACE}/scripts/third_party/travis/retry.sh .build/debug/spec-repo-builder \
101+ --sdk-repo "${local_sdk_repo_dir}" \
102+ --local-spec-repo-name "${local_repo}" \
103+ --pod-sources 'https://${BOT_TOKEN}@github.com/FirebasePrivate/SpecsTesting' "https://github.com/firebase/SpecsStaging.git" "https://github.com/CocoaPods/Specs.git" \
104+ --include-pods "${targeted_pod}" --keep-repo
105+ - name : Clean Artifacts
106+ if : ${{ always() }}
107+ run : |
108+ pod repo remove "${local_repo}"
109+ rm -rf bot-access.txt
110+
111+ buildup_SpecsTesting_repo :
112+ needs : [buildup_SpecsTesting_repo_FirebaseCore, specs_checking]
113+ # Don't run on private repo unless it is a PR.
114+ if : github.repository == 'Firebase/firebase-ios-sdk'
78115 runs-on : macos-12
79116 strategy :
80117 fail-fast : false
@@ -96,11 +133,19 @@ jobs:
96133 bot-access.txt "$bot_token_secret"
97134 - name : Update SpecsTesting repo
98135 run : |
136+ [[ ${{ matrix.allowwarnings }} == true ]] && ALLOWWARNINGS=true
99137 botaccess=`cat bot-access.txt`
100138 cd scripts/create_spec_repo/
101139 swift build
102140 pod repo add --silent "${local_repo}" https://"$botaccess"@github.com/FirebasePrivate/SpecsTesting.git
103- BOT_TOKEN="${botaccess}" .build/debug/spec-repo-builder --sdk-repo "${local_sdk_repo_dir}" --local-spec-repo-name "${local_repo}" --pod-sources 'https://${BOT_TOKEN}@github.com/FirebasePrivate/SpecsTesting' "https://github.com/firebase/SpecsStaging.git" "https://github.com/CocoaPods/Specs.git" --include-pods "${targeted_pod}" --keep-repo
141+ # ${ALLOWWARNINGS:+--allow-warnings} will add --allow-warnings to the
142+ # command if ${ALLOWWARNINGS} is not null.
143+ BOT_TOKEN="${botaccess}" ${GITHUB_WORKSPACE}/scripts/third_party/travis/retry.sh .build/debug/spec-repo-builder \
144+ --sdk-repo "${local_sdk_repo_dir}" \
145+ --local-spec-repo-name "${local_repo}" \
146+ --pod-sources 'https://${BOT_TOKEN}@github.com/FirebasePrivate/SpecsTesting' "https://github.com/firebase/SpecsStaging.git" "https://github.com/CocoaPods/Specs.git" \
147+ --include-pods "${targeted_pod}" \
148+ --keep-repo ${ALLOWWARNINGS:+--allow-warnings}
104149 - name : Clean Artifacts
105150 if : ${{ always() }}
106151 run : |
0 commit comments