-
Notifications
You must be signed in to change notification settings - Fork 34
57 lines (53 loc) · 1.54 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
name: Swift Build & Test
on:
workflow_dispatch:
push:
branches: [ tretnfckit-main ]
pull_request:
branches: [ tretnfckit-main ]
env:
XCODE_SELECT_PATH: '/Applications/Xcode_15.2.app/Contents/Developer'
jobs:
show_software_information:
name: Show software information
strategy:
fail-fast: false
matrix:
os: [macos-13, ubuntu-20.04, ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Show Swift version
run: swift --version
- name: Show Swift Package Manager version
run: swift package --version
swift-build:
name: Swift Build & Test
strategy:
fail-fast: false
matrix:
os: [macos-13, ubuntu-20.04, ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set Xcode version
if: matrix.os == 'macos-13'
run: sudo xcode-select -s '${{ env.XCODE_SELECT_PATH }}'
- name: Build
run: swift build -v | tee swift-build_${{ matrix.os }}.log && exit ${PIPESTATUS[0]}
- name: Upload build log
if: always()
uses: actions/upload-artifact@v4
with:
name: swift build log (${{ matrix.os }})
path: |
swift-build_${{ matrix.os }}.log
- name: Test
run: swift test -v | tee swift-test_${{ matrix.os }}.log && exit ${PIPESTATUS[0]}
- name: Upload test log
if: always()
uses: actions/upload-artifact@v4
with:
name: swift test log (${{ matrix.os }})
path: |
swift-test_${{ matrix.os }}.log