From 671865ea3c9840704069f1e72e4fb4ef43f1a385 Mon Sep 17 00:00:00 2001 From: Nik Date: Fri, 27 Sep 2024 09:46:41 +0200 Subject: [PATCH] Create swift_macos.yml --- .github/workflows/swift_macos.yml | 57 +++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/swift_macos.yml diff --git a/.github/workflows/swift_macos.yml b/.github/workflows/swift_macos.yml new file mode 100644 index 0000000..1bb4e88 --- /dev/null +++ b/.github/workflows/swift_macos.yml @@ -0,0 +1,57 @@ +name: "NikSativa CI" + +on: + push: + branches: + - "main" + paths: + - ".github/workflows/**" + - "Package.swift" + - "Source/**" + - "Tests/**" + pull_request: + paths: + - ".github/workflows/**" + - "Package.swift" + - "Source/**" + - "Tests/**" + +concurrency: + group: ${{ github.ref_name }} + cancel-in-progress: true +jobs: + macOS: + name: "macOS ${{ matrix.xcode }} ${{ matrix.swift }}" + runs-on: ${{ matrix.runsOn }} + env: + DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer" + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + include: + - xcode: "Xcode_16" + runsOn: macOS-15 + swift: "6.0" + outputFilter: xcbeautify --renderer github-actions + - xcode: "Xcode_15.4" + runsOn: macOS-14 + swift: "5.10" + outputFilter: xcbeautify --renderer github-actions + - xcode: "Xcode_15.2" + runsOn: macOS-14 + swift: "5.9" + outputFilter: xcbeautify --renderer github-actions + - xcode: "Xcode_14.3" + runsOn: macOS-13 + swift: "5.8" + outputFilter: xcbeautify --renderer github-actions + steps: + - uses: NeedleInAJayStack/setup-swift@feat/swift-6 # swift-actions/setup-swift@main + with: + swift-version: ${{ matrix.swift }} + - uses: actions/checkout@v4 + - name: "Build ${{ matrix.xcode }} ${{ matrix.swift }}" + run: swift build -v | ${{ matrix.outputFilter }} + - name: "Test ${{ matrix.xcode }} ${{ matrix.swift }}" + run: swift test -v | ${{ matrix.outputFilter }}