Skip to content

Standardize CI matrix: Swift 6.0-6.2 on macOS 14-15 #27

Standardize CI matrix: Swift 6.0-6.2 on macOS 14-15

Standardize CI matrix: Swift 6.0-6.2 on macOS 14-15 #27

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
tests:
name: Build and Test
strategy:
fail-fast: false
matrix:
include:
- os: macos-14
swift: "6.0"
- os: macos-14
swift: "6.1"
- os: macos-15
swift: "6.1"
- os: macos-15
swift: "6.2"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: SwiftyLab/setup-swift@latest
with:
swift-version: ${{ matrix.swift }}
- name: Build
run: swift build -v
- name: Test
run: swift test -v
lint:
name: Run Swiftlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: norio-nomura/action-swiftlint@3.2.1
swift-format:
name: Run swift-format
runs-on: ubuntu-latest
container:
image: swift:latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: apt-get update && apt-get install -y wget
- name: Download .swift-format config
run: wget -O .swift-format https://gist.githubusercontent.com/RISCfuture/e0c21afb7bd80a88d128a42bf40d2ecd/raw/.swift-format
- name: Install swift-format
run: |
git clone https://github.com/swiftlang/swift-format.git
cd swift-format
swift build -c release
cp .build/release/swift-format /usr/local/bin/
- name: Run swift-format lint
run: swift-format lint -r .