From e81c9a85b50b2fc65bdc5647ec1ee04bc734a59d Mon Sep 17 00:00:00 2001 From: nuomi1 Date: Mon, 23 Oct 2023 04:28:05 +0800 Subject: [PATCH] Add CI check for Swift (#875) * Create swift.yml * Update swift.yml * Update swift.yml * Update swift.yml --- .github/workflows/swift.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 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 000000000..5ecacc2bc --- /dev/null +++ b/.github/workflows/swift.yml @@ -0,0 +1,28 @@ +# This workflow will build a Swift project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift + +name: Swift + +on: + push: + branches: ["main"] + paths: ["codes/swift/**/*.swift"] + pull_request: + branches: ["main"] + paths: ["codes/swift/**/*.swift"] + +jobs: + build: + name: Swift ${{ matrix.swift }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + swift: ["5.9", "5.8.1", "5.7.3"] + steps: + - uses: swift-actions/setup-swift@v1 + with: + swift-version: ${{ matrix.swift }} + - uses: actions/checkout@v4 + - name: Build + run: swift build --package-path codes/swift