name: Build
on: push
jobs:
  build:
    name: build
    runs-on: macos-latest
    steps:
      - name: Checkout
        uses: actions/checkout@master
        with:
          fetch-depth: 1
      - name: libxml
        run: brew install libxml2
      - name: Swift build macOS
        run: |
          swift build  
      - name: Xcode build macOS
        run: |
          xcodebuild -scheme "OAuthSwiftMacOS"
      - name: Swift build iOS
        run: |
          sdk=`xcrun -sdk iphonesimulator -show-sdk-path`
          sdkVersion=`echo $sdk | sed -E 's/.*iPhoneSimulator(.*)\.sdk/\1/'`
          swift build  -Xswiftc "-sdk" -Xswiftc "$sdk" -Xswiftc "-target" -Xswiftc "x86_64-apple-ios$sdkVersion-simulator"
      - name: Xcode build iOS
        run: |
          xcodebuild -scheme "OAuthSwift"
name: Build
on: push
jobs:
  build:
    name: build
    runs-on: macos-latest
    steps:
      - name: Checkout
        uses: actions/checkout@master
        with:
          fetch-depth: 1
      - name: libxml
        run: brew install libxml2
      - name: Swift build macOS
        run: |
          swift build  
      - name: Xcode build macOS
        run: |
          xcodebuild -scheme "OAuthSwiftMacOS" | xcpretty 
      - name: Swift build iOS
        run: |
          sdk=`xcrun -sdk iphonesimulator -show-sdk-path`
          sdkVersion=`echo $sdk | sed -E 's/.*iPhoneSimulator(.*)\.sdk/\1/'`
          swift build  -Xswiftc "-sdk" -Xswiftc "$sdk" -Xswiftc "-target" -Xswiftc "x86_64-apple-ios$sdkVersion-simulator"
      - name: Xcode build iOS
        run: |
          xcodebuild -scheme "OAuthSwift" -sdk iphonesimulator | xcpretty 
      - name: Xcode build mac Catalyst
        run: |
          xcodebuild -scheme "OAuthSwift" | xcpretty
Build for catalyst and ios in two step
Build for catalyst and ios in two step
