Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 29 additions & 42 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ name: release

on:
push:
branches:
- main
tags:
- v*
pull_request:

jobs:
android_release_artifacts:
Expand Down Expand Up @@ -42,6 +45,7 @@ jobs:

android_release_deploy:
name: android_release_deploy
if: startsWith(github.ref, 'refs/tags/v')
needs: android_release_artifacts
runs-on: ubuntu-18.04
timeout-minutes: 240
Expand Down Expand Up @@ -100,8 +104,8 @@ jobs:
xml.asc \
javadoc.asc

ios_release_artifacts_framework:
name: ios_release_artifacts_framework
ios_release_artifacts:
name: ios_release_artifacts
runs-on: macos-12
timeout-minutes: 120
steps:
Expand All @@ -110,78 +114,61 @@ jobs:
submodules: true
- name: 'Install dependencies'
run: ./ci/mac_ci_setup.sh
- name: 'Build Envoy.framework distributable'
- name: 'Build Envoy.xcframework'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./bazelw build \
--config=release-ios \
--ios_multi_cpus=i386,x86_64,armv7,arm64 \
--config=remote-ci-macos \
--remote_header="Authorization=Bearer $GITHUB_TOKEN" \
//library/swift:ios_framework
//:ios_xcframework
- name: 'Move Envoy.xcframework.zip'
run: mv bazel-bin/library/swift/Envoy.xcframework.zip .
- uses: actions/upload-artifact@v2
with:
name: envoy_ios_framework
path: bazel-bin/library/swift/ios_framework.zip

ios_release_artifacts_cocoapods:
name: ios_release_artifacts_cocoapods
runs-on: macos-12
timeout-minutes: 45
needs: [ios_release_artifacts_framework]
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: 'Install dependencies'
run: ./ci/mac_ci_setup.sh
- uses: actions/download-artifact@v3
with:
name: envoy_ios_framework
path: dist/envoy_ios_cocoapods
- name: 'Copy license for CocoaPods'
run: cp LICENSE dist/envoy_ios_cocoapods
- name: 'Create empty Swift sources directory'
run: mkdir -p dist/envoy_ios_cocoapods/Envoy.framework/Swift
- name: 'Create empty Swift file to force Swift libraries to link properly'
run: touch dist/envoy_ios_cocoapods/Envoy.framework/Swift/Empty.swift
name: ios_framework
path: ./Envoy.xcframework.zip
- name: 'Create temporary directory for artifact to produce properly named zip'
run: mkdir ios_framework_cocoapods
- name: 'Unzip framework to archive directory'
run: unzip Envoy.xcframework.zip -d ios_framework_cocoapods
- name: 'Copy LICENSE to archive directory'
run: cp LICENSE ios_framework_cocoapods
- name: 'Zip archive directory'
run: zip -r ios_framework_cocoapods.zip ios_framework_cocoapods
- uses: actions/upload-artifact@v2
with:
name: envoy_ios_cocoapods
path: dist/envoy_ios_cocoapods
name: ios_framework_cocoapods
path: ./ios_framework_cocoapods.zip

create_github_release:
name: create_github_release
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
timeout-minutes: 45
needs: [android_release_artifacts, ios_release_artifacts_framework, ios_release_artifacts_cocoapods]
needs: [android_release_artifacts, ios_release_artifacts]
steps:
- uses: actions/checkout@v1
with:
submodules: true
- uses: actions/download-artifact@v3
with:
name: envoy_android_aar_sources
path: ./envoy_android_aar_sources.tar.gz
- uses: actions/download-artifact@v3
with:
name: envoy_ios_framework
path: ./envoy_ios_framework.zip
name: ios_framework
- uses: actions/download-artifact@v3
with:
name: envoy_ios_cocoapods
path: ./envoy_ios_cocoapods.zip
name: ios_framework_cocoapods
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
envoy_android_aar_sources.tar.gz
envoy_ios_framework.zip
envoy_ios_cocoapods.zip
Envoy.xcframework.zip
ios_framework_cocoapods.zip

publish_to_cocoapods:
name: publish_to_cocoapods
if: startsWith(github.ref, 'refs/tags/v')
runs-on: macos-12
timeout-minutes: 45
needs: create_github_release
Expand Down
6 changes: 6 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ load("//bazel:framework_imports_extractor.bzl", "framework_imports_extractor")

licenses(["notice"]) # Apache 2

alias(
name = "ios_xcframework",
actual = "//library/swift:Envoy",
visibility = ["//visibility:public"],
)

alias(
name = "ios_dist",
actual = "//library/swift:ios_framework",
Expand Down
7 changes: 3 additions & 4 deletions EnvoyMobile.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ Pod::Spec.new do |s|
s.homepage = 'https://envoy-mobile.github.io'
s.documentation_url = 'https://envoy-mobile.github.io/docs/envoy-mobile/latest/index.html'
s.social_media_url = 'https://twitter.com/EnvoyProxy'
s.license = { type: 'Apache-2.0', file: 'LICENSE' }
s.license = { type: 'Apache-2.0', file: 'ios_framework_cocoapods/LICENSE' }
s.platform = :ios, '12.0'
s.swift_versions = ['5.5', '5.6']
s.libraries = 'resolv.9', 'c++'
s.frameworks = 'Network', 'SystemConfiguration', 'UIKit'
s.source = { http: "https://github.com/envoyproxy/envoy-mobile/releases/download/v#{s.version}/envoy_ios_cocoapods.zip" }
s.vendored_frameworks = 'Envoy.framework'
s.source_files = 'Envoy.framework/Headers/*.h', 'Envoy.framework/Swift/*.swift'
s.source = { http: "https://github.com/envoyproxy/envoy-mobile/releases/download/v#{s.version}/ios_framework_cocoapods.zip" }
s.vendored_frameworks = 'ios_framework_cocoapods/Envoy.xcframework'
s.pod_target_xcconfig = { 'APPLICATION_EXTENSION_API_ONLY' => 'YES' }
end
6 changes: 4 additions & 2 deletions bazel/envoy_mobile_repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,12 @@ def upstream_envoy_overrides():
)

def swift_repos():
# https://github.com/bazelbuild/rules_apple/pull/1443
http_archive(
name = "build_bazel_rules_apple",
sha256 = "12865e5944f09d16364aa78050366aca9dc35a32a018fa35f5950238b08bf744",
url = "https://github.com/bazelbuild/rules_apple/releases/download/0.34.2/rules_apple.0.34.2.tar.gz",
sha256 = "7644c7d75ce9e4419c3050c4786175c253f1d35564869fda0e790647d9093eb8",
strip_prefix = "rules_apple-2d1fa9ea5f3544fed41d50c28c8508af035bc0a0",
url = "https://github.com/bazelbuild/rules_apple/archive/2d1fa9ea5f3544fed41d50c28c8508af035bc0a0.tar.gz",
)

http_archive(
Expand Down
3 changes: 2 additions & 1 deletion docs/root/intro/version_history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ Breaking changes:

Bugfixes:

- None
- iOS: change release artifacts to use xcframeworks (:issue:`#2216 <2216>`)
- iOS: fix CocoaPods releases (:issue:`#2215 <2215>`)

Features:

Expand Down
24 changes: 24 additions & 0 deletions library/swift/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
load("//bazel:config.bzl", "MINIMUM_IOS_VERSION")
load("@build_bazel_rules_apple//apple:apple.bzl", "apple_static_xcframework")
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_static_framework")
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
load("//bazel:swift_header_collector.bzl", "swift_header_collector")
Expand Down Expand Up @@ -74,3 +75,26 @@ ios_static_framework(
visibility = ["//visibility:public"],
deps = ["ios_lib"],
)

apple_static_xcframework(
name = "Envoy",
ios = {
"simulator": [
"arm64",
"x86_64",
],
"device": [
"arm64",
],
},
minimum_os_versions = {
"ios": MINIMUM_IOS_VERSION,
},
# Currently the framework is over 2GB, and is not worth caching
tags = [
"no-cache",
"no-remote",
],
visibility = ["//visibility:public"],
deps = ["ios_lib"],
)