-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (49 loc) · 1.49 KB
/
wrkstrm-foundation-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
name: "\U0001F3CE️ Swift Build| WrkstrmFoundation"
on:
push:
branches:
- main
paths:
- '**'
pull_request:
branches:
- main
jobs:
swift-build:
strategy:
matrix:
os:
- macos-14
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Cache SPM dependencies
id: cache-spm
uses: actions/cache@v4
with:
path: apple/WrkstrmFoundation/.build
restore-keys: ${{ runner.os }}-spm-WrkstrmFoundation-
key: ${{ runner.os }}-spm-WrkstrmFoundation-${{ hashFiles('**/Package.resolved')
}}
- name: Check Cache
run: 'echo ''Cache hit: ${{ steps.cache-spm.outputs.cache-hit }}'''
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
if: matrix.os == 'macos-latest' || matrix.os == 'macos-14' || matrix.os == 'self-hosted'
with:
xcode-version: '15.3'
- name: Swift Describe
if: steps.cache-spm.outputs.cache-hit != 'true'
run: swift package describe --type json
- name: Set CI Style
run: echo "SPM_CI_USE_LOCAL_DEPS=false" >> $GITHUB_ENV
- name: Check CI Style
run: '[ -z "${SPM_CI_USE_LOCAL_DEPS}" ] && echo "SPM_CI_LOCAL_DEPS is not set"
|| echo "SPM_CI_USE_LOCAL_DEPS is set to ${SPM_CI_USE_LOCAL_DEPS}"'
env:
SPM_CI_USE_LOCAL_DEPS: ${{ env.SPM_CI_USE_LOCAL_DEPS }}
- name: Swift Build
run: swift build --target WrkstrmFoundation