Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
65 changes: 16 additions & 49 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ jobs:
dist/envoy-pom.xml.asc \
dist/envoy-javadoc.jar.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,79 +110,46 @@ 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" \
//:ios_dist
//:ios_xcframework
- name: 'Create temporary directory for artifact to produce properly named zip'
run: mkdir -p dist/ios_artifact/Envoy.framework
- name: 'Move artifact to directory for zipping'
run: mv dist/Envoy.framework/* dist/ios_artifact/Envoy.framework
run: mkdir ios_framework
- name: 'Unzip framework to archive directory'
run: unzip bazel-bin/library/swift/Envoy.xcframework.zip -d ios_framework
- name: 'Copy LICENSE to archive directory'
run: cp LICENSE ios_framework
- name: 'Zip archive directory'
run: zip -r ios_framework.zip ios_framework
- uses: actions/upload-artifact@v2
with:
name: envoy_ios_framework
path: dist/ios_artifact

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
- uses: actions/upload-artifact@v2
with:
name: envoy_ios_cocoapods
path: dist/envoy_ios_cocoapods
name: ios_framework
path: ./ios_framework.zip

create_github_release:
name: create_github_release
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
- uses: actions/download-artifact@v3
with:
name: envoy_ios_cocoapods
path: ./envoy_ios_cocoapods.zip
name: ios_framework
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
envoy_android_aar_sources.tar.gz
envoy_ios_framework.zip
envoy_ios_cocoapods.zip
ios_framework.zip

publish_to_cocoapods:
name: publish_to_cocoapods
Expand Down
6 changes: 6 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ alias(
visibility = ["//visibility:public"],
)

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

genrule(
name = "ios_dist",
srcs = [":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/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.zip" }
s.vendored_frameworks = 'ios_framework/Envoy.xcframework'
s.pod_target_xcconfig = { 'APPLICATION_EXTENSION_API_ONLY' => 'YES' }
end
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
28 changes: 28 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_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,30 @@ ios_static_framework(
visibility = ["//visibility:public"],
deps = ["ios_lib"],
)

apple_xcframework(
name = "Envoy",
bundle_id = "io.envoyproxy.envoymobile",
infoplists = [
"//library/swift/resources:Info.plist",
],
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"],
)
6 changes: 6 additions & 0 deletions library/swift/resources/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
licenses(["notice"])

exports_files(
Comment thread
jpsim marked this conversation as resolved.
Outdated
["Info.plist"],
visibility = ["//visibility:public"],
)
16 changes: 16 additions & 0 deletions library/swift/resources/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
</dict>
</plist>