Skip to content

Commit 5bd067b

Browse files
authored
Merge pull request #3 from Recouse/fix/linux-build
Fix linux build
2 parents 03b1893 + 3bab581 commit 5bd067b

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
paths-ignore:
7+
- '**/README.md'
8+
- 'CONTRIBUTING.md'
9+
- 'CODE_OF_CONDUCT.md'
10+
pull_request:
11+
branches: [ "main" ]
12+
paths-ignore:
13+
- '**/README.md'
14+
- 'CONTRIBUTING.md'
15+
- 'CODE_OF_CONDUCT.md'
16+
17+
jobs:
18+
macos-15:
19+
name: Build macOS 15
20+
runs-on: macos-15
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
- name: Set Xcode version
25+
run: sudo xcode-select -s /Applications/Xcode_16.4.0.app
26+
- name: Build
27+
run: swift build -v
28+
# - name: Run tests
29+
# run: swift test -v
30+
ubuntu:
31+
name: Build Linux
32+
runs-on: ubuntu-latest
33+
container:
34+
image: swift:latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
- name: Build
38+
run: swift build -v
39+
# - name: Run tests
40+
# run: swift test -v

Sources/OpenAI/Request/Handler/BaseRequestHandler.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
import EventSource
99
import Foundation
10+
#if canImport(FoundationNetworking)
11+
import FoundationNetworking
12+
#endif
1013

1114
public struct BaseRequestHandler: RequestHandler, Sendable {
1215
let urlSession: URLSession

0 commit comments

Comments
 (0)