-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (60 loc) · 1.86 KB
/
ci-macOS.yml
File metadata and controls
68 lines (60 loc) · 1.86 KB
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
name: MacOS CI
on:
workflow_call:
inputs:
os:
default: '["macos-14", "macos-latest"]'
description: 'The macOS versions to execute the job on'
required: false
type: string
build_modes:
default: '["debug", "release"]'
description: 'The build modes to execute the job on'
required: false
type: string
xcode_version:
default: 'latest'
description: 'The Xcode version to execute the job on'
required: false
type: string
secrets:
SSH_PRIVATE_KEY:
required: true
jobs:
build_macos:
strategy:
matrix:
os: ${{ fromJSON(inputs.os) }}
# swift: ${{ fromJSON(inputs.swift_versions) }}
build_mode: ${{ fromJSON(inputs.build_modes) }}
name: Swift ${{ matrix.build_mode }} CI for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ inputs.xcode_version }}
#- name: Install guunits
# uses: mipalgu/install-guunits@main
- name: Setup SSH Key
uses: webfactory/ssh-agent@v0.5.4
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Checkout repo
uses: actions/checkout@v4
#- name: Reconfigure Private Repo URLs
# run: sed -i 's/git@github.com:/https:\/\/${{ secrets.ACCESS_TOKEN }}@github.com\//g' Package.swift
- name: build
run: swift build -c ${{ matrix.build_mode }}
- name: Test
run: swift test -c ${{ matrix.build_mode }}
ci-macos-report:
runs-on: ubuntu-latest
needs: build_macos
if: always()
steps:
- name: All tests ok
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Some tests failed
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1