-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1d8e402
Showing
77 changed files
with
5,116 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
name: RadiantKit | ||
on: | ||
push: | ||
branches-ignore: | ||
- '*WIP' | ||
env: | ||
PACKAGE_NAME: RadiantKit | ||
jobs: | ||
build-ubuntu: | ||
name: Build on Ubuntu | ||
env: | ||
SWIFT_VER: 6.0 | ||
if: "!contains(github.event.head_commit.message, 'ci skip')" | ||
runs-on: ubuntu-latest | ||
container: | ||
image: swiftlang/swift:nightly-6.0-jammy | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Cache swift package modules | ||
id: cache-spm-linux | ||
uses: actions/cache@v4 | ||
env: | ||
cache-name: cache-spm | ||
with: | ||
path: .build | ||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.swift-version }}-${{ hashFiles('Package.resolved') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ env.cache-name }}-${{ matrix.swift-version }}- | ||
${{ runner.os }}-${{ env.cache-name }}- | ||
- name: Test | ||
run: swift test --enable-code-coverage | ||
- uses: sersoft-gmbh/swift-coverage-action@v4 | ||
id: coverage-files | ||
with: | ||
fail-on-empty-output: true | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
fail_ci_if_error: true | ||
flags: swift-${{ matrix.swift-version }},ubuntu | ||
verbose: true | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ${{ join(fromJSON(steps.coverage-files.outputs.files), ',') }} | ||
build-macos: | ||
name: Build on macOS | ||
runs-on: ${{ matrix.os }} | ||
if: "!contains(github.event.head_commit.message, 'ci skip')" | ||
strategy: | ||
matrix: | ||
include: | ||
- xcode: "/Applications/Xcode_16.1.app" | ||
os: macos-14 | ||
iOSVersion: "18.1" | ||
watchOSVersion: "11.0" | ||
watchName: "Apple Watch Series 9 (41mm)" | ||
iPhoneName: "iPhone 15" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Cache swift package modules | ||
id: cache-spm-macos | ||
uses: actions/cache@v4 | ||
env: | ||
cache-name: cache-spm | ||
with: | ||
path: .build | ||
key: ${{ matrix.os }}-build-${{ env.cache-name }}-${{ matrix.xcode }}-${{ hashFiles('Package.resolved') }} | ||
restore-keys: | | ||
${{ matrix.os }}-build-${{ env.cache-name }}-${{ matrix.xcode }}- | ||
- name: Cache mint | ||
if: startsWith(matrix.xcode,'/Applications/Xcode_16.1') | ||
id: cache-mint | ||
uses: actions/cache@v4 | ||
env: | ||
cache-name: cache-mint | ||
with: | ||
path: .mint | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Mintfile') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- name: Set Xcode Name | ||
run: echo "XCODE_NAME=$(basename -- ${{ matrix.xcode }} | sed 's/\.[^.]*$//' | cut -d'_' -f2)" >> $GITHUB_ENV | ||
- name: Setup Xcode | ||
run: sudo xcode-select -s ${{ matrix.xcode }}/Contents/Developer || (sudo ls -1 /Applications | grep "Xcode") | ||
- name: Enable Swift Testing | ||
run: | | ||
mkdir -p ~/Library/org.swift.swiftpm/security/ | ||
cp macros.json ~/Library/org.swift.swiftpm/security/ | ||
- name: Install mint | ||
if: startsWith(matrix.xcode,'/Applications/Xcode_16.1') | ||
run: | | ||
brew update | ||
brew install mint | ||
- name: Build | ||
run: swift build | ||
- name: Run Swift Package tests | ||
run: swift test --enable-code-coverage | ||
- uses: sersoft-gmbh/swift-coverage-action@v4 | ||
id: coverage-files-spm | ||
with: | ||
fail-on-empty-output: true | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
files: ${{ join(fromJSON(steps.coverage-files-spm.outputs.files), ',') }} | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
flags: macOS,${{ env.XCODE_NAME }},${{ matrix.runs-on }} | ||
- name: Clean up spm build directory | ||
run: rm -rf .build | ||
- name: Lint | ||
run: ./scripts/lint.sh | ||
if: startsWith(matrix.xcode,'/Applications/Xcode_16.1') | ||
- name: Run iOS target tests | ||
run: xcodebuild test -scheme ${{ env.PACKAGE_NAME }}-Package -destination 'platform=iOS Simulator,name=${{ matrix.iPhoneName }},OS=${{ matrix.iOSVersion }}' -enableCodeCoverage YES build test | ||
- uses: sersoft-gmbh/swift-coverage-action@v4 | ||
id: coverage-files-iOS | ||
with: | ||
fail-on-empty-output: true | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
fail_ci_if_error: true | ||
verbose: true | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ${{ join(fromJSON(steps.coverage-files-iOS.outputs.files), ',') }} | ||
flags: iOS,iOS${{ matrix.iOSVersion }},macOS,${{ env.XCODE_NAME }} | ||
- name: Run watchOS target tests | ||
run: xcodebuild test -scheme ${{ env.PACKAGE_NAME }}-Package -destination 'platform=watchOS Simulator,name=${{ matrix.watchName }},OS=${{ matrix.watchOSVersion }}' -enableCodeCoverage YES build test | ||
- uses: sersoft-gmbh/swift-coverage-action@v4 | ||
id: coverage-files-watchOS | ||
with: | ||
fail-on-empty-output: true | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
fail_ci_if_error: true | ||
verbose: true | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ${{ join(fromJSON(steps.coverage-files-watchOS.outputs.files), ',') }} | ||
flags: watchOS,watchOS${{ matrix.watchOSVersion }},macOS,${{ env.XCODE_NAME }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- '*WIP' | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ "main" ] | ||
schedule: | ||
- cron: '20 11 * * 3' | ||
|
||
jobs: | ||
analyze: | ||
if: false | ||
name: Analyze | ||
# Runner size impacts CodeQL analysis time. To learn more, please see: | ||
# - https://gh.io/recommended-hardware-resources-for-running-codeql | ||
# - https://gh.io/supported-runners-and-hardware-resources | ||
# - https://gh.io/using-larger-runners | ||
# Consider using larger runners for possible analysis time improvements. | ||
runs-on: ${{ (matrix.language == 'swift' && 'macos-13') || 'ubuntu-latest' }} | ||
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'swift' ] | ||
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ] | ||
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both | ||
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both | ||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Xcode | ||
run: sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: ${{ matrix.language }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
|
||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs | ||
# queries: security-extended,security-and-quality | ||
|
||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- run: | | ||
echo "Run, Build Application using script" | ||
swift build | ||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 | ||
with: | ||
category: "/language:${{matrix.language}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
# Created by https://www.toptal.com/developers/gitignore/api/swift,swiftpm,swiftpackagemanager,xcode,macos | ||
# Edit at https://www.toptal.com/developers/gitignore?templates=swift,swiftpm,swiftpackagemanager,xcode,macos | ||
|
||
### macOS ### | ||
# General | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Icon must end with two \r | ||
Icon | ||
|
||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
.com.apple.timemachine.donotpresent | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
||
### macOS Patch ### | ||
# iCloud generated files | ||
*.icloud | ||
|
||
### Swift ### | ||
# Xcode | ||
# | ||
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore | ||
|
||
## User settings | ||
xcuserdata/ | ||
|
||
## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) | ||
*.xcscmblueprint | ||
*.xccheckout | ||
|
||
## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) | ||
build/ | ||
DerivedData/ | ||
*.moved-aside | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
|
||
## Obj-C/Swift specific | ||
*.hmap | ||
|
||
## App packaging | ||
*.ipa | ||
*.dSYM.zip | ||
*.dSYM | ||
|
||
## Playgrounds | ||
timeline.xctimeline | ||
playground.xcworkspace | ||
|
||
# Swift Package Manager | ||
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. | ||
# Packages/ | ||
# Package.pins | ||
# Package.resolved | ||
*.xcodeproj | ||
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata | ||
# hence it is not needed unless you have added a package configuration file to your project | ||
.swiftpm | ||
|
||
.build/ | ||
|
||
# CocoaPods | ||
# We recommend against adding the Pods directory to your .gitignore. However | ||
# you should judge for yourself, the pros and cons are mentioned at: | ||
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control | ||
# Pods/ | ||
# Add this line if you want to avoid checking in source code from the Xcode workspace | ||
# *.xcworkspace | ||
|
||
# Carthage | ||
# Add this line if you want to avoid checking in source code from Carthage dependencies. | ||
# Carthage/Checkouts | ||
|
||
Carthage/Build/ | ||
|
||
# Accio dependency management | ||
Dependencies/ | ||
.accio/ | ||
|
||
# fastlane | ||
# It is recommended to not store the screenshots in the git repo. | ||
# Instead, use fastlane to re-generate the screenshots whenever they are needed. | ||
# For more information about the recommended setup visit: | ||
# https://docs.fastlane.tools/best-practices/source-control/#source-control | ||
|
||
fastlane/report.xml | ||
fastlane/Preview.html | ||
fastlane/screenshots/**/*.png | ||
fastlane/test_output | ||
|
||
# Code Injection | ||
# After new code Injection tools there's a generated folder /iOSInjectionProject | ||
# https://github.com/johnno1962/injectionforxcode | ||
|
||
iOSInjectionProject/ | ||
|
||
### SwiftPackageManager ### | ||
# Packages | ||
xcuserdata | ||
*.xcodeproj | ||
|
||
|
||
### SwiftPM ### | ||
|
||
|
||
### Xcode ### | ||
|
||
## Xcode 8 and earlier | ||
|
||
### Xcode Patch ### | ||
*.xcodeproj/* | ||
!*.xcodeproj/project.pbxproj | ||
!*.xcodeproj/xcshareddata/ | ||
!*.xcodeproj/project.xcworkspace/ | ||
!*.xcworkspace/contents.xcworkspacedata | ||
/*.gcno | ||
**/xcshareddata/WorkspaceSettings.xcsettings | ||
.mint | ||
# End of https://www.toptal.com/developers/gitignore/api/swift,swiftpm,swiftpackagemanager,xcode,macos | ||
|
||
test_output.log | ||
.docc-build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
retain_public: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
version: 1 | ||
builder: | ||
configs: | ||
- documentation_targets: [RadiantKit] | ||
swift_version: 6.0 |
Oops, something went wrong.