CI deployment changes: don't upload carthage archive (since it doesn't work with XCF), use xcode 12 for deployment, and simplify config overall

This commit is contained in:
Timofey Solomko
2021-03-24 18:40:23 +02:00
parent e592b78e88
commit 57bdebaafd
2 changed files with 6 additions and 30 deletions
+4 -19
View File
@@ -146,10 +146,11 @@ jobs:
script:
- ./utils.py ci script-linux
- stage: deploy
if: tag IS present
# Don't deploy if it is a test release.
if: (tag IS present) AND (tag =~ /^\d+\.\d+\.\d+$/)
language: generic
os: osx
osx_image: xcode11.4
osx_image: xcode12
env:
- HOMEBREW_NO_INSTALL_CLEANUP=1
env:
@@ -157,31 +158,15 @@ jobs:
addons:
homebrew:
packages:
- carthage
- sourcekitten
update: true
install:
- gem install -N jazzy
- gem update -N cocoapods
before_deploy:
- >
if ! [ "$BEFORE_DEPLOY_RUN" ]; then
export BEFORE_DEPLOY_RUN=1;
./utils.py prepare-workspace macos -T
./utils.py ci before-deploy;
fi
- ./utils.py ci before-deploy
deploy:
- provider: releases
skip_cleanup: true
api_key: $GITHUB_TOKEN
file: "SWCompression.framework.zip"
on:
tags: true
- provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: docs
on:
tags: true
# Don't upload documentation if it is a test release.
condition: $(git describe) != *"test"*
+2 -11
View File
@@ -9,17 +9,8 @@ def _sprun(cmd, *args, **kwargs):
subprocess.run(cmd, check=True, *args, **kwargs)
def _ci_before_deploy():
print("=> Removing bcsymbolmap files for dependencies.")
platforms = ["Mac", "watchOS", "tvOS", "iOS"]
for platform in platforms:
_sprun(["rm", "-f", "Carthage/Build/{0}/*.bcsymbolmap".format(platform)])
print("=> Removing checkouts for dependencies.")
_sprun(["rm", "-rf", "Carthage/Checkouts"])
print("=> Preparing deployment files.")
_sprun(["carthage", "build", "--no-skip-current"])
_sprun(["carthage", "archive", "SWCompression"])
docs_json_file = open("docs.json", "w")
_sprun(["sourcekitten", "doc", "--spm-module", "SWCompression"], stdout=docs_json_file)
_sprun(["sourcekitten", "doc", "--spm", "--module-name", "SWCompression"], stdout=docs_json_file)
docs_json_file.close()
_sprun(["jazzy"])
@@ -71,7 +62,7 @@ def action_cw(args):
def _pw_macos():
print("=> Downloading dependency (BitByteData) using Carthage")
_sprun(["carthage", "bootstrap"])
_sprun(["carthage", "bootstrap", "--no-use-binaries"])
def action_pw(args):
if args.os == "macos":