Skip to content

Update ci.yml

Update ci.yml #32

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches:
- master
- develop
- develop-**
pull_request:
branches:
- master
- develop
- develop-**
env:
LANG: en_US.UTF-8
BSDiff_WORKSPACE: "BSDiff.xcworkspace"
BSDiff_PROJECT: "BSDiff.xcodeproj"
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Cocoapods_Lint:
runs-on: macOS-14
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: cocoapods_lint
run: pod lib lint --allow-warnings --verbose
Carthage_Lint:
runs-on: macOS-13
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: carthage_lint
run: carthage build --no-skip-current --use-xcframeworks
Build_Examples:
runs-on: macOS-14
strategy:
matrix:
sdk: [ iOS16.4, iOS17.5 ]
include:
- sdk: iOS17.5
developer_dir: /Applications/Xcode_15.0.1.app
destination: OS=17.5,name=iPhone 15 Pro
scheme: BSDiffExample
- sdk: iOS16.4
developer_dir: /Applications/Xcode_14.3.1.app
destination: OS=16.4,name=iPhone 14 Pro
scheme: BSDiffExample
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: bundle_install
run: |
xcrun simctl list
bundle install
pod install
- name: build_examples
env:
DEVELOPER_DIR: ${{ matrix.developer_dir }}
run: |
echo ""
set -o pipefail
xcodebuild -version -sdk
xcodebuild build -workspace "${{ env.BSDiff_WORKSPACE }}" -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO | bundle exec xcpretty -c;
Unit_Tests:
runs-on: macOS-14
strategy:
matrix:
sdk: [iOS17.5]
include:
- sdk: iOS17.5
developer_dir: /Applications/Xcode_15.0.1.app
destination: OS=17.5,name=iPhone 15 Pro
scheme: BSDiff
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: bundle_install
run: |
xcrun simctl list
bundle install
- name: unit_tests
env:
DEVELOPER_DIR: ${{ matrix.developer_dir }}
run: |
set -o pipefail
xcodebuild build build-for-testing -project "${{ env.BSDiff_PROJECT }}" -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" -configuration Debug ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES ONLY_ACTIVE_ARCH=YES | bundle exec xcpretty -c;
xcodebuild analyze test-without-building -project "${{ env.BSDiff_PROJECT }}" -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" -configuration Debug ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES ONLY_ACTIVE_ARCH=YES | bundle exec xcpretty -c;
- uses: codecov/codecov-action@v1