Skip to content

Adopt Swift 6 language mode and "NonisolatedNonsendingByDefault" #552

Adopt Swift 6 language mode and "NonisolatedNonsendingByDefault"

Adopt Swift 6 language mode and "NonisolatedNonsendingByDefault" #552

Workflow file for this run

name: CI
on:
push:
branches:
- main
- v3
pull_request:
branches:
- main
- v3
release:
types: [published]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-ci
cancel-in-progress: true
jobs:
macos-unit:
strategy:
matrix:
macos-version:
- macos-15
- macos-26
runs-on: ${{ matrix.macos-version }}
timeout-minutes: 15
steps:
- name: Select appropriate Xcode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Checkout
uses: actions/checkout@v6
- name: Install and run Mosquitto
run: |
brew install mosquitto
mosquitto -d -c mosquitto/config/mosquitto.conf
- name: SPM tests
run: swift test --enable-code-coverage
- name: Upload coverage data
uses: vapor/[email protected]
with:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
ios-build:
runs-on: macos-latest
timeout-minutes: 15
steps:
- name: Select appropriate Xcode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Checkout
uses: actions/checkout@v6
- name: Xcodebuild
run: |
xcodebuild build -scheme mqtt-nio -destination 'platform=iOS Simulator,name=iPhone 17'
linux-unit:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
tag:
- swift:6.2
container:
image: ${{ matrix.tag }}
services:
mosquitto:
image: eclipse-mosquitto
options: --name mosquitto
ports:
- 1883:1883
- 1884:1884
- 8883:8883
- 8080:8080
- 8081:8081
volumes:
- ${{ github.workspace }}/mosquitto/config:/mosquitto/config
- ${{ github.workspace }}/mosquitto/certs:/mosquitto/certs
- ${{ github.workspace }}/mosquitto/socket:/mosquitto/socket
steps:
- name: Install curl
run: apt-get update -yq && apt-get install -y curl
- name: Checkout
uses: actions/checkout@v6
- name: Restart Mosquitto
# The mosquitto service container is started *before* mqtt-nio is checked
# out. Restarting the container after the checkout step is needed for the
# container to see volumes populated from the checked out workspace.
uses: docker://docker
with:
args: docker restart mosquitto
- name: Test
env:
MOSQUITTO_SERVER: mosquitto
run: |
swift test --enable-code-coverage
- name: Upload coverage data
uses: vapor/[email protected]
with:
codecov_token: ${{ secrets.CODECOV_TOKEN }}