Add OS matrix for Ubuntu, Windows and macOS
This commit is contained in:
parent
fc785581ba
commit
ed7a6ff9da
1 changed files with 30 additions and 5 deletions
35
.github/workflows/bld.yml
vendored
35
.github/workflows/bld.yml
vendored
|
@ -4,14 +4,15 @@ on: [push, pull_request, workflow_dispatch]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-bld-project:
|
build-bld-project:
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
COVERAGE_JDK: "17"
|
COVERAGE_JDK: "17"
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
java-version: [17, 21, 24]
|
java-version: [17, 21, 24]
|
||||||
|
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source repository
|
- name: Checkout source repository
|
||||||
|
@ -25,6 +26,30 @@ jobs:
|
||||||
distribution: "zulu"
|
distribution: "zulu"
|
||||||
java-version: ${{ matrix.java-version }}
|
java-version: ${{ matrix.java-version }}
|
||||||
|
|
||||||
|
- name: Download dependencies [bld example]
|
||||||
|
working-directory: examples/java/bld
|
||||||
|
run: ./bld download
|
||||||
|
|
||||||
|
- name: Compile and run [bld example]
|
||||||
|
working-directory: examples/java/bld
|
||||||
|
run: |
|
||||||
|
./bld compile run
|
||||||
|
./bld run-java
|
||||||
|
|
||||||
|
- name: Run example [gradle java examples]
|
||||||
|
working-directory: examples/java/gradle
|
||||||
|
if: matrix.java-version != '24'
|
||||||
|
run: |
|
||||||
|
./gradlew run
|
||||||
|
./gradlew runJava
|
||||||
|
|
||||||
|
- name: Run example [gradle kotlin examples]
|
||||||
|
working-directory: examples/kotlin
|
||||||
|
if: matrix.java-version != '24'
|
||||||
|
run: |
|
||||||
|
./gradlew run
|
||||||
|
./gradlew runJava
|
||||||
|
|
||||||
- name: Download dependencies
|
- name: Download dependencies
|
||||||
run: ./bld download
|
run: ./bld download
|
||||||
|
|
||||||
|
@ -35,18 +60,18 @@ jobs:
|
||||||
run: ./bld jacoco
|
run: ./bld jacoco
|
||||||
|
|
||||||
- name: Remove pom.xml
|
- name: Remove pom.xml
|
||||||
if: success() && matrix.java-version == env.COVERAGE_JDK
|
if: success() && matrix.java-version == env.COVERAGE_JDK && matrix.os == 'ubuntu-latest'
|
||||||
run: rm -rf pom.xml
|
run: rm -rf pom.xml
|
||||||
|
|
||||||
- name: SonarCloud Scan
|
- name: SonarCloud Scan
|
||||||
uses: sonarsource/sonarcloud-github-action@master
|
uses: sonarsource/sonarcloud-github-action@master
|
||||||
if: success() && matrix.java-version == env.COVERAGE_JDK
|
if: success() && matrix.java-version == env.COVERAGE_JDK && matrix.os == 'ubuntu-latest'
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
|
|
||||||
- name: Upload coverage reports to Codecov
|
- name: Upload coverage reports to Codecov
|
||||||
uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@v3
|
||||||
if: success() && matrix.java-version == env.COVERAGE_JDK
|
if: success() && matrix.java-version == env.COVERAGE_JDK && matrix.os == 'ubuntu-latest'
|
||||||
env:
|
env:
|
||||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue