From 4b873086ea69f6658fe30f76662c8821691c94a6 Mon Sep 17 00:00:00 2001 From: Quentin Monnier Date: Mon, 25 Jul 2022 13:56:05 +0000 Subject: [PATCH] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 73 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 57 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2d857c68b..0704ff8f6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,26 +1,67 @@ variables: - archive_scheme: linphone + workspace: linphone.xcworkspace + scheme: linphone + destination: "platform=iOS Simulator,name=iPhone 13 Pro,OS=15.5" archive_path: linphone.xcarchive export_path: linphone-adhoc-ipa export_options_plist: linphone-adhoc.plist + +stages: + - Build + - Test + - Archive -job-ios: - - stage: build - tags: [ "macmini-m1-xcode13" ] +before_script: + - ls + - pod install +Compile & Build: + stage: Build script: - - pod install --repo-update - - pwd - - sed 's/fileprivate let tableView =/public let tableView =/g' ./Pods/DropDown/DropDown/src/DropDown.swift > tmp.swift && mv -f tmp.swift ./Pods/DropDown/DropDown/src/DropDown.swift - - xcodebuild archive -scheme $archive_scheme -archivePath ./$archive_path -configuration Release -workspace ./linphone.xcworkspace -UseModernBuildSystem=YES -destination 'generic/platform=iOS' - - xcodebuild -exportArchive -archivePath ./$archive_path -exportPath ./$export_path -exportOptionsPlist ./$export_options_plist -allowProvisioningUpdates -UseModernBuildSystem=YES -destination 'generic/platform=iOS' + - xcodebuild -workspace $workspace -scheme $scheme -UseModernBuildSystem=YES -destination $destination + tags: + - iOS-tag + +Feature Tests: + stage: Test + script: + - xcodebuild test -workspace $workspace -scheme $scheme -UseModernBuildSystem=YES -destination $destination| xcpretty --color + tags: + - iOS-tag + +Package Archive: + stage: Archive + script: + - xcodebuild clean -workspace $workspace -scheme $scheme + - xcodebuild archive -archivePath $archive_path -configuration Release -workspace $workspace -scheme $scheme -UseModernBuildSystem=YES -destination $destination + - xcodebuild -exportArchive -archivePath $archive_path -exportPath $export_path -exportOptionsPlist $export_options_plist -allowProvisioningUpdates -UseModernBuildSystem=YES -destination $destination +tags: + - ioS-tag + +artifacts: + paths: + - $archive_path + - $export_path + when: always + expire_in: 1 week - artifacts: - paths: - - $archive_path - - $export_path - when: always - expire_in: 1 week +#job-ios: + +# stage: build +# tags: [ "macmini-m1-xcode13" ] + +# - pod install --repo-update +# - pwd +# - sed 's/fileprivate let tableView =/public let tableView =/g' ./Pods/DropDown/DropDown/src/DropDown.swift > tmp.swift && mv -f tmp.swift ./Pods/DropDown/DropDown/src/DropDown.swift +# - xcodebuild archive -scheme $archive_scheme -archivePath ./$archive_path -configuration Release -workspace ./linphone.xcworkspace -UseModernBuildSystem=YES -destination 'generic/platform=iOS' +# - xcodebuild -exportArchive -archivePath ./$archive_path -exportPath ./$export_path -exportOptionsPlist ./$export_options_plist -allowProvisioningUpdates -UseModernBuildSystem=YES -destination 'generic/platform=iOS' + + +# artifacts: +# paths: +# - $archive_path +# - $export_path +# when: always +# expire_in: 1 week