Skip to content

Commit 4315ec3

Browse files
make use of brightdigit/swift-build in build-macos
1 parent d80f5de commit 4315ec3

File tree

1 file changed

+8
-44
lines changed

1 file changed

+8
-44
lines changed

.github/workflows/BushelKit.yml

Lines changed: 8 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -77,51 +77,15 @@ jobs:
7777

7878
steps:
7979
- uses: actions/checkout@v4
80-
81-
- name: Set Xcode Name
82-
run: echo "XCODE_NAME=$(basename -- ${{ matrix.xcode }} | sed 's/\.[^.]*$//' | cut -d'_' -f2)" >> $GITHUB_ENV
83-
84-
- name: Setup Xcode
85-
run: sudo xcode-select -s ${{ matrix.xcode }}/Contents/Developer
86-
87-
# SPM Cache Step
88-
- name: Cache swift package modules
89-
id: cache-spm-macos
90-
uses: actions/cache@v4
91-
env:
92-
cache-name: cache-spm
93-
with:
94-
path: .build
95-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Package.resolved') }}
96-
restore-keys: |
97-
${{ runner.os }}-build-${{ env.cache-name }}-
98-
${{ runner.os }}-build-
99-
${{ runner.os }}-
100-
101-
- name: Build SPM
102-
if: "!matrix.type"
103-
run: swift build
104-
105-
- name: Run Swift Package tests
106-
if: "!matrix.type"
107-
run: swift test -v --enable-code-coverage
10880

109-
- name: Enable Swift Testing
110-
if: matrix.type
111-
run: |
112-
mkdir -p ~/Library/org.swift.swiftpm/security/
113-
cp macros.json ~/Library/org.swift.swiftpm/security/
114-
115-
# Common iOS/watchOS Test Steps
116-
- name: Run Device Tests
117-
if: matrix.type
118-
run: >
119-
xcodebuild test
120-
-scheme ${{ env.PACKAGE_NAME }}-Package
121-
-sdk ${{ matrix.type == 'ios' && 'iphonesimulator' || matrix.type == 'watchos' && 'watchsimulator' || 'xrsimulator' }}
122-
-destination 'platform=${{ matrix.type == 'ios' && 'iOS Simulator' || matrix.type == 'watchos' && 'watchOS Simulator' || 'visionOS Simulator' }},name=${{ matrix.deviceName }},OS=${{ matrix.osVersion }}'
123-
-enableCodeCoverage YES
124-
build test
81+
- name: Build and Test
82+
uses: brightdigit/swift-build@v1
83+
with:
84+
scheme: ${{ env.PACKAGE_NAME }}-Package
85+
type: ${{ matrix.type }}
86+
xcode: ${{ matrix.xcode }}
87+
deviceName: ${{ matrix.deviceName }}
88+
osVersion: ${{ matrix.osVersion }}
12589

12690
# Common Coverage Steps
12791
- name: Process Coverage

0 commit comments

Comments
 (0)