Skip to content

Commit

Permalink
Merge pull request #17 from mxcl/ci/matrix
Browse files Browse the repository at this point in the history
ci/matrix
  • Loading branch information
mxcl authored Jun 7, 2021
2 parents 9b7e41a + e50cd3a commit 1872f15
Show file tree
Hide file tree
Showing 18 changed files with 272 additions and 110 deletions.
52 changes: 44 additions & 8 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,45 +35,80 @@ jobs:
action: test

verify:
name: test.${{ matrix.platform }}.${{ matrix.xcode }}
name: ${{ matrix.platform }} (${{ matrix.action }}, ${{ matrix.xcode }}${{ matrix.codecov && ', cc' || ''}})
runs-on: macos-10.15
strategy:
matrix:
platform:
- iOS
- tvOS
- macOS
- watchOS
xcode:
- ^10
- ^11
- ^12
codecov:
- false
action:
- test
errors-as-warnings:
- false
steps:
- uses: actions/checkout@v2
- uses: ./
with:
platform: ${{ matrix.platform }}
xcode: ${{ matrix.xcode }}
working-directory: fixture/${{ matrix.platform }}
code-coverage: ${{ matrix.codecov }}
action: ${{ matrix.action }}
errors-as-warnings: ${{ matrix.errors-as-warnings }}

# watchOS has more complexity, so we need a larger matrix to ensure
# we are covering all our code paths
verify-watchos:
name: ${{ matrix.action }}.${{ matrix.platform }}.${{ matrix.xcode }}${{ matrix.codecov && '+codecov' || ''}}
verify2:
name: ${{ matrix.platform }} (${{ matrix.action }}, ${{ matrix.xcode }}${{ matrix.codecov && ', cc' || ''}})
runs-on: macos-10.15
strategy:
matrix:
platform:
- watchOS
xcode:
- ^10
- ^11
- ^12
codecov:
- false
action:
- build
- test
errors-as-warnings:
- false
steps:
- uses: actions/checkout@v2
- uses: ./
with:
platform: ${{ matrix.platform }}
xcode: ${{ matrix.xcode }}
working-directory: fixture/${{ matrix.platform }}
code-coverage: ${{ matrix.codecov }}
action: ${{ matrix.action }}
errors-as-warnings: ${{ matrix.errors-as-warnings }}

verify3:
name: ${{ matrix.platform }} (${{ matrix.action }}, ${{ matrix.xcode }}${{ matrix.codecov && ', cc' || ''}}${{ matrix.errors-as-warnings && ', errors-as-warnings' || ''}})
runs-on: macos-10.15
strategy:
matrix:
platform:
- macOS
xcode:
- ^12
codecov:
- true
- false
action:
- build
- test
errors-as-warnings:
- true
- false
steps:
- uses: actions/checkout@v2
- uses: ./
Expand All @@ -83,3 +118,4 @@ jobs:
working-directory: fixture/${{ matrix.platform }}
code-coverage: ${{ matrix.codecov }}
action: ${{ matrix.action }}
errors-as-warnings: ${{ matrix.errors-as-warnings }}
11 changes: 5 additions & 6 deletions .github/workflows/vx-tagger.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
on:
release:
types: published
types: [published, updated]
jobs:
tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: echo "v=${v:0:1}" >> $GITHUB_ENV
env:
v: ${{ github.event.release.tag_name }}
- run: git tag --force v$v
- run: git push origin v$v --force
- uses: sersoft-gmbh/running-release-tags-action@master
with:
github-token: ${{secrets.GITHUB_TOKEN}}
if: github.event.release.prerelease == false
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

File renamed without changes.
9 changes: 9 additions & 0 deletions fixture/debug/test.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
#if !DEBUG
#error("DEBUG not defined")
#endif

func foo() -> Int {
return 5
}

func bar() {
// deliberate warning
foo()
}
7 changes: 7 additions & 0 deletions fixture/iOS/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.DS_Store
/.build
/Packages
/*.xcodeproj
xcuserdata/
DerivedData/
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
12 changes: 12 additions & 0 deletions fixture/iOS/test.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#if !os(iOS)
#error("!os(iOS)")
#endif

func foo() -> Int {
return 5
}

func bar() {
// deliberate warning
foo()
}
7 changes: 7 additions & 0 deletions fixture/macOS/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.DS_Store
/.build
/Packages
/*.xcodeproj
xcuserdata/
DerivedData/
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
12 changes: 12 additions & 0 deletions fixture/macOS/test.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#if !os(macOS)
#error("!os(macOS)")
#endif

func foo() -> Int {
return 5
}

func bar() {
// deliberate warning
foo()
}
7 changes: 7 additions & 0 deletions fixture/release/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.DS_Store
/.build
/Packages
/*.xcodeproj
xcuserdata/
DerivedData/
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
9 changes: 9 additions & 0 deletions fixture/release/test.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
#if DEBUG
#error("DEBUG defined")
#endif

func foo() -> Int {
return 5
}

func bar() {
// deliberate warning
foo()
}
7 changes: 7 additions & 0 deletions fixture/tvOS/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.DS_Store
/.build
/Packages
/*.xcodeproj
xcuserdata/
DerivedData/
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
12 changes: 12 additions & 0 deletions fixture/tvOS/test.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#if !os(tvOS)
#error("!os(tvOS)")
#endif

func foo() -> Int {
return 5
}

func bar() {
// deliberate warning
foo()
}
7 changes: 7 additions & 0 deletions fixture/watchOS/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.DS_Store
/.build
/Packages
/*.xcodeproj
xcuserdata/
DerivedData/
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
12 changes: 12 additions & 0 deletions fixture/watchOS/test.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#if !os(watchOS)
#error("!os(watchOS)")
#endif

func foo() -> Int {
return 5
}

func bar() {
// deliberate warning
foo()
}
Loading

0 comments on commit 1872f15

Please sign in to comment.