From c0b117c98b131dc023fb0bcc0426b8e32ef4229a Mon Sep 17 00:00:00 2001 From: soumyamahunt Date: Thu, 15 Dec 2022 15:55:28 +0530 Subject: [PATCH 1/5] ci: add windows swift package tests support --- .github/workflows/main.yml | 88 +++++++++++++++++++++----------------- 1 file changed, 48 insertions(+), 40 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 93465b67..e280293a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -61,50 +61,58 @@ jobs: { "os": "ubuntu-20.04", "swift": "5.6" + }, + { + "os": "windows-latest", + "swift": "5.7" + }, + { + "os": "windows-latest", + "swift": "5.6" } ] } - cocoapods-test: - name: CocoaPods - uses: SwiftyLab/ci/.github/workflows/cocoapods.yml@main - strategy: - matrix: - platforms: ['macos tvos', 'ios'] - with: - platforms: ${{ matrix.platforms }} + # cocoapods-test: + # name: CocoaPods + # uses: SwiftyLab/ci/.github/workflows/cocoapods.yml@main + # strategy: + # matrix: + # platforms: ['macos tvos', 'ios'] + # with: + # platforms: ${{ matrix.platforms }} - xcode-test: - name: Xcode - uses: SwiftyLab/ci/.github/workflows/xcode.yml@main - with: - os: macos-12 - xcode: '13.3.1' + # xcode-test: + # name: Xcode + # uses: SwiftyLab/ci/.github/workflows/xcode.yml@main + # with: + # os: macos-12 + # xcode: '13.3.1' - ci: - name: CI - if: github.event_name == 'push' - needs: [swift-package-test, xcode-test, cocoapods-test] - # needs: [analyze, swift-package-test, xcode-test, cocoapods-test] - uses: SwiftyLab/ci/.github/workflows/ci.yml@main + # ci: + # name: CI + # if: github.event_name == 'push' + # needs: [swift-package-test, xcode-test, cocoapods-test] + # # needs: [analyze, swift-package-test, xcode-test, cocoapods-test] + # uses: SwiftyLab/ci/.github/workflows/ci.yml@main - cd: - name: CD - if: | - (github.event_name == 'push' && needs.ci.outputs.release == 'true') || - (always() && - github.event_name == 'workflow_dispatch' && - github.event.inputs.release == 'true' && - needs.swift-package-test.result == 'success' && - needs.xcode-test.result == 'success' && - needs.cocoapods-test.result == 'success' && - (needs.ci.result == 'success' || needs.ci.result == 'skipped')) - # (needs.analyze.result == 'success' || needs.analyze.result == 'skipped') - needs: [ci, swift-package-test, xcode-test, cocoapods-test] - # needs: [ci, analyze, swift-package-test, xcode-test, cocoapods-test] - uses: SwiftyLab/ci/.github/workflows/cd.yml@main - with: - os: macos-12 - version: ${{ github.event.inputs.version }} - secrets: - COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} + # cd: + # name: CD + # if: | + # (github.event_name == 'push' && needs.ci.outputs.release == 'true') || + # (always() && + # github.event_name == 'workflow_dispatch' && + # github.event.inputs.release == 'true' && + # needs.swift-package-test.result == 'success' && + # needs.xcode-test.result == 'success' && + # needs.cocoapods-test.result == 'success' && + # (needs.ci.result == 'success' || needs.ci.result == 'skipped')) + # # (needs.analyze.result == 'success' || needs.analyze.result == 'skipped') + # needs: [ci, swift-package-test, xcode-test, cocoapods-test] + # # needs: [ci, analyze, swift-package-test, xcode-test, cocoapods-test] + # uses: SwiftyLab/ci/.github/workflows/cd.yml@main + # with: + # os: macos-12 + # version: ${{ github.event.inputs.version }} + # secrets: + # COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} From 9dff93e366ca47129f36c8db56acb55a22f15b71 Mon Sep 17 00:00:00 2001 From: soumyamahunt Date: Thu, 15 Dec 2022 16:10:02 +0530 Subject: [PATCH 2/5] wip: remove swift 5.7 test on windows --- .github/workflows/main.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e280293a..98a9a622 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -62,10 +62,6 @@ jobs: "os": "ubuntu-20.04", "swift": "5.6" }, - { - "os": "windows-latest", - "swift": "5.7" - }, { "os": "windows-latest", "swift": "5.6" From df7dfc461988119e9b92db2ef016621ec2942703 Mon Sep 17 00:00:00 2001 From: soumyamahunt Date: Thu, 15 Dec 2022 16:25:11 +0530 Subject: [PATCH 3/5] wip: reposition env arguments for windows --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 04392bc6..248fcd8f 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "scripts": { "build": "npm exec --package=swiftylab-ci -- build.js", "xcodebuild": "npm exec --package=swiftylab-ci -- xcodebuild.js", - "test": "ASYNCOBJECTS_ENABLE_LOGGING_LEVEL=info npm exec --package=swiftylab-ci -- test.js --parallel", + "test": "npm exec --package=swiftylab-ci -- ASYNCOBJECTS_ENABLE_LOGGING_LEVEL=info test.js --parallel", "archive": "npm exec --package=swiftylab-ci -- archive.js", "pod-lint": "npm exec --package=swiftylab-ci -- pod-lint.js", "generate": "npm exec --package=swiftylab-ci -- generate.js", From 6be6831f9c6ec0fad2f284152a174ea243f7c017 Mon Sep 17 00:00:00 2001 From: soumyamahunt Date: Thu, 15 Dec 2022 18:37:38 +0530 Subject: [PATCH 4/5] wip: use `cross-env` for environment passing --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 248fcd8f..4ebeed29 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "scripts": { "build": "npm exec --package=swiftylab-ci -- build.js", "xcodebuild": "npm exec --package=swiftylab-ci -- xcodebuild.js", - "test": "npm exec --package=swiftylab-ci -- ASYNCOBJECTS_ENABLE_LOGGING_LEVEL=info test.js --parallel", + "test": "cross-env ASYNCOBJECTS_ENABLE_LOGGING_LEVEL=info npm exec --package=swiftylab-ci -- test.js --parallel", "archive": "npm exec --package=swiftylab-ci -- archive.js", "pod-lint": "npm exec --package=swiftylab-ci -- pod-lint.js", "generate": "npm exec --package=swiftylab-ci -- generate.js", From db8ea79c5bc26426802de2065b799b0348954311 Mon Sep 17 00:00:00 2001 From: soumyamahunt Date: Sat, 7 Jan 2023 16:15:28 +0530 Subject: [PATCH 5/5] wip: set bash as default shell --- .github/workflows/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 98a9a622..5d945389 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,6 +22,10 @@ concurrency: group: ci/cd-${{ github.ref }} cancel-in-progress: true +defaults: + run: + shell: bash + jobs: # analyze: # name: Analyze