Skip to content

Commit

Permalink
Merge pull request #1 from SwiftPackageIndex/add-ci
Browse files Browse the repository at this point in the history
Add CI
  • Loading branch information
finestructure authored Dec 4, 2023
2 parents 5abe292 + 7ff3df0 commit dfc2a1a
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 4 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
macOS:
# https://github.com/actions/runner-images
runs-on: macos-13
strategy:
matrix:
xcode: ['15.0', '14.3.1']
steps:
- uses: actions/checkout@v3
- run: git config --global user.email "[email protected]"
- run: git config --global user.name "Name"
- name: Get swift version
run: env DEVELOPER_DIR="/Applications/Xcode_${{ matrix.xcode }}.app" swift --version
- name: Test
run: env DEVELOPER_DIR="/Applications/Xcode_${{ matrix.xcode }}.app" swift test
- name: Build release
run: env DEVELOPER_DIR="/Applications/Xcode_${{ matrix.xcode }}.app" swift build -c release

Linux:
# https://github.com/actions/runner-images
runs-on: ubuntu-latest
strategy:
matrix:
image: [
'swift:5.8',
'swift:5.9'
]
container:
image: ${{ matrix.image }}
steps:
- uses: actions/checkout@v3
- run: git config --global user.email "[email protected]"
- run: git config --global user.name "Name"
- name: Get swift version
run: swift --version
- name: Test
run: swift test
- name: Build release
run: swift build -c release
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version: 5.6
// swift-tools-version: 5.8

import PackageDescription

Expand Down
9 changes: 6 additions & 3 deletions Sources/CanonicalPackageURLs/CanonicalPackageURLs.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ struct CanonicalPackageURL: Equatable {
var description: String { rawValue }
var matcher: String {
switch self {
case .gitAt: rawValue
case .http: rawValue + "://"
case .https: rawValue + "://"
case .gitAt:
return rawValue
case .http:
return rawValue + "://"
case .https:
return rawValue + "://"
}
}
}
Expand Down

0 comments on commit dfc2a1a

Please sign in to comment.