Skip to content

Checks

Checks #20

Workflow file for this run

name: Checks
on: [workflow_dispatch, pull_request]
jobs:
swiftformat:
name: SwiftFormat
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- run: swiftformat . --lint --quiet --reporter github-actions-log
swiftlint:
name: SwiftLint
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Install SwiftLint
run: brew install swiftlint
- run: swiftlint --strict --quiet --reporter github-actions-logging
cli:
name: Build Binary
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: .build
key: ${{ runner.os }}-spm-${{ hashFiles('Package.resolved') }}
restore-keys: ${{ runner.os }}-spm-
- name: Select Xcode 15.3
run: sudo xcode-select -s '/Applications/Xcode_15.3.app'
- name: Build
run: swift build -c release
app:
name: Build App
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Select Xcode 15.3
run: sudo xcode-select -s '/Applications/Xcode_15.3.app'
- run: brew install xcbeautify
- name: Build
run: |
xcodebuild \
-workspace XTree.xcworkspace \
-scheme XTree \
-configuration Release \
-destination 'generic/platform=macOS' \
-derivedDataPath build \
-clonedSourcePackagesDirPath "$HOME/Library/Developer/Xcode/DerivedData/XTree" \
| xcbeautify
- uses: actions/upload-artifact@v3
with:
name: XTree
path: build/Build/Products/Release/XTree.app
if-no-files-found: error
retention-days: 1