From 57bdebaafdaba96ad99d2167dfd336460e78a194 Mon Sep 17 00:00:00 2001 From: Timofey Solomko Date: Wed, 24 Mar 2021 17:26:00 +0200 Subject: [PATCH] CI deployment changes: don't upload carthage archive (since it doesn't work with XCF), use xcode 12 for deployment, and simplify config overall --- .travis.yml | 23 ++++------------------- utils.py | 13 ++----------- 2 files changed, 6 insertions(+), 30 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9dc56375..52dfc2ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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"* diff --git a/utils.py b/utils.py index 173012ac..479ce233 100755 --- a/utils.py +++ b/utils.py @@ -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":