-
-
Notifications
You must be signed in to change notification settings - Fork 618
63 lines (58 loc) · 1.8 KB
/
swift.yml
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
# This workflow will build a Swift project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift
name: Swift
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
linux_build:
runs-on: ubuntu-latest
steps:
- name: Setup Swift
# You may pin to the exact commit or the version.
# uses: swift-actions/setup-swift@65540b95f51493d65f5e59e97dcef9629ddf11bf
uses: swift-actions/[email protected]
with:
# Swift version to configure
swift-version: 5.8 # default is 5.8
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1
with:
ruby-version: '3.1'
- name: Install dependencies
run: |
sudo apt install libffi-dev
sudo apt install build-essential
sudo apt install libsqlite3-dev
sudo apt-get install libncurses5-dev
shell: bash
- name: Bundle Install
run: bundle install
- name: Swift Build
run: swift build -v
- name: Run tests
run: swift test -v
macos_build:
runs-on: macos-13
steps:
- name: List Xcodes
run: ls -n /Applications/ | grep Xcode*
shell: bash
- name: Print Current Xcode
run: xcode-select -p
# - name: Set Xcode 14.3.1
# run: sudo xcode-select -s /Applications/Xcode_14.3.1.app/Contents/Developer
- name: Set Xcode 15.0 Beta
run: sudo xcode-select -s /Applications/Xcode_15.0.app/Contents/Developer
- name: Print Current Xcode
run: xcode-select -p
- uses: actions/checkout@v3
- name: Bundle Install
run: bundle install
- name: Swift Build
run: swift build -v
- name: Run tests
run: swift test -v