From 6d6765e3a2cc07dbc727e37cd2f2db7f339bba59 Mon Sep 17 00:00:00 2001 From: Miwa / Ensan Date: Tue, 20 Feb 2024 18:07:35 +0900 Subject: [PATCH 1/8] add CI on linux --- .github/workflows/swift_ubuntu22.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/swift_ubuntu22.yml diff --git a/.github/workflows/swift_ubuntu22.yml b/.github/workflows/swift_ubuntu22.yml new file mode 100644 index 0000000..e807284 --- /dev/null +++ b/.github/workflows/swift_ubuntu22.yml @@ -0,0 +1,24 @@ +name: Swift on Ubuntu 22.04 + +on: + push: + branches: [ "main", "develop" ] + pull_request: + branches: [ "main", "develop" ] + +jobs: + build: + + runs-on: ubuntu-22.04 + + steps: + - uses: swift-actions/setup-swift@150267bf6ba01f9d942a4bd55aa2f35ba586767d + with: + swift-version: "5.9" + - uses: actions/checkout@v4 + with: + submodules: true + - name: Build + run: swift build -Xswiftc -strict-concurrency=complete -v + - name: Run tests + run: swift test -c release -Xswiftc -strict-concurrency=complete -v From 14156e4dcf19ed4ffb9dee36753792bc220a9640 Mon Sep 17 00:00:00 2001 From: Miwa / Ensan Date: Tue, 20 Feb 2024 18:11:37 +0900 Subject: [PATCH 2/8] cleanup --- .github/workflows/swift.yml | 31 ++++++++++++++-------------- .github/workflows/swift_ubuntu22.yml | 24 --------------------- 2 files changed, 16 insertions(+), 39 deletions(-) delete mode 100644 .github/workflows/swift_ubuntu22.yml diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index e30f256..731b178 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -1,7 +1,11 @@ # 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 +name: Swift ${{ matrix.swift }} on ${{ matrix.os }} +runs-on: ${{ matrix.os }} +strategy: + matrix: + os: [ubuntu-latest, macos-latest] on: push: @@ -11,17 +15,14 @@ on: jobs: build: - - runs-on: macos-latest - - steps: - - uses: swift-actions/setup-swift@150267bf6ba01f9d942a4bd55aa2f35ba586767d - with: - swift-version: "5.9" - - uses: actions/checkout@v4 - with: - submodules: true - - name: Build - run: swift build -Xswiftc -strict-concurrency=complete -v - - name: Run tests - run: swift test -c release -Xswiftc -strict-concurrency=complete -v +steps: +- uses: swift-actions/setup-swift@v1 + with: + swift-version: "5.9" +- uses: actions/checkout@v4 + with: + submodules: true +- name: Build + run: swift build -Xswiftc -strict-concurrency=complete -v +- name: Run tests + run: swift test -c release -Xswiftc -strict-concurrency=complete -v diff --git a/.github/workflows/swift_ubuntu22.yml b/.github/workflows/swift_ubuntu22.yml deleted file mode 100644 index e807284..0000000 --- a/.github/workflows/swift_ubuntu22.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Swift on Ubuntu 22.04 - -on: - push: - branches: [ "main", "develop" ] - pull_request: - branches: [ "main", "develop" ] - -jobs: - build: - - runs-on: ubuntu-22.04 - - steps: - - uses: swift-actions/setup-swift@150267bf6ba01f9d942a4bd55aa2f35ba586767d - with: - swift-version: "5.9" - - uses: actions/checkout@v4 - with: - submodules: true - - name: Build - run: swift build -Xswiftc -strict-concurrency=complete -v - - name: Run tests - run: swift test -c release -Xswiftc -strict-concurrency=complete -v From d0cc1b960d49ee3b3a9e9831088cb54321e84fdc Mon Sep 17 00:00:00 2001 From: Miwa / Ensan Date: Tue, 20 Feb 2024 18:12:21 +0900 Subject: [PATCH 3/8] fix --- .github/workflows/swift.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index 731b178..3b05bbe 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -13,8 +13,6 @@ on: pull_request: branches: [ "main", "develop" ] -jobs: - build: steps: - uses: swift-actions/setup-swift@v1 with: From fc91b3b6867a1f2c0cc74a8471268a2c001aec9b Mon Sep 17 00:00:00 2001 From: Miwa / Ensan Date: Tue, 20 Feb 2024 18:14:50 +0900 Subject: [PATCH 4/8] fix --- .github/workflows/swift.yml | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index 3b05bbe..01f3f6c 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -13,14 +13,17 @@ on: pull_request: branches: [ "main", "develop" ] -steps: -- uses: swift-actions/setup-swift@v1 - with: - swift-version: "5.9" -- uses: actions/checkout@v4 - with: - submodules: true -- name: Build - run: swift build -Xswiftc -strict-concurrency=complete -v -- name: Run tests - run: swift test -c release -Xswiftc -strict-concurrency=complete -v +jobs: + build: + runs-on: ${{ matrix.os }} + steps: + - uses: swift-actions/setup-swift@v1 + with: + swift-version: "5.9" + - uses: actions/checkout@v4 + with: + submodules: true + - name: Build + run: swift build -Xswiftc -strict-concurrency=complete -v + - name: Run tests + run: swift test -c release -Xswiftc -strict-concurrency=complete -v From a8a977d3dec93ee8a5eb0585734cbd1a0fff01d1 Mon Sep 17 00:00:00 2001 From: Miwa / Ensan Date: Tue, 20 Feb 2024 18:16:36 +0900 Subject: [PATCH 5/8] remove matrix.swift --- .github/workflows/swift.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index 01f3f6c..008a443 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -1,7 +1,7 @@ # 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 ${{ matrix.swift }} on ${{ matrix.os }} +name: Swift on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: matrix: From 495370f168f69237105d0fe692f566e6e4e2bda4 Mon Sep 17 00:00:00 2001 From: Miwa / Ensan Date: Tue, 20 Feb 2024 18:18:34 +0900 Subject: [PATCH 6/8] fix --- .github/workflows/swift.yml | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index 008a443..ef6659b 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -1,12 +1,7 @@ # 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 ${{ matrix.os }} -runs-on: ${{ matrix.os }} -strategy: - matrix: - os: [ubuntu-latest, macos-latest] - +name: Swift Build on: push: branches: [ "main", "develop" ] @@ -15,15 +10,14 @@ on: jobs: build: + name: Swift on ${{ matrix.os }} runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] steps: - uses: swift-actions/setup-swift@v1 with: - swift-version: "5.9" - - uses: actions/checkout@v4 - with: - submodules: true - - name: Build - run: swift build -Xswiftc -strict-concurrency=complete -v - - name: Run tests - run: swift test -c release -Xswiftc -strict-concurrency=complete -v + swift-version: 5.9 + - name: Get swift version + run: swift --version From 10a307cbcd56ecdae39472d1f14f6686bd50238b Mon Sep 17 00:00:00 2001 From: Miwa / Ensan Date: Tue, 20 Feb 2024 18:20:10 +0900 Subject: [PATCH 7/8] Finally~~ --- .github/workflows/swift.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index ef6659b..685bfb9 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -1,7 +1,7 @@ # 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 Build +name: Swift Build and Test on: push: branches: [ "main", "develop" ] @@ -19,5 +19,7 @@ jobs: - uses: swift-actions/setup-swift@v1 with: swift-version: 5.9 - - name: Get swift version - run: swift --version + - name: Build + run: swift build -Xswiftc -strict-concurrency=complete -v + - name: Run tests + run: swift test -c release -Xswiftc -strict-concurrency=complete -v \ No newline at end of file From 39b9a633aaa0a1ab6eca479e64ab5328397fe80a Mon Sep 17 00:00:00 2001 From: Miwa / Ensan Date: Tue, 20 Feb 2024 18:22:13 +0900 Subject: [PATCH 8/8] add submodule checkout --- .github/workflows/swift.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index 685bfb9..4bcc8c8 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -19,6 +19,9 @@ jobs: - uses: swift-actions/setup-swift@v1 with: swift-version: 5.9 + - uses: actions/checkout@v4 + with: + submodules: true - name: Build run: swift build -Xswiftc -strict-concurrency=complete -v - name: Run tests