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
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ build --ios_simulator_version=15.2
build --verbose_failures
build --workspace_status_command=envoy/bazel/get_workspace_status
build --xcode_version=13.2.1
build --use_top_level_targets_for_symlinks

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea so if you use bazel transitions, which the apple rules do, you get some path like bazel-out/foo/bar-RANDOMJUNK/path/to/artifact, with this flag it also creates the usual bazel-bin/path/to/artifact. It has one limitation that it doesn't work through alias targets bazelbuild/bazel#14602 so in some cases on CI I use the real target name. Locally this shouldn't matter much since folks will just copy paste, but on CI it makes it stable

# https://github.com/bazelbuild/rules_jvm_external/issues/445
build --repo_env=JAVA_HOME=../bazel_tools/jdk
build --define disable_known_issue_asserts=true
Expand Down
51 changes: 0 additions & 51 deletions .github/workflows/android_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,14 @@ jobs:
- uses: actions/checkout@v1
with:
submodules: true
- uses: actions/cache@v2
id: check-cache
with:
key: aar-${{ github.sha }}
path: dist/envoy.aar
name: 'Check cache'
- run: echo "Found envoy.aar from previous run!"
if: steps.check-cache.outputs.cache-hit == 'true'
name: 'Build cache hit'
- uses: actions/setup-java@v1
if: steps.check-cache.outputs.cache-hit != 'true'
with:
java-version: '8'
java-package: jdk
architecture: x64
- name: 'Install dependencies'
if: steps.check-cache.outputs.cache-hit != 'true'
run: ./ci/mac_ci_setup.sh --android
- name: 'Build envoy.aar distributable'
if: steps.check-cache.outputs.cache-hit != 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand All @@ -45,7 +33,6 @@ jobs:
//:android_dist_ci
javahelloworld:
name: java_helloworld
needs: androidbuild
runs-on: macos-12
timeout-minutes: 25
steps:
Expand All @@ -59,14 +46,6 @@ jobs:
architecture: x64
- run: ./ci/mac_ci_setup.sh --android
name: 'Install dependencies'
- uses: actions/cache@v2
id: check-cache
with:
key: aar-${{ github.sha }}
path: dist/envoy.aar
name: 'Download aar'
- run: exit 1
if: steps.check-cache.outputs.cache-hit != 'true'
- name: 'Start simulator'
run: ./ci/mac_start_emulator.sh
# Return to using:
Expand All @@ -87,7 +66,6 @@ jobs:
run: adb logcat -e "received headers with status 200" -m 1
kotlinhelloworld:
name: kotlin_helloworld
needs: androidbuild
runs-on: macos-12
timeout-minutes: 25
steps:
Expand All @@ -101,15 +79,6 @@ jobs:
architecture: x64
- name: 'Install dependencies'
run: ./ci/mac_ci_setup.sh
- name: 'Download aar'
uses: actions/cache@v2
id: check-cache
with:
key: aar-${{ github.sha }}
path: dist/envoy.aar
- name: 'Short-circuit'
if: steps.check-cache.outputs.cache-hit != 'true'
run: exit 1
- name: 'Start simulator'
run: ./ci/mac_start_emulator.sh
# Return to using:
Expand All @@ -130,7 +99,6 @@ jobs:
run: adb logcat -e "received headers with status 200" -m 1
kotlinbaselineapp:
name: kotlin_baseline_app
needs: androidbuild
runs-on: macos-12
timeout-minutes: 25
steps:
Expand All @@ -144,15 +112,6 @@ jobs:
architecture: x64
- name: 'Install dependencies'
run: ./ci/mac_ci_setup.sh --android
- name: 'Download aar'
uses: actions/cache@v2
id: check-cache
with:
key: aar-${{ github.sha }}
path: dist/envoy.aar
- name: 'Short-circuit'
if: steps.check-cache.outputs.cache-hit != 'true'
run: exit 1
- name: 'Start simulator'
run: ./ci/mac_start_emulator.sh
# Return to using:
Expand All @@ -173,7 +132,6 @@ jobs:
run: adb logcat -e "received headers with status 200" -m 1
kotlinexperimentalapp:
name: kotlin_experimental_app
needs: androidbuild
runs-on: macos-12
timeout-minutes: 25
steps:
Expand All @@ -187,15 +145,6 @@ jobs:
architecture: x64
- name: 'Install dependencies'
run: ./ci/mac_ci_setup.sh
- name: 'Download aar'
uses: actions/cache@v2
id: check-cache
with:
key: aar-${{ github.sha }}
path: dist/envoy.aar
- name: 'Short-circuit'
if: steps.check-cache.outputs.cache-hit != 'true'
run: exit 1
- name: 'Start simulator'
run: ./ci/mac_start_emulator.sh
# Return to using:
Expand Down
63 changes: 1 addition & 62 deletions .github/workflows/ios_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,16 @@ jobs:
- uses: actions/checkout@v1
with:
submodules: true
- uses: actions/cache@v2
id: check-cache
with:
key: framework-${{ github.sha }}
path: dist/Envoy.framework
name: 'Check cache'
- run: echo "Found Envoy.framework from previous run!"
if: steps.check-cache.outputs.cache-hit == 'true'
name: 'Build cache hit'
- run: ./ci/mac_ci_setup.sh
if: steps.check-cache.outputs.cache-hit != 'true'
name: 'Install dependencies'
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./bazelw shutdown
./bazelw build --config=ios --config=remote-ci-macos --remote_header="Authorization=Bearer $GITHUB_TOKEN" //:ios_dist
if: steps.check-cache.outputs.cache-hit != 'true'
./bazelw build --config=ios --config=remote-ci-macos --remote_header="Authorization=Bearer $GITHUB_TOKEN" //library/swift:ios_framework
name: 'Build Envoy.framework distributable'
swifthelloworld:
name: swift_helloworld
needs: iosbuild
runs-on: macos-12
timeout-minutes: 25
steps:
Expand All @@ -45,15 +33,6 @@ jobs:
submodules: true
- run: ./ci/mac_ci_setup.sh
name: 'Install dependencies'
- uses: actions/cache@v2
id: check-cache
with:
key: framework-${{ github.sha }}
path: dist/Envoy.framework
name: 'Download framework'
- run: exit 1
if: steps.check-cache.outputs.cache-hit != 'true'
name: 'Short-circuit'
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./bazelw build --config=ios --config=remote-ci-macos --remote_header="Authorization=Bearer $GITHUB_TOKEN" //examples/swift/hello_world:app
Expand All @@ -70,7 +49,6 @@ jobs:
name: 'Log app run'
swiftbaselineapp:
name: swift_baseline_app
needs: iosbuild
runs-on: macos-12
timeout-minutes: 25
steps:
Expand All @@ -79,15 +57,6 @@ jobs:
submodules: true
- run: ./ci/mac_ci_setup.sh
name: 'Install dependencies'
- uses: actions/cache@v2
id: check-cache
with:
key: framework-${{ github.sha }}
path: dist/Envoy.framework
name: 'Download framework'
- run: exit 1
if: steps.check-cache.outputs.cache-hit != 'true'
name: 'Short-circuit'
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./bazelw build --config=ios --config=remote-ci-macos --remote_header="Authorization=Bearer $GITHUB_TOKEN" //test/swift/apps/baseline:app
Expand All @@ -104,7 +73,6 @@ jobs:
name: 'Log app run'
swiftexperimentalapp:
name: swift_experimental_app
needs: iosbuild
runs-on: macos-12
timeout-minutes: 25
steps:
Expand All @@ -113,15 +81,6 @@ jobs:
submodules: true
- run: ./ci/mac_ci_setup.sh
name: 'Install dependencies'
- uses: actions/cache@v2
id: check-cache
with:
key: framework-${{ github.sha }}
path: dist/Envoy.framework
name: 'Download framework'
- run: exit 1
if: steps.check-cache.outputs.cache-hit != 'true'
name: 'Short-circuit'
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./bazelw build --config=ios --config=remote-ci-macos --remote_header="Authorization=Bearer $GITHUB_TOKEN" //test/swift/apps/experimental:app
Expand All @@ -138,7 +97,6 @@ jobs:
name: 'Log app run'
swiftasyncawait:
name: swift_async_await
needs: iosbuild
runs-on: macos-12
timeout-minutes: 25
steps:
Expand All @@ -147,15 +105,6 @@ jobs:
submodules: true
- run: ./ci/mac_ci_setup.sh
name: 'Install dependencies'
- uses: actions/cache@v2
id: check-cache
with:
key: framework-${{ github.sha }}
path: dist/Envoy.framework
name: 'Download framework'
- run: exit 1
if: steps.check-cache.outputs.cache-hit != 'true'
name: 'Short-circuit'
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./bazelw build --config=ios --config=remote-ci-macos --remote_header="Authorization=Bearer $GITHUB_TOKEN" //examples/swift/async_await:app
Expand All @@ -172,7 +121,6 @@ jobs:
name: 'Log app run'
objchelloworld:
name: objc_helloworld
needs: iosbuild
runs-on: macos-12
timeout-minutes: 25
steps:
Expand All @@ -181,15 +129,6 @@ jobs:
submodules: true
- run: ./ci/mac_ci_setup.sh
name: 'Install dependencies'
- uses: actions/cache@v2
id: check-cache
with:
key: framework-${{ github.sha }}
path: dist/Envoy.framework
name: 'Download framework'
- run: exit 1
if: steps.check-cache.outputs.cache-hit != 'true'
name: 'Short-circuit'
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./bazelw build --config=ios --config=remote-ci-macos --remote_header="Authorization=Bearer $GITHUB_TOKEN" //examples/objective-c/hello_world:app
Expand Down
38 changes: 17 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
--remote_header="Authorization=Bearer $GITHUB_TOKEN" \
//:android_dist_ci
- name: 'Tar artifacts'
run: tar -czvf envoy_android_aar_sources.tar.gz dist/envoy.aar dist/envoy-pom.xml dist/envoy-javadoc.jar dist/envoy-sources.jar
run: tar -czvf envoy_android_aar_sources.tar.gz bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy.aar bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy-pom.xml bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy-sources.jar bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy-javadoc.jar
- uses: actions/upload-artifact@v2
with:
name: envoy_android_aar_sources
Expand All @@ -52,7 +52,7 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: envoy_android_aar_sources
path: dist/
path: .
- run: tar -xvf dist/envoy_android_aar_sources.tar.gz
- name: 'Configure envoy-bot git user'
run: |
Expand All @@ -75,30 +75,30 @@ jobs:
gpg --passphrase $GPG_PASSPHRASE --batch --import signing-key
shred signing-key

gpg --pinentry-mode=loopback --passphrase $GPG_PASSPHRASE -ab dist/envoy.aar
gpg --pinentry-mode=loopback --passphrase $GPG_PASSPHRASE -ab dist/envoy-pom.xml
gpg --pinentry-mode=loopback --passphrase $GPG_PASSPHRASE -ab dist/envoy-javadoc.jar
gpg --pinentry-mode=loopback --passphrase $GPG_PASSPHRASE -ab dist/envoy-sources.jar
gpg --pinentry-mode=loopback --passphrase $GPG_PASSPHRASE -ab bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy.aar -o aar.asc
gpg --pinentry-mode=loopback --passphrase $GPG_PASSPHRASE -ab bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy-pom.xml -o xml.asc
gpg --pinentry-mode=loopback --passphrase $GPG_PASSPHRASE -ab bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy-javadoc.jar -o javadoc.asc
gpg --pinentry-mode=loopback --passphrase $GPG_PASSPHRASE -ab bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy-sources.jar -o sources.asc
- name: 'Release to sonatype repository'
env:
READWRITE_USER: ${{ secrets.sonatype_user }}
READWRITE_API_KEY: ${{ secrets.sonatype_password }}
ENVOY_PROXY_PROFILE_ID: ${{ secrets.envoy_proxy_profile_id }}
run: |
current_release_tag=$(git describe --tags --abbrev=0 --exact-match)
python dist/sonatype_nexus_upload.py \
python ci/sonatype_nexus_upload.py \
--profile_id=$ENVOY_PROXY_PROFILE_ID \
--version="${current_release_tag:1}" \
--files \
dist/envoy.aar \
dist/envoy-pom.xml \
dist/envoy-sources.jar \
dist/envoy-javadoc.jar \
bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy.aar \
bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy-pom.xml \
bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy-sources.jar \
bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy-javadoc.jar \
--signed_files \
dist/envoy-sources.jar.asc \
dist/envoy.aar.asc \
dist/envoy-pom.xml.asc \
dist/envoy-javadoc.jar.asc
sources.asc \
aar.asc \
xml.asc \
javadoc.asc

ios_release_artifacts_framework:
name: ios_release_artifacts_framework
Expand All @@ -119,15 +119,11 @@ jobs:
--ios_multi_cpus=i386,x86_64,armv7,arm64 \
--config=remote-ci-macos \
--remote_header="Authorization=Bearer $GITHUB_TOKEN" \
//:ios_dist
- 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
//library/swift:ios_framework
- uses: actions/upload-artifact@v2
with:
name: envoy_ios_framework
path: dist/ios_artifact
path: bazel-bin/library/swift/ios_framework.zip

ios_release_artifacts_cocoapods:
name: ios_release_artifacts_cocoapods
Expand Down
10 changes: 1 addition & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,7 @@
.vscode
/bazel-*
/build_*
/dist/*pom.xml
/dist/*.aar
/dist/*.jar
/dist/*.objdump
/dist/*.objdump.gz
/dist/envoy_aar_sources.zip
/dist/Envoy.framework
/dist/*.asc
/dist/*.sha256
/dist/
/generated
/test/coverage/BUILD
/tmp
Expand Down
Loading