Skip to content

Commit

Permalink
build: add Windows to CI matrix (#1006)
Browse files Browse the repository at this point in the history
* Run CI on Windows

* Update gradle.yml

* Update gradle.yml

* Use gradle property

* Use gradleVersion as System property key

* Revert

* Run SonarQube Scanner on Ubuntu only

* Rearrange

* Mark gradlew.bat end with CRLF
  • Loading branch information
Goooler authored Dec 3, 2023
1 parent c2adbab commit b9ccf30
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 98 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
gradlew linguist-generated=true
gradlew.bat linguist-generated=true
gradlew.bat eol=crlf linguist-generated=true
11 changes: 6 additions & 5 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ on:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
gradle: ['7.6.2', '8.1', 'current']
gradle: [ '7.6.2', '8.1', 'current' ]
os: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -27,7 +28,7 @@ jobs:
with:
node-version-file: '.nvmrc'
cache: npm
if: matrix.gradle == '7.6.2'
if: matrix.gradle == '7.6.2' && matrix.os == 'ubuntu-latest'
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
Expand All @@ -43,7 +44,7 @@ jobs:
rm -rf build/libs/*.jar
npm ci
npx semantic-release
if: matrix.gradle == '7.6.2' && github.repository == 'spotbugs/spotbugs-gradle-plugin'
if: matrix.gradle == '7.6.2' && matrix.os == 'ubuntu-latest' && github.repository == 'spotbugs/spotbugs-gradle-plugin'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
Expand All @@ -53,7 +54,7 @@ jobs:
if [ "$SONAR_LOGIN" != "" ]; then
./gradlew sonarqube -Dsonar.login=$SONAR_LOGIN --no-daemon
fi
if: matrix.gradle == '7.6.2' && github.repository == 'spotbugs/spotbugs-gradle-plugin'
if: matrix.gradle == '7.6.2' && matrix.os == 'ubuntu-latest' && github.repository == 'spotbugs/spotbugs-gradle-plugin'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_LOGIN: ${{ secrets.SONAR_LOGIN }}
Expand Down
184 changes: 92 additions & 92 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b9ccf30

Please sign in to comment.