Update .gitlab-ci.yml file

This commit is contained in:
Quentin Monnier 2022-07-25 13:56:05 +00:00
parent d524cbaaf0
commit 4b873086ea

View file

@ -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