From cd0c443c4981c0ba2dc74212f4b7925839b593ba Mon Sep 17 00:00:00 2001 From: Aloisius Date: Sat, 20 Jan 2024 12:33:14 -0800 Subject: [PATCH] Setup github action to test build This workflow should build and test on the latest Swift 5 release as well as 5.7 on both MacOS and Linux when pull requests are created targeting master or there is a push to master. --- .github/workflows/swift.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/swift.yml diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml new file mode 100644 index 0000000..6e07788 --- /dev/null +++ b/.github/workflows/swift.yml @@ -0,0 +1,27 @@ +name: Swift + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + name: Swift ${{ matrix.swift }} on ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + swift: ["5", "5.7"] + + runs-on: ${{ matrix.os }} + + steps: + - uses: swift-actions/setup-swift@v1.26.0 + with: + swift-version: ${{ matrix.swift }} + - uses: actions/checkout@v4 + - name: Build + run: swift build -v + - name: Run tests + run: swift test -v