From c482c82d3a43488b6f92b69d83f54fe830e6e9b2 Mon Sep 17 00:00:00 2001 From: Jordan Maples Date: Tue, 11 Aug 2020 16:08:16 -0700 Subject: [PATCH 1/4] experimenting with splitting the yml files into their own runs --- .github/workflows/{main.yml => android.yml} | 44 ------------------ .github/workflows/ios.yml | 51 +++++++++++++++++++++ 2 files changed, 51 insertions(+), 44 deletions(-) rename .github/workflows/{main.yml => android.yml} (54%) create mode 100644 .github/workflows/ios.yml diff --git a/.github/workflows/main.yml b/.github/workflows/android.yml similarity index 54% rename from .github/workflows/main.yml rename to .github/workflows/android.yml index 8a9ca62..f99c078 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/android.yml @@ -6,50 +6,6 @@ on: branches: [ master ] jobs: - iOS: - runs-on: macos-latest - defaults: - run: - working-directory: build - steps: - - uses: actions/checkout@v2 - - - name: Create build directory - run: mkdir -p build - working-directory: . - - - name: Configure - run: | - cmake \ - -GXcode \ - -DCMAKE_SYSTEM_NAME=iOS \ - "-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64" \ - -DCMAKE_OSX_DEPLOYMENT_TARGET=8 \ - -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY \ - "-DMACOSX_BUNDLE_GUI_IDENTIFIER=GSL.\$(EXECUTABLE_NAME)" \ - -DMACOSX_BUNDLE_BUNDLE_VERSION=3.0.1 \ - -DMACOSX_BUNDLE_SHORT_VERSION_STRING=3.0.1 \ - .. - - - name: Build - run: cmake --build . --parallel `sysctl -n hw.ncpu` --config Release -- -sdk iphonesimulator - - - name: Start simulator - run: | - RUNTIME=`xcrun simctl list runtimes iOS -j|jq '.runtimes|last.identifier'` - UDID=`xcrun simctl list devices iPhone available -j|jq -r ".devices[$RUNTIME]|last.udid"` - xcrun simctl bootstatus $UDID -b - - - name: Test - run: | - for TEST in `find tests/Release-iphonesimulator -depth 1 -name "*.app"` - do - xcrun simctl install booted $TEST - TEST_ID=`plutil -convert json -o - $TEST/Info.plist|jq -r ".CFBundleIdentifier"` - xcrun simctl launch --console booted $TEST_ID - xcrun simctl uninstall booted $TEST_ID - done - Android: runs-on: macos-latest defaults: diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml new file mode 100644 index 0000000..ef22bf5 --- /dev/null +++ b/.github/workflows/ios.yml @@ -0,0 +1,51 @@ +name: CI +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + iOS: + runs-on: macos-latest + defaults: + run: + working-directory: build + steps: + - uses: actions/checkout@v2 + + - name: Create build directory + run: mkdir -p build + working-directory: . + + - name: Configure + run: | + cmake \ + -GXcode \ + -DCMAKE_SYSTEM_NAME=iOS \ + "-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=8 \ + -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY \ + "-DMACOSX_BUNDLE_GUI_IDENTIFIER=GSL.\$(EXECUTABLE_NAME)" \ + -DMACOSX_BUNDLE_BUNDLE_VERSION=3.0.1 \ + -DMACOSX_BUNDLE_SHORT_VERSION_STRING=3.0.1 \ + .. + + - name: Build + run: cmake --build . --parallel `sysctl -n hw.ncpu` --config Release -- -sdk iphonesimulator + + - name: Start simulator + run: | + RUNTIME=`xcrun simctl list runtimes iOS -j|jq '.runtimes|last.identifier'` + UDID=`xcrun simctl list devices iPhone available -j|jq -r ".devices[$RUNTIME]|last.udid"` + xcrun simctl bootstatus $UDID -b + + - name: Test + run: | + for TEST in `find tests/Release-iphonesimulator -depth 1 -name "*.app"` + do + xcrun simctl install booted $TEST + TEST_ID=`plutil -convert json -o - $TEST/Info.plist|jq -r ".CFBundleIdentifier"` + xcrun simctl launch --console booted $TEST_ID + xcrun simctl uninstall booted $TEST_ID + done From 13f57a1e700ad62e59f5f747cdd2fed151c72602 Mon Sep 17 00:00:00 2001 From: Jordan Maples Date: Tue, 11 Aug 2020 16:28:37 -0700 Subject: [PATCH 2/4] update ci names --- .github/workflows/android.yml | 2 +- .github/workflows/ios.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index f99c078..f53c428 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -1,4 +1,4 @@ -name: CI +name: CI_Android on: push: branches: [ master ] diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index ef22bf5..e6330bb 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -1,4 +1,4 @@ -name: CI +name: CI_iOS on: push: branches: [ master ] From 97cb97c685cbbf947647ca7b6fa3be1ecc27c065 Mon Sep 17 00:00:00 2001 From: Jordan Maples Date: Tue, 11 Aug 2020 16:30:48 -0700 Subject: [PATCH 3/4] readme update for the updated badges --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 99a0d34..f117daf 100644 --- a/README.md +++ b/README.md @@ -45,8 +45,8 @@ If you successfully port GSL to another platform, we would love to hear from you Target | CI/CD Status :------- | -----------: -iOS | ![CI](https://github.com/microsoft/GSL/workflows/CI/badge.svg) -Android | ![CI](https://github.com/microsoft/GSL/workflows/CI/badge.svg) +iOS | ![CI](https://github.com/microsoft/GSL/workflows/CI_iOS/badge.svg) +Android | ![CI](https://github.com/microsoft/GSL/workflows/CI_Android/badge.svg) Note: These CI/CD steps are run with each pull request, however failures in them are non-blocking. From bf0697be716067991e1de3188afdd8c3b7ef61f3 Mon Sep 17 00:00:00 2001 From: Jordan Maples Date: Tue, 11 Aug 2020 16:46:41 -0700 Subject: [PATCH 4/4] update readme to have the correct asset badges. This will render correctly when it's merged into the main repo --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f117daf..833895d 100644 --- a/README.md +++ b/README.md @@ -45,8 +45,8 @@ If you successfully port GSL to another platform, we would love to hear from you Target | CI/CD Status :------- | -----------: -iOS | ![CI](https://github.com/microsoft/GSL/workflows/CI_iOS/badge.svg) -Android | ![CI](https://github.com/microsoft/GSL/workflows/CI_Android/badge.svg) +iOS | ![CI_iOS](https://github.com/microsoft/GSL/workflows/CI_iOS/badge.svg) +Android | ![CI_Android](https://github.com/microsoft/GSL/workflows/CI_Android/badge.svg) Note: These CI/CD steps are run with each pull request, however failures in them are non-blocking.