Changes to the CI dependency chain

pull/941/head
Morgan Pretty 2 years ago
parent d0e391f5cb
commit d16cbcaeb6

@ -60,7 +60,7 @@ local load_cocoapods_cache = {
}; };
// Override the cached CocoaPods directory (to speed up the next build) // Override the cached CocoaPods directory (to speed up the next build)
local update_cocoapods_cache = { local update_cocoapods_cache(depends_on) = {
name: 'Update CocoaPods Cache', name: 'Update CocoaPods Cache',
commands: [ commands: [
||| |||
@ -82,14 +82,15 @@ local update_cocoapods_cache = {
fi fi
|||, |||,
'rm -f /Users/drone/.cocoapods_cache.lock' 'rm -f /Users/drone/.cocoapods_cache.lock'
] ],
depends_on: depends_on,
}; };
// Run specified unit tests // Run specified unit tests
local run_tests(testName, testBuildStepName) = { local run_tests(testName, testBuildStepName) = {
name: 'Run ' + testName, name: 'Run ' + testName,
commands: [ commands: [
'NSUnbufferedIO=YES set -o pipefail && xcodebuild test-without-building -workspace Session.xcworkspace -scheme Session -derivedDataPath ./build/derivedData -destination "platform=iOS Simulator,name=iPhone 14" -test-timeouts-enabled YES -maximum-test-execution-time-allowance 10 -only-testing $testName -collect-test-diagnostics never 2>&1 | ./Pods/xcbeautify/xcbeautify --is-ci', 'NSUnbufferedIO=YES set -o pipefail && xcodebuild test-without-building -workspace Session.xcworkspace -scheme Session -derivedDataPath ./build/derivedData -destination "platform=iOS Simulator,name=iPhone 14" -test-timeouts-enabled YES -maximum-test-execution-time-allowance 10 -only-testing ' + testName + ' -collect-test-diagnostics never 2>&1 | ./Pods/xcbeautify/xcbeautify --is-ci',
], ],
depends_on: [ depends_on: [
testBuildStepName testBuildStepName
@ -126,7 +127,7 @@ local run_tests(testName, testBuildStepName) = {
'xcodebuild build-for-testing -workspace Session.xcworkspace -scheme Session -derivedDataPath ./build/derivedData -parallelizeTargets -destination "platform=iOS Simulator,name=iPhone 14" | ./Pods/xcbeautify/xcbeautify --is-ci', 'xcodebuild build-for-testing -workspace Session.xcworkspace -scheme Session -derivedDataPath ./build/derivedData -parallelizeTargets -destination "platform=iOS Simulator,name=iPhone 14" | ./Pods/xcbeautify/xcbeautify --is-ci',
], ],
depends_on: [ depends_on: [
'Reset Simulators' 'Install CocoaPods'
], ],
}, },
run_tests('SessionTests', 'Build For Testing'), run_tests('SessionTests', 'Build For Testing'),
@ -147,7 +148,7 @@ local run_tests(testName, testBuildStepName) = {
status: ['failure', 'success'] status: ['failure', 'success']
} }
}, },
update_cocoapods_cache update_cocoapods_cache(['Build For Testing'])
], ],
}, },
// Simulator build // Simulator build
@ -168,13 +169,19 @@ local run_tests(testName, testBuildStepName) = {
'mkdir build', 'mkdir build',
'xcodebuild archive -workspace Session.xcworkspace -scheme Session -derivedDataPath ./build/derivedData -parallelizeTargets -configuration "App Store Release" -sdk iphonesimulator -archivePath ./build/Session_sim.xcarchive -destination "generic/platform=iOS Simulator" | ./Pods/xcbeautify/xcbeautify --is-ci', 'xcodebuild archive -workspace Session.xcworkspace -scheme Session -derivedDataPath ./build/derivedData -parallelizeTargets -configuration "App Store Release" -sdk iphonesimulator -archivePath ./build/Session_sim.xcarchive -destination "generic/platform=iOS Simulator" | ./Pods/xcbeautify/xcbeautify --is-ci',
], ],
depends_on: [
'Install CocoaPods'
],
}, },
update_cocoapods_cache, update_cocoapods_cache(['Build']),
{ {
name: 'Upload artifacts', name: 'Upload artifacts',
environment: { SSH_KEY: { from_secret: 'SSH_KEY' } }, environment: { SSH_KEY: { from_secret: 'SSH_KEY' } },
commands: [ commands: [
'./Scripts/drone-static-upload.sh' './Scripts/drone-static-upload.sh'
],
depends_on: [
'Build'
] ]
}, },
], ],
@ -197,13 +204,19 @@ local run_tests(testName, testBuildStepName) = {
'mkdir build', 'mkdir build',
'xcodebuild archive -workspace Session.xcworkspace -scheme Session -derivedDataPath ./build/derivedData -parallelizeTargets -configuration "App Store Release" -sdk iphoneos -archivePath ./build/Session.xcarchive -destination "generic/platform=iOS" -allowProvisioningUpdates CODE_SIGNING_ALLOWED=NO | ./Pods/xcbeautify/xcbeautify --is-ci', 'xcodebuild archive -workspace Session.xcworkspace -scheme Session -derivedDataPath ./build/derivedData -parallelizeTargets -configuration "App Store Release" -sdk iphoneos -archivePath ./build/Session.xcarchive -destination "generic/platform=iOS" -allowProvisioningUpdates CODE_SIGNING_ALLOWED=NO | ./Pods/xcbeautify/xcbeautify --is-ci',
], ],
depends_on: [
'Install CocoaPods'
],
}, },
update_cocoapods_cache, update_cocoapods_cache(['Build']),
{ {
name: 'Upload artifacts', name: 'Upload artifacts',
environment: { SSH_KEY: { from_secret: 'SSH_KEY' } }, environment: { SSH_KEY: { from_secret: 'SSH_KEY' } },
commands: [ commands: [
'./Scripts/drone-static-upload.sh' './Scripts/drone-static-upload.sh'
],
depends_on: [
'Build'
] ]
}, },
], ],

Loading…
Cancel
Save