- Install
msmtp
usingbrew install msmtp
- Configure
msmtp
using the following:
# Set default values for all the accounts.
defaults
auth on
logfile ~/.maildir/msmtp.log
port 587
protocol smtp
msmtp
using brew install msmtp
msmtp
using the following:# Set default values for all the accounts.
defaults
auth on
logfile ~/.maildir/msmtp.log
port 587
protocol smtp
{"label":"Coverage","message":"90.75%","schemaVersion":1,"color":"success"} |
# XCode scheme to build and test | |
SCHEME = Searching | |
# The sim to use when running tests | |
PLATFORM_IOS = iOS Simulator,name=iPhone SE (3rd generation) | |
# Coomand line options for xcodebuild that incorporate the above values | |
DEST = -project Searching.xcodeproj -scheme "$(SCHEME)" -destination platform="$(PLATFORM_IOS)" | |
# The pattern to use when matching lines from xcov output. The coverage total will be the average |
#!/usr/bin/env python | |
import concurrent.futures | |
from dataclasses import dataclass | |
from github import Github | |
from termcolor import colored | |
from functools import partial | |
@dataclass |
// When working properly, SWIFTPM_MODULE_BUNDLE is defined. At least on Xcode 13.2, this is not always the case with | |
// packages, especially when running tests. The code below was pulled from my SF2Lib Swift package. This package is | |
// used in my SoundFonts application. The workaround below handles two situations where SWIFTPM_MODULE_BUNDLE is not | |
// working right: | |
// | |
// 1. SWIFTPM_MODULE_BUNDLE not defined -- seems to be limited to unit tests in the SF2Lib package | |
// 2. SWIFTPM_MODULE_BUNDLE defined but throws exception -- seems to be limited to unit tests of a package that depends | |
// on SF2Lib package | |
// |
#!/bin/bash | |
set -eu | |
echo "-- BEGIN post-build.sh" | |
function process # TOP EMBED | |
{ | |
local TOP="${1}" EMBED="${2}" | |
cd "${CODESIGNING_FOLDER_PATH}/${TOP}" |
swift build
swift test --enable-code-coverage
For step #4, we need to do some sleuthing and digging around into artifacts created by the Swift toolchain. First, we need to find the location of the XCTest bundle that step #3 generated and save it in an environment variable:
import Parsing | |
import XCTest | |
import Foundation | |
#if canImport(Darwin) | |
import Darwin.C | |
#elseif canImport(Glibc) | |
import Glibc | |
#endif |
// Demo using https://github.com/nicklockwood/Expression to parse | |
// https://www.wolframalpha.com/input/?i=Sawsbuck+Winter+Form%E2%80%90like+curve | |
import Foundation | |
import Expression | |
let Xt = "((-2/9 * sin(11/7 - 4 * t) + 78/11 * sin(t + 11/7) + 2/7 * sin(2 * t + 8/5) + 5/16 * sin(3 * t + 11/7) + 641/20) * θ(107 * π - t) * θ(t - 103 * π) + (-1/40 * sin(10/7 - 48 * t) - 1/20 * sin(32/21 - 47 * t) - 1/75 * sin(9/7 - 44 * t) - 1/10 * sin(35/23 - 41 * t) - 1/8 * sin(23/15 - 33 * t) - 1/13 * sin(38/25 - 30 * t) - 2/11 * sin(23/15 - 27 * t) - 1/7 * sin(14/9 - 23 * t) - 3/14 * sin(20/13 - 22 * t) - 1/5 * sin(17/11 - 19 * t) - 1/9 * sin(38/25 - 18 * t) - 1/13 * sin(14/9 - 13 * t) - 9/8 * sin(17/11 - 12 * t) - 3/10 * sin(11/7 - 11 * t) - 5/7 * sin(14/9 - 9 * t) - 6/7 * sin(17/11 - 6 * t) - 5/7 * sin(11/7 - 5 * t) - 131/15 * sin(11/7 - 3 * t) + 166/11 * sin(t + 11/7) + 82/13 * sin(2 * t + 11/7) + 5/4 * sin(4 * t + 11/7) + 7/15 * sin(7 * t + 33/7) + 23/22 * sin(8 * t + 11/7) + 7/5 * sin(10 * t + 19/12) + 1/2 * sin(14 |