From 392f8598305d9ca646cfad838a3585f9f9598c32 Mon Sep 17 00:00:00 2001 From: "Vladimir (Alkenso)" Date: Fri, 20 Oct 2023 11:01:47 +0300 Subject: [PATCH] Create CI build to verify code --- .github/workflows/main.yml | 50 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..d6f7e94 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,50 @@ +name: CI + +on: + push: + branches: ["main"] + pull_request: + branches: "*" + +jobs: + build: + strategy: + matrix: + include: + - xcode: "14.2" # Swift 5.7 + macOS: "13" + iOS: "16.0" + - xcode: "15.0" # Swift 5.9 + macOS: "13" + iOS: "17.0" + fail-fast: false + + runs-on: macos-${{ matrix.macOS }} + name: Build with Xcode ${{ matrix.xcode }} on macOS ${{ matrix.macOS }} + + steps: + - uses: actions/checkout@v3 + + - name: Xcode Select Version + uses: mobiledevops/xcode-select-version-action@v1 + with: + xcode-select-version: ${{ matrix.xcode }} + - run: xcodebuild -version + + - name: Test macOS with Xcode ${{ matrix.xcode }} + run: | + set -e + set -o pipefail + + xcodebuild test -scheme SwiftSpellbook-Package -destination "platform=macOS" SWIFT_ACTIVE_COMPILATION_CONDITIONS="SPELLBOOK_SLOW_CI_x20" | xcpretty + + # Temporary disabled + # - name: Test iOS with Xcode ${{ matrix.xcode }} + # run: | + # set -e + # set -o pipefail + + # xcodebuild test -scheme SwiftSpellbook-Package -sdk iphonesimulator -destination "$IOS_DEVICE" SWIFT_ACTIVE_COMPILATION_CONDITIONS="SPELLBOOK_SLOW_CI_x20" | xcpretty + # env: + # IOS_DEVICE: "platform=iOS Simulator,OS=${{ matrix.iOS }},name=iPhone 14" +