Skip to content

Commit

Permalink
ci: add jobs for building iOS demo apps (#373)
Browse files Browse the repository at this point in the history
Adds 2 new jobs that build the Swift and Objective-C demo apps on CI.

Note that the `Envoy.framework` artifact has to be zipped during upload and unzipped during download since the upload/download GitHub actions seem to use the _contents_ of `Envoy.framework` instead of the whole folder (and thus incorrectly end up with the contents of `Envoy.framework` in `dist/` after downloading instead of an `Envoy.framework`).

These will be used to validate that the demos continue to work properly.

Signed-off-by: Michael Rebello <me@michaelrebello.com>
Signed-off-by: JP Simard <jp@jpsim.com>
  • Loading branch information
rebello95 authored and jpsim committed Nov 29, 2022
1 parent 0518e0c commit c550bc5
Showing 1 changed file with 48 additions and 7 deletions.
55 changes: 48 additions & 7 deletions mobile/.github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,45 @@ name: ios
on: [push]

jobs:
# TODO: need to add back objc demo once https://github.com/lyft/envoy-mobile/issues/230
# is closed.
macdist:
name: mac_dist
runs-on: macOS-10.14
timeout-minutes: 45
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: 'Install dependencies'
run: ./ci/mac_ci_setup.sh
- name: 'Build Envoy.framework distributable'
run: |
./bazelw build --config=ios //:ios_dist
- run: ./bazelw build --config=ios //examples/swift/hello_world:app
name: 'Build swift app'
run: ./bazelw build --config=ios //:ios_dist
- name: 'Zip Envoy.framework.zip distributable'
run: zip -r dist/Envoy.framework.zip dist/Envoy.framework
- run: ls -lh dist/
- uses: actions/upload-artifact@v1
with:
name: Envoy.framework.zip
path: dist/Envoy.framework.zip
macswift:
name: mac_swift_helloworld
needs: macdist
runs-on: macOS-10.14
timeout-minutes: 45
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: 'Install dependencies'
run: ./ci/mac_ci_setup.sh
- uses: actions/download-artifact@v1
with:
name: Envoy.framework.zip
path: dist/
- run: unzip dist/Envoy.framework.zip
- run: ls -lh dist/
- name: 'Build swift app'
run: ./bazelw build --config=ios //examples/swift/hello_world:app
# TODO: re-enable liveliness test.
# TODO: re-enable objc app once https://github.com/lyft/envoy-mobile/issues/230 closes.
# - run: npm install -g ios-sim && ios-sim start --devicetypeid "iPhone-X, 12.2"
# name: 'Start the iOS simulator'
# # Run the app in the background and redirect logs.
Expand All @@ -32,6 +53,26 @@ jobs:
# # Check for the sentinel value that shows the app is alive and well.
# - run: cat /tmp/envoy.log | grep 'Hello, world!'
# name: 'Check liveliness'
macobjc:
name: mac_objc_helloworld
needs: macdist
runs-on: macOS-10.14
timeout-minutes: 45
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: 'Install dependencies'
run: ./ci/mac_ci_setup.sh
- uses: actions/download-artifact@v1
with:
name: Envoy.framework.zip
path: dist/
- run: unzip dist/Envoy.framework.zip
- run: ls -lh dist/
- name: 'Build objective-c app'
run: ./bazelw build --config=ios //examples/objective-c/hello_world:app
# TODO: re-enable liveliness test (same as swift).
swifttests:
name: swift_tests
runs-on: macOS-10.14
Expand Down

0 comments on commit c550bc5

Please sign in to comment.