Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ jobs:
run: make docs
- name: Setup GitHub Pages
id: pages
uses: actions/configure-pages@v3
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: docs
path: Build/Docs
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v2
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
50 changes: 50 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Test
on:
push:
branches:
- main
tags-ignore:
- '**'
paths:
- 'Source/**'
- 'Tests/**'
- '.github/workflows/**'
- 'Package.swift'
- 'Makefile'
pull_request:
branches:
- '**'
paths:
- 'Source/**'
- 'Tests/**'
- '.github/workflows/**'
- 'Package.swift'
- 'Makefile'

jobs:
Apple:
name: Test ${{ matrix.name }}
runs-on: macOS-latest
strategy:
fail-fast: false
matrix:
include:
- name: macOS
target: test-macos
- name: iOS
target: test-ios
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build and test
run: make ${{ matrix.target }}
shell: bash
SPM:
name: Test with SPM
runs-on: macOS-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build and test
run: swift test
shell: bash
92 changes: 5 additions & 87 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,93 +1,11 @@
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
.DS_Store

## 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/
/.swiftpm
/.build

# GitHub Pages
docs
# Makefile output dir
/Build
45 changes: 32 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,38 @@
TARGET_NAME = SQLime
DERIVED_DATA_PATH = ./DerivedData
OUTPUD_DIR = ./Build
DERIVED_DATA_PATH = $(OUTPUD_DIR)/DerivedData

.PHONY: docs clean
.PHONY: clean, test, test-ios

docs:
xcodebuild docbuild -quiet \
clean:
swift package clean
rm -rf $(OUTPUD_DIR)

# MARK: - Tests

test:
swift test

XCODEBUILD_TEST = xcodebuild test -quiet -scheme $(TARGET_NAME)

test-macos:
$(XCODEBUILD_TEST) -destination 'platform=macOS'

test-ios:
$(XCODEBUILD_TEST) -destination 'platform=iOS Simulator,name=iPhone 16'

# MARK: - DocC

DOCC_ARCHIVE = $(DERIVED_DATA_PATH)/Build/Products/Debug/$(TARGET_NAME).doccarchive

$(DOCC_ARCHIVE):
xcodebuild docbuild \
-quiet \
-scheme $(TARGET_NAME) \
-derivedDataPath $(DERIVED_DATA_PATH) \
-destination 'platform=macOS'
xcrun docc process-archive transform-for-static-hosting \
$(DERIVED_DATA_PATH)/Build/Products/Debug/$(TARGET_NAME).doccarchive \
-destination "generic/platform=macOS" \
-derivedDataPath $(DERIVED_DATA_PATH)

$(OUTPUD_DIR)/Docs: $(DOCC_ARCHIVE)
xcrun docc process-archive transform-for-static-hosting $^ \
--hosting-base-path $(TARGET_NAME) \
--output-path $@

clean:
swift package clean
rm -rf $(DERIVED_DATA_PATH)
rm -rf docs
6 changes: 5 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
// swift-tools-version:5.3
// swift-tools-version:5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "SQLime",
platforms: [
.macOS(.v12),
.iOS(.v12),
],
products: [
.library(
name: "SQLime",
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 🍋 SQLime

[![Test](https://github.com/Alexander-Ignition/Octokot/actions/workflows/test.yml/badge.svg)](https://github.com/Alexander-Ignition/Octokot/actions/workflows/test.yml)
[![Swift 5.9](https://img.shields.io/badge/swift-5.9-brightgreen.svg?style=flat)](https://developer.apple.com/swift)
[![GitHub license](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://github.com/Alexander-Ignition/Octokot/blob/master/LICENSE)

Swift SQLite wrapper.

[Documentation](https://alexander-ignition.github.io/SQLime/documentation/sqlime/)