File: Swift.yml

package info (click to toggle)
duckdb 1.5.1-3
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 299,196 kB
  • sloc: cpp: 865,414; ansic: 57,292; python: 18,871; sql: 12,663; lisp: 11,751; yacc: 7,412; lex: 1,682; sh: 747; makefile: 564
file content (87 lines) | stat: -rw-r--r-- 2,790 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Swift
on:
  workflow_dispatch:
  repository_dispatch:
  push:
    branches-ignore:
      - 'main'
      - 'feature'
      - 'v*.*-*'
    paths-ignore:
      - '**.md'
      - 'examples/**'
      - 'test/**'
      - 'tools/**'
      - '!tools/swift/**'
      - '.github/patches/duckdb-wasm/**'
      - '.github/workflows/**'
      - '!.github/workflows/Swift.yml'
      - '.github/config/extensions/*.cmake'
      - '.github/patches/extensions/**/*.patch'
  merge_group:
  pull_request:
    types: [opened, reopened, ready_for_review, converted_to_draft]
    paths-ignore:
      - '**.md'
      - 'examples/**'
      - 'test/**'
      - 'tools/**'
      - '!tools/swift/**'
      - '.github/patches/duckdb-wasm/**'
      - '.github/workflows/**'
      - '!.github/workflows/Swift.yml'
      - '.github/config/extensions/*.cmake'
      - '.github/patches/extensions/**/*.patch'

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }}
  cancel-in-progress: true

jobs:
  check-draft:
    # We run all other jobs on PRs only if they are not draft PR
    if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
    runs-on: ubuntu-24.04
    steps:
      - name: Preliminary checks on CI 
        run: echo "Event name is ${{ github.event_name }}"

  test-apple-platforms:
    name: Test Apple Platforms
    needs: check-draft
    strategy:
      matrix:
        # destinations need to match selected version of Xcode
        # https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md#installed-simulators
        destination:
          - 'macOS'
          - 'iOS Simulator,name=iPhone 16'
          - 'tvOS Simulator,name=Apple TV 4K (at 1080p) (3nd generation)'
        isRelease:
          - ${{ github.ref == 'refs/heads/main' }}
        exclude:
          - isRelease: false
            destination: 'iOS Simulator,name=iPhone 16'
          - isRelease: false
            destination: 'tvOS Simulator,name=Apple TV 4K (at 1080p) (3nd generation)'
    runs-on: macos-14
    steps:

      - name: Checkout
        uses: actions/checkout@v4
        with:
          # we need tags for the ubiquity build script to run without errors
          fetch-depth: '0'

      - name: Prepare Package
        run: python3 tools/swift/create_package.py tools/swift

      - name: Select Xcode
        run: sudo xcode-select -switch /Applications/Xcode_15.4.app && /usr/bin/xcodebuild -version

      - name: Run Tests
        run: |
          xcrun xcodebuild test \
            -workspace tools/swift/duckdb-swift/DuckDB.xcworkspace \
            -scheme DuckDB \
            -destination platform='${{ matrix.destination }}'