Add support for Linux with glibc (#61)
* Conditionally import Glibc on Linux for fcntl calls * Extract transport implementations into separate files * Fix warning in test * Add ubuntu-latest to CI test matrix * Switch to vapor/swiftly-action for setup step * Configure Prettier extension to format GitHub Actions workflows * Setup with different actions depending on platform * Rename step * Rename job * Update README
This commit is contained in:
parent
20d4fe6f5a
commit
1e61f205a1
1 changed files with 458 additions and 412 deletions
39
.github/workflows/ci.yml
vendored
39
.github/workflows/ci.yml
vendored
|
|
@ -2,9 +2,9 @@ name: CI
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
branches: ["main"]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
branches: ["main"]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
|
@ -12,21 +12,32 @@ permissions:
|
|||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: macos-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-latest, ubuntu-latest]
|
||||
swift-version:
|
||||
- ^6
|
||||
- 6.0.3
|
||||
- 6.1.0
|
||||
|
||||
name: Build and Test (Swift ${{ matrix.swift-version }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: Test (${{ matrix.os }}, Swift ${{ matrix.swift-version }})
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: swift-actions/setup-swift@v2
|
||||
with:
|
||||
swift-version: ${{ matrix.swift-version }}
|
||||
- name: Build
|
||||
run: swift build -v
|
||||
- name: Run tests
|
||||
run: swift test -v
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Swift on Linux
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
uses: vapor/swiftly-action@v0.2
|
||||
with:
|
||||
toolchain: ${{ matrix.swift-version }}
|
||||
- name: Setup Swift on macOS
|
||||
if: matrix.os == 'macos-latest'
|
||||
uses: swift-actions/setup-swift@v2
|
||||
with:
|
||||
swift-version: ${{ matrix.swift-version }}
|
||||
|
||||
- name: Build
|
||||
run: swift build -v
|
||||
|
||||
- name: Run tests
|
||||
run: swift test -v
|
||||
|
|
|
|||
Loading…
Reference in a new issue