Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Supereg authored Sep 28, 2024
0 parents commit e51b63d
Show file tree
Hide file tree
Showing 38 changed files with 2,345 additions and 0 deletions.
123 changes: 123 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
#
# This source file is part of the TemplatePackage open source project
#
# SPDX-FileCopyrightText: 2022 Stanford University and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
#

name: Build and Test

on:
workflow_call:

jobs:
reuse_action:
name: REUSE Compliance Check
uses: StanfordBDHG/.github/.github/workflows/reuse.yml@v2
swiftlint:
name: SwiftLint
uses: StanfordBDHG/.github/.github/workflows/swiftlint.yml@v2
packageios:
name: Build and Test Swift Package iOS
uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
with:
scheme: TemplatePackage
resultBundle: TemplatePackage-iOS.xcresult
artifactname: TemplatePackage-iOS.xcresult
packagewatchos:
name: Build and Test Swift Package watchOS
uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
with:
scheme: TemplatePackage
destination: 'platform=watchOS Simulator,name=Apple Watch Series 9 (45mm)'
resultBundle: TemplatePackage-watchOS.xcresult
artifactname: TemplatePackage-watchOS.xcresult
packagevisionos:
name: Build and Test Swift Package visionOS
uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
with:
scheme: TemplatePackage
destination: 'platform=visionOS Simulator,name=Apple Vision Pro'
resultBundle: TemplatePackage-visionOS.xcresult
artifactname: TemplatePackage-visionOS.xcresult
packagetvos:
name: Build and Test Swift Package tvOS
uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
with:
scheme: TemplatePackage
resultBundle: TemplatePackage-tvOS.xcresult
destination: 'platform=tvOS Simulator,name=Apple TV 4K (3rd generation)'
artifactname: TemplatePackage-tvOS.xcresult
packagemacos:
name: Build and Test Swift Package macOS
uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
with:
scheme: TemplatePackage
resultBundle: TemplatePackage-macOS.xcresult
destination: 'platform=macOS,arch=arm64'
artifactname: TemplatePackage-macOS.xcresult
ios:
name: Build and Test iOS
uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
with:
path: 'Tests/UITests'
scheme: TestApp
resultBundle: TestApp-iOS.xcresult
artifactname: TestApp-iOS.xcresult
ipados:
name: Build and Test iPadOS
uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
with:
path: 'Tests/UITests'
scheme: TestApp
destination: 'platform=iOS Simulator,name=iPad Air (5th generation)'
resultBundle: TestApp-iPadOS.xcresult
artifactname: TestApp-iPadOS.xcresult
watchos:
name: Build and Test watchOS
uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
with:
runsonlabels: '["macOS", "self-hosted"]'
path: 'Tests/UITests'
scheme: TestAppWatchApp
destination: 'platform=watchOS Simulator,name=Apple Watch Series 9 (45mm)'
resultBundle: TestApp-watchOS.xcresult
artifactname: TestApp-watchOS.xcresult
visionos:
name: Build and Test visionOS
uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
with:
runsonlabels: '["macOS", "self-hosted"]'
path: 'Tests/UITests'
scheme: TestApp
destination: 'platform=visionOS Simulator,name=Apple Vision Pro'
resultBundle: TestApp-visionOS.xcresult
artifactname: TestApp-visionOS.xcresult
tvos:
name: Build and Test tvOS
uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
with:
path: 'Tests/UITests'
scheme: TestApp
destination: 'platform=tvOS Simulator,name=Apple TV 4K (3rd generation)'
resultBundle: TestApp-tvOS.xcresult
artifactname: TestApp-tvOS.xcresult
codeql:
name: CodeQL
uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
with:
codeql: true
test: false
scheme: TemplatePackage
permissions:
security-events: write
actions: read
uploadcoveragereport:
name: Upload Coverage Report
needs: [packageios, packagewatchos, packagevisionos, packagetvos, packagemacos, ios, ipados, watchos, visionos, tvos]
uses: StanfordBDHG/.github/.github/workflows/create-and-upload-coverage-report.yml@v2
with:
coveragereports: TemplatePackage-iOS.xcresult TemplatePackage-watchOS.xcresult TemplatePackage-visionOS.xcresult TemplatePackage-tvOS.xcresult TemplatePackage-macOS.xcresult TestApp-iOS.xcresult TestApp-iPadOS.xcresult TestApp-watchOS.xcresult TestApp-visionOS.xcresult TestApp-tvOS.xcresult
secrets:
token: ${{ secrets.CODECOV_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#
# This source file is part of the TemplatePackage open source project
#
# SPDX-FileCopyrightText: 2022 Stanford University and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
#

name: Main

on:
push:
branches:
- main
workflow_dispatch:

concurrency:
group: main
cancel-in-progress: false

jobs:
buildandtest:
name: Build and Test
uses: ./.github/workflows/build-and-test.yml
secrets: inherit
23 changes: 23 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#
# This source file is part of the TemplatePackage open source project
#
# SPDX-FileCopyrightText: 2022 Stanford University and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
#

name: Pull Request

on:
pull_request:
workflow_dispatch:

concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true

jobs:
buildandtest:
name: Build and Test
uses: ./.github/workflows/build-and-test.yml
secrets: inherit
34 changes: 34 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#
# This source file is part of the TemplatePackage open source project
#
# SPDX-FileCopyrightText: 2022 Stanford University and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
#

# Swift Package Manager
Package.resolved
*.xcodeproj
.swiftpm
.build
.xcodebuild
.derivedData
coverage.lcov
*.xcresult

# IDE related folders
.idea

# Xcode User settings
xcuserdata/

# Other files
.DS_Store
.env

# Documentation generation
*.doccarchive
docs/

# UITests Project
!UITests.xcodeproj
14 changes: 14 additions & 0 deletions .spi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# This source file is part of the TemplatePackage open source project
#
# SPDX-FileCopyrightText: 2022 Stanford University and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
#

version: 1
builder:
configs:
- platform: ios
documentation_targets:
- TemplatePackage
Loading

0 comments on commit e51b63d

Please sign in to comment.