Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V0.3.8 #61

Merged
merged 3 commits into from
Sep 28, 2023
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
92 changes: 35 additions & 57 deletions .github/workflows/syndikit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
runs-on: [ubuntu-20.04, ubuntu-22.04]
swift-version: [5.7.3, 5.8]
swift-version: [5.7.3, 5.8.1, 5.9]
include:
- runs-on: ubuntu-20.04
swift-version: 5.5.3
Expand All @@ -30,14 +30,13 @@ jobs:
id: cache-spm-linux
uses: actions/cache@v3
env:
cache-name: cache-spm
cache-name: SPM
with:
path: .build
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Package.resolved') }}
key: ${{ env.cache-name }}-${{ runner.os }}-${{ env.SWIFT_VER }}-${{ hashFiles('Package.resolved') }}-${{ env.RELEASE_DOT }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
${{ env.cache-name }}-${{ runner.os }}-${{ env.SWIFT_VER }}-${{ hashFiles('Package.resolved') }}
${{ env.cache-name }}-${{ runner.os }}-${{ env.SWIFT_VER }}
- name: Set Ubuntu Release DOT
run: echo "RELEASE_DOT=$(lsb_release -sr)" >> $GITHUB_ENV
- name: Set Ubuntu Release NUM
Expand All @@ -48,14 +47,10 @@ jobs:
id: cache-swift-linux
uses: actions/cache@v3
env:
cache-name: cache-swift
cache-name: swift
with:
path: swift-${{ env.SWIFT_VER }}-RELEASE-ubuntu${{ env.RELEASE_DOT }}
key: ${{ runner.os }}-${{ env.RELEASE_DOT }}-${{ env.cache-name }}-${{ env.SWIFT_VER }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
key: ${{ env.cache-name }}-${{ runner.os }}-${{ env.SWIFT_VER }}-${{ env.RELEASE_DOT }}
- name: Download Swift
if: steps.cache-swift-linux.outputs.cache-hit != 'true'
run: curl -O https://download.swift.org/swift-${SWIFT_VER}-release/ubuntu${RELEASE_NUM}/swift-${SWIFT_VER}-RELEASE/swift-${SWIFT_VER}-RELEASE-ubuntu${RELEASE_DOT}.tar.gz
Expand All @@ -71,7 +66,7 @@ jobs:
- name: Prepare Code Coverage
run: llvm-cov export -format="lcov" .build/x86_64-unknown-linux-gnu/debug/${{ env.PACKAGE_NAME }}PackageTests.xctest -instr-profile .build/debug/codecov/default.profdata > info.lcov
- name: Upload to CodeCov.io
run: bash <(curl https://codecov.io/bash) -F github -F ${RELEASE_NAME} -F ${SWIFT_VER}
run: bash <(curl https://codecov.io/bash) -F spm -F ${RELEASE_NAME} -F ${SWIFT_VER}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
build-macos:
Expand Down Expand Up @@ -114,11 +109,17 @@ jobs:
watchName: "Apple Watch Ultra (49mm)"
iPhoneName: "iPhone 14"
- runs-on: macos-13
xcode: "/Applications/Xcode_14.3.app"
xcode: "/Applications/Xcode_14.3.1.app"
iOSVersion: "16.4"
watchOSVersion: "9.4"
watchName: "Apple Watch Ultra (49mm)"
iPhoneName: "iPhone 14 Pro Max"
- runs-on: macos-13
xcode: "/Applications/Xcode_15.0.app"
iOSVersion: "17.0"
watchOSVersion: "10.0"
watchName: "Apple Watch Ultra (49mm)"
iPhoneName: "iPhone 14 Pro Max"
steps:
- uses: actions/checkout@v3
- name: Cache swift package modules
Expand All @@ -134,7 +135,7 @@ jobs:
${{ runner.os }}-build-
${{ runner.os }}-
- name: Cache mint
if: ${{ github.event_name == 'pull_request' && github.base_ref == 'main' && matrix.xcode == '/Applications/Xcode_14.1.app' }}
if: ${{ github.event_name == 'pull_request' && ( github.base_ref == 'main' || endsWith( github.ref_name , 'Prep') ) && matrix.xcode == '/Applications/Xcode_14.3.1.app' }}
id: cache-mint
uses: actions/cache@v3
env:
Expand All @@ -151,33 +152,32 @@ jobs:
- name: Setup Xcode
run: sudo xcode-select -s ${{ matrix.xcode }}/Contents/Developer
- name: Install mint
if: ${{ github.event_name == 'pull_request' && github.base_ref == 'main' && matrix.xcode == '/Applications/Xcode_14.1.app' }}
if: ${{ github.event_name == 'pull_request' && ( github.base_ref == 'main' || endsWith( github.ref_name , 'Prep') ) && matrix.xcode == '/Applications/Xcode_14.3.1.app' }}
run: |
brew update
brew install mint
- name: Initialize CodeQL
if: startsWith(matrix.xcode,'/Applications/Xcode_14.3.1')
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Build
run: swift build
- name: Perform CodeQL Analysis
if: startsWith(matrix.xcode,'/Applications/Xcode_14.3.1')
uses: github/codeql-action/analyze@v2
- name: Run Swift Package tests
run: swift test -v --enable-code-coverage
- uses: sersoft-gmbh/swift-coverage-action@v2
- name: Upload SPM coverage to Codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
flags: spm
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
- uses: sersoft-gmbh/swift-coverage-action@v4
- name: Upload SPM to CodeCov.io
run: bash <(curl https://codecov.io/bash) -F spm -F macOS -F ${XCODE_NAME}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Clean up spm build directory
run: rm -rf .build
- name: Lint
run: ./scripts/lint.sh
if: ${{ github.event_name == 'pull_request' && github.base_ref == 'main' && matrix.xcode == '/Applications/Xcode_14.3.app' }}
if: ${{ github.event_name == 'pull_request' && ( github.base_ref == 'main' || endsWith( github.ref_name , 'Prep') ) && matrix.xcode == '/Applications/Xcode_14.3.1.app' }}
- name: Dump PIF
if: startsWith(matrix.xcode,'/Applications/Xcode_14')
run: |
Expand All @@ -190,38 +190,16 @@ jobs:
done
- name: Run iOS target tests
run: xcodebuild test -scheme SyndiKit -sdk iphonesimulator -destination 'platform=iOS Simulator,name=${{ matrix.iPhoneName }},OS=${{ matrix.iOSVersion }}' -enableCodeCoverage YES build test
- uses: sersoft-gmbh/swift-coverage-action@v2
- name: Upload iOS coverage to Codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
flags: iOS,iOS-${{ matrix.iOSVersion }}
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
- uses: sersoft-gmbh/swift-coverage-action@v4
- name: Upload iOS Coverage to CodeCov.io
run: bash <(curl https://codecov.io/bash) -F iOS -F iOS${{ matrix.iOSVersion }} -F macOS -F ${XCODE_NAME}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Run watchOS target tests
run: xcodebuild test -scheme SyndiKit -sdk watchsimulator -destination 'platform=watchOS Simulator,name=${{ matrix.watchName }},OS=${{ matrix.watchOSVersion }}' -enableCodeCoverage YES build test
- uses: sersoft-gmbh/swift-coverage-action@v2
- name: Upload watchOS coverage to Codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
flags: watchOS,watchOS${{ matrix.watchOSVersion }}
verbose: true
- uses: sersoft-gmbh/swift-coverage-action@v4
- name: Upload watchOS Coverage to CodeCov.io
run: bash <(curl https://codecov.io/bash) -F watchOS -F watchOS${{ matrix.watchOSVersion }} -F macOS -F ${XCODE_NAME}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}
deploy:
name: Deploy to Netlify
needs: [build-macos, build-ubuntu]
env:
PACKAGE_NAME: SyndiKit
runs-on: macos-12
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v2
- name: Setup Netlify
run: brew install netlify-cli
- name: Resolve Package Dependencies
run: xcodebuild -resolvePackageDependencies -scheme ${{ env.PACKAGE_NAME }} -derivedDataPath DerivedData
- name: Build DocC Documentation
run: xcodebuild docbuild -scheme ${{ env.PACKAGE_NAME }} -destination 'platform=macOS' -derivedDataPath DerivedData
- name: Deploy Files
run: netlify deploy --site ${{ secrets.NETLIFY_SITE_ID }} --auth ${{ secrets.NETLIFY_AUTH_TOKEN }} --prod
3 changes: 1 addition & 2 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,8 @@ identifier_name:
excluded:
- id
excluded:
- Tests/*/XCTestManifests.swift
- Tests
- DerivedData
- .build
- Tests/LinuxMain.swift
indentation_width:
indentation_width: 2
10 changes: 10 additions & 0 deletions Data/OPML/category.opml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<opml version="2.0">
<head>
<title>Illustrating the category attribute</title>
<dateCreated>Mon, 31 Oct 2005 19:23:00 GMT</dateCreated>
</head>
<body>
<outline text="The Mets are the best team in baseball." category="/Philosophy/Baseball/Mets,/Tourism/New York" created="Mon, 31 Oct 2005 18:21:33 GMT"/>
</body>
</opml>
11 changes: 11 additions & 0 deletions Data/OPML/category_invalidExpansionState.opml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<opml version="2.0">
<head>
<title>Illustrating the category attribute</title>
<dateCreated>Mon, 31 Oct 2005 19:23:00 GMT</dateCreated>
<expansionState>one, two, three</expansionState>
</head>
<body>
<outline text="The Mets are the best team in baseball." category="/Philosophy/Baseball/Mets,/Tourism/New York" created="Mon, 31 Oct 2005 18:21:33 GMT"/>
</body>
</opml>
Loading