Skip to content

Commit

Permalink
Simplified build
Browse files Browse the repository at this point in the history
  • Loading branch information
sksamuel committed Mar 22, 2022
1 parent 6c514c8 commit 33c026e
Showing 1 changed file with 24 additions and 89 deletions.
113 changes: 24 additions & 89 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ on:
- master

jobs:
linux:
runs-on: ubuntu-latest
linux_tests:
if: github.repository == 'kotest/kotest'
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v3
Expand Down Expand Up @@ -45,106 +45,41 @@ jobs:
name: error-report
path: build-reports.zip

macos:
runs-on: macos-11
mac_tests:
if: github.repository == 'kotest/kotest'
steps:
- name: Checkout the repo
uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: gradle/gradle-build-action@v2

- name: Run macos tests
run: ./gradlew macosX64Test macosArm64Test --scan

- name: publish macos snapshots
run: ./gradlew publishMacosX64PublicationToDeployRepository publishMacosArm64PublicationToDeployRepository

- name: Bundle the build report
if: failure()
run: find . -type d -name 'reports' | zip -@ -r build-reports.zip

- name: Upload the build report
if: failure()
uses: actions/upload-artifact@v3
with:
name: error-report
path: build-reports.zip

ios:
runs-on: macos-11
if: github.repository == 'kotest/kotest'
steps:
- name: Checkout the repo
uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: gradle/gradle-build-action@v2

- name: Run ios tests
run: ./gradlew iosX64Test iosSimulatorArm64Test iosArm64TestKlibrary iosArm32TestKlibrary --scan

- name: publish ios snapshots
run: ./gradlew publishIosX64PublicationToDeployRepository publishIosSimulatorArm64PublicationToDeployRepository publishIosArm64PublicationToDeployRepository publishIosArm32PublicationToDeployRepository

- name: Bundle the build report
if: failure()
run: find . -type d -name 'reports' | zip -@ -r build-reports.zip

- name: Upload the build report
if: failure()
uses: actions/upload-artifact@v3
with:
name: error-report
path: build-reports.zip
strategy:
matrix:
target:
- macosX64Test publishMacosX64PublicationToDeployRepository
- macosArm64Test publishMacosArm64PublicationToDeployRepository
- iosX64Test publishIosX64PublicationToDeployRepository
- iosSimulatorArm64Test publishIosSimulatorArm64PublicationToDeployRepository
- iosArm64TestKlibrary publishIosArm64PublicationToDeployRepository
- iosArm32TestKlibrary publishIosArm32PublicationToDeployRepository
- tvosX64Test publishTvosX64PublicationToDeployRepository
- tvosArm64TestKlibrary publishTvosArm64PublicationToDeployRepository
- watchosArm32TestKlibrary publishWatchosArm32PublicationToDeployRepository
- watchosArm64TestKlibrary publishWatchosArm64PublicationToDeployRepository
- watchosX86Test publishWatchosX86PublicationToDeployRepository
- watchosX64Test publishWatchosX64PublicationToDeployRepository

tvos:
runs-on: macos-11
if: github.repository == 'kotest/kotest'
steps:
- name: Checkout the repo
uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: gradle/gradle-build-action@v2

- name: Run tvos tests
run: ./gradlew tvosX64Test tvosArm64TestKlibrary --scan

- name: publish tvos snapshots
run: ./gradlew publishTvosX64PublicationToDeployRepository publishTvosArm64PublicationToDeployRepository

- name: Bundle the build report
if: failure()
run: find . -type d -name 'reports' | zip -@ -r build-reports.zip

- name: Upload the build report
if: failure()
uses: actions/upload-artifact@v3
with:
name: error-report
path: build-reports.zip

watchos:
runs-on: macos-11
if: github.repository == 'kotest/kotest'
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Setup JDK
uses: actions/setup-java@v3
with:
fetch-depth: 0
distribution: 'zulu'
java-version: '8'

- uses: gradle/gradle-build-action@v2

- name: Run watchos tests
run: ./gradlew watchosArm32TestKlibrary watchosArm64TestKlibrary watchosX86Test watchosX64Test --scan

- name: publish watchos snapshots
run: ./gradlew publishWatchosX86PublicationToDeployRepository publishWatchosX64PublicationToDeployRepository publishWatchosArm32PublicationToDeployRepository publishWatchosArm64PublicationToDeployRepository
- name: Run tests
run: ./gradlew ${{ matrix.target }} --scan

- name: Bundle the build report
if: failure()
Expand Down

0 comments on commit 33c026e

Please sign in to comment.