From 8382219669215a1aa3f32fcc3026ef8042217efc Mon Sep 17 00:00:00 2001 From: Wei18 <41205mw@gmail.com> Date: Tue, 6 Feb 2024 00:24:05 +0800 Subject: [PATCH] Add job build in ci.yml --- .github/workflows/DeployCocoaPods.yml | 1 - .github/workflows/ci.yml | 38 ++++++++++++++++++++++----- .gitignore | 1 + 3 files changed, 32 insertions(+), 8 deletions(-) diff --git a/.github/workflows/DeployCocoaPods.yml b/.github/workflows/DeployCocoaPods.yml index bce7db9c4..f70a0bd43 100644 --- a/.github/workflows/DeployCocoaPods.yml +++ b/.github/workflows/DeployCocoaPods.yml @@ -18,7 +18,6 @@ jobs: COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} run: | set -eo pipefail - pod lib lint --allow-warnings pod trunk push --allow-warnings diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f0610934..a3c91ce39 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,15 +6,39 @@ on: - develop jobs: - xcode: - runs-on: macos-11 + + build: strategy: - matrix: - xcode: ["12.5.1", "13.2.1"] fail-fast: false - name: Xcode ${{ matrix.xcode }} + matrix: + xcode: + # - "12.5.1" + - "13.2.1" + os: + - macos-11 + # - macos-latest + + runs-on: ${{ matrix.os }} env: DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" steps: - - uses: actions/checkout@v2 - - run: xcodebuild clean build test -workspace ActionSheetPicker-3.0.xcworkspace -scheme CoreActionSheetPicker -sdk iphonesimulator -destination "name=iPhone 11 Pro" | xcpretty -c + - uses: actions/checkout@v4 + + - name: "Build SwiftPackage" + run: | + # Starting with Xcode 11, xcodebuild supports SwiftPM packages out of the box. + # ref: https://stackoverflow.com/a/62246008/9801139 + xcodebuild clean build \ + -scheme CoreActionSheetPicker \ + -sdk iphonesimulator \ + -destination "name=iPhone 11 Pro" + + - name: "Build CocoaPods" + run: | + gem install cocoapods + pod lib lint --allow-warnings + + - name: "Build Carthage" + run: | + brew install carthage + carthage build --no-skip-current diff --git a/.gitignore b/.gitignore index 94ef148c8..5589e14c6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.DS_Store Example Projects/Carthage-example/Carthage/Checkouts ### Xcode ###