From 710eab3d1bcc6ce29988dc2da5076e81eda2d5cc Mon Sep 17 00:00:00 2001 From: Marcus Hert da Coregio Date: Wed, 5 May 2021 17:12:58 -0300 Subject: [PATCH 01/10] Fix Build Regex Error with File.separator on Windows --- .../src/test/resources/samples/showcase/settings.gradle | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/test/resources/samples/showcase/settings.gradle b/buildSrc/src/test/resources/samples/showcase/settings.gradle index 1997a84cc3..5b63a3c3ab 100644 --- a/buildSrc/src/test/resources/samples/showcase/settings.gradle +++ b/buildSrc/src/test/resources/samples/showcase/settings.gradle @@ -1,3 +1,5 @@ +import java.util.regex.Matcher + rootProject.name = 'spring-gradle-build-conventions-sample' @@ -10,7 +12,7 @@ String rootDirPath = rootDir.absolutePath + File.separator projects.each { File buildFile -> String buildFilePath = buildFile.parentFile.absolutePath - String projectPath = buildFilePath.replace(rootDirPath, '').replaceAll(File.separator, ':') + String projectPath = buildFilePath.replace(rootDirPath, '').replaceAll(Matcher.quoteReplacement(File.separator), ':') include projectPath @@ -20,4 +22,4 @@ projects.each { File buildFile -> project.buildFileName = buildFile.name } project.projectDir = buildFile.parentFile -} \ No newline at end of file +} From 6bb991037f757f14ce3448334e14a9c4483d1ab9 Mon Sep 17 00:00:00 2001 From: Marcus Hert da Coregio Date: Fri, 7 May 2021 08:47:26 -0300 Subject: [PATCH 02/10] Add New Job to Verify Windows Build on PR Workflow --- .github/workflows/pr-build-workflow.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/pr-build-workflow.yml b/.github/workflows/pr-build-workflow.yml index 7d98efeaa0..8a9e74e4a7 100644 --- a/.github/workflows/pr-build-workflow.yml +++ b/.github/workflows/pr-build-workflow.yml @@ -20,3 +20,20 @@ jobs: key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} - name: Build with Gradle run: ./gradlew clean build --continue --scan + check_windows: + name: Check Windows + runs-on: windows-latest + if: github.repository == 'spring-projects/spring-security' + steps: + - uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: '11' + - name: Cache Gradle packages + uses: actions/cache@v2 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + - name: Check with Gradle + run: ./gradlew check From 5d1e2ed5012efa6f3fe9a63400d99dec2bf72d00 Mon Sep 17 00:00:00 2001 From: Marcus Hert da Coregio Date: Fri, 7 May 2021 08:47:47 -0300 Subject: [PATCH 03/10] Add New Job to Verify Windows Build on CI Workflow --- .../continuous-integration-workflow.yml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 65201e4596..a47fe6dfb1 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -64,6 +64,26 @@ jobs: with: name: errors path: job-${{ github.job }}.txt + check_windows: + name: Check Windows + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: '11' + - name: Cache Gradle packages + uses: actions/cache@v2 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + - name: Check with Gradle + run: | + export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER" + export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD" + export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY" + ./gradlew check -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD" snapshot_tests: name: Test against snapshots runs-on: ubuntu-latest From c12c330614ffa78da2f1b5e5aec8ad08bc8d1c63 Mon Sep 17 00:00:00 2001 From: Marcus Hert da Coregio Date: Fri, 7 May 2021 08:50:22 -0300 Subject: [PATCH 04/10] Normalize line endings to LF Closes gh-9727 --- .gitattributes | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..d08e62b7aa --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Normalize line endings to LF. +* text eol=lf \ No newline at end of file From bf13892f0042ca3feef1dde271a4f0f5bfcc1aef Mon Sep 17 00:00:00 2001 From: Marcus Hert da Coregio Date: Fri, 7 May 2021 11:56:43 -0300 Subject: [PATCH 05/10] Update .gitattributes with binary files --- .gitattributes | 11 +++++++++-- .github/workflows/continuous-integration-workflow.yml | 6 +++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.gitattributes b/.gitattributes index d08e62b7aa..eb1f7ad207 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,9 @@ -# Normalize line endings to LF. -* text eol=lf \ No newline at end of file +# Normalize line endings to auto. +* text auto + +# Ensure the following are treated as binary. +*.jar binary +*.jpeg binary +*.jpg binary +*.keystore binary +*.cer binary diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index a47fe6dfb1..176cb1d7dd 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -80,9 +80,9 @@ jobs: key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} - name: Check with Gradle run: | - export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER" - export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD" - export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY" + set GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER" + set GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD" + set GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY" ./gradlew check -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD" snapshot_tests: name: Test against snapshots From b0eca86959879069ece41c8ba42ea99659c33670 Mon Sep 17 00:00:00 2001 From: Josh Cummings Date: Mon, 10 May 2021 08:29:44 -0600 Subject: [PATCH 06/10] Change to eol=lf --- .gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index eb1f7ad207..e5f7bb174a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,5 @@ # Normalize line endings to auto. -* text auto +* text eol=lf # Ensure the following are treated as binary. *.jar binary From d7a68eeca8f2ce15ca96aa2371c3fada132848fb Mon Sep 17 00:00:00 2001 From: Josh Cummings Date: Mon, 10 May 2021 08:49:14 -0600 Subject: [PATCH 07/10] Run CI on fork --- .github/workflows/pr-build-workflow.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pr-build-workflow.yml b/.github/workflows/pr-build-workflow.yml index 8a9e74e4a7..9793224abd 100644 --- a/.github/workflows/pr-build-workflow.yml +++ b/.github/workflows/pr-build-workflow.yml @@ -23,7 +23,6 @@ jobs: check_windows: name: Check Windows runs-on: windows-latest - if: github.repository == 'spring-projects/spring-security' steps: - uses: actions/checkout@v2 - name: Set up JDK From e00a5f4e22ca93b9d046ec0454f472be9009264e Mon Sep 17 00:00:00 2001 From: Josh Cummings Date: Mon, 10 May 2021 09:03:38 -0600 Subject: [PATCH 08/10] Mark others as binary --- .gitattributes | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitattributes b/.gitattributes index e5f7bb174a..bb63bb6d80 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,8 +2,13 @@ * text eol=lf # Ensure the following are treated as binary. +*.bat binary +*.graffle binary *.jar binary *.jpeg binary *.jpg binary *.keystore binary +*.odg binary +*.otg binary +*.png binary *.cer binary From 06396b098daf4a727e1b6027cc62f1a520490661 Mon Sep 17 00:00:00 2001 From: Josh Cummings Date: Mon, 10 May 2021 09:04:08 -0600 Subject: [PATCH 09/10] Add stacktrace for debugging checkFormatMain --- .github/workflows/pr-build-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-build-workflow.yml b/.github/workflows/pr-build-workflow.yml index 9793224abd..37e112ffbd 100644 --- a/.github/workflows/pr-build-workflow.yml +++ b/.github/workflows/pr-build-workflow.yml @@ -35,4 +35,4 @@ jobs: path: ~/.gradle/caches key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} - name: Check with Gradle - run: ./gradlew check + run: ./gradlew :saml2-service-provider-core:checkFormainMain --stacktrace From 22148d93647e89a5e57c499a720c347fdf10931a Mon Sep 17 00:00:00 2001 From: Josh Cummings Date: Mon, 10 May 2021 09:10:28 -0600 Subject: [PATCH 10/10] Fix Typo --- .github/workflows/pr-build-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-build-workflow.yml b/.github/workflows/pr-build-workflow.yml index 37e112ffbd..16d1523124 100644 --- a/.github/workflows/pr-build-workflow.yml +++ b/.github/workflows/pr-build-workflow.yml @@ -35,4 +35,4 @@ jobs: path: ~/.gradle/caches key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} - name: Check with Gradle - run: ./gradlew :saml2-service-provider-core:checkFormainMain --stacktrace + run: ./gradlew :saml2-service-provider-core:checkFormatMain --stacktrace