Skip to content

Commit 5a73c79

Browse files
committed
Fix cross-platform tests
1 parent 46623d2 commit 5a73c79

File tree

4 files changed

+27
-23
lines changed

4 files changed

+27
-23
lines changed

Diff for: .gitattributes

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
*.bat text eol=crlf
1+
/gradlew text eol=lf
2+
*.bat text eol=crlf

Diff for: .github/workflows/cross-platform-testing.yml

+17-20
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
name: Run Cross-Platform Tests
22

3-
on:
4-
workflow_run:
5-
workflows: [Create Development Release]
6-
types: [completed]
7-
workflow_dispatch:
3+
on: [ push ]
84

95
jobs:
106
cross_platform_tests:
117
name: Test
128
runs-on: ${{ matrix.os }}
13-
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
149
strategy:
1510
fail-fast: false
1611
matrix:
@@ -39,7 +34,7 @@ jobs:
3934
uses: Vampire/setup-wsl@v2
4035
with:
4136
distribution: Ubuntu-20.04
42-
additional-packages: curl unzip wget apt-transport-https gnupg
37+
additional-packages: curl unzip wget apt-transport-https gnupg autoconf
4338
- name: Set up JDK ${{ matrix.java-version }} on WSL
4439
if: ${{ runner.os == 'Windows' }}
4540
run: |
@@ -53,38 +48,40 @@ jobs:
5348
with:
5449
java-version: ${{ matrix.java-version }}
5550
distribution: 'temurin'
56-
- name: Download and extract build validation Scripts
51+
- name: Checkout
52+
uses: actions/checkout@v3
53+
- name: Set up Gradle
54+
uses: gradle/gradle-build-action@v2
55+
- name: Build and extract build validation Scripts
5756
run: |
58-
curl -L -O https://github.com/gradle/gradle-enterprise-build-validation-scripts/releases/download/development-latest/gradle-enterprise-gradle-build-validation-dev.zip
59-
unzip -o gradle-enterprise-gradle-build-validation-*.zip
60-
curl -L -O https://github.com/gradle/gradle-enterprise-build-validation-scripts/releases/download/development-latest/gradle-enterprise-maven-build-validation-dev.zip
61-
unzip -o gradle-enterprise-maven-build-validation-*.zip
57+
./gradlew build
58+
unzip -q -o build/distributions/gradle-enterprise-gradle-build-validation-dev.zip
59+
unzip -q -o build/distributions/gradle-enterprise-maven-build-validation-dev.zip
6260
- name: Run Gradle Experiment 01
6361
run: |
6462
cd gradle-enterprise-gradle-build-validation
65-
./01-validate-incremental-building.sh -r https://github.com/etiennestuder/java-ordered-properties -t build -s https://ge.solutions-team.gradle.com
63+
./01-validate-incremental-building.sh -r https://github.com/etiennestuder/java-ordered-properties -t build -s https://ge.solutions-team.gradle.com --debug
6664
- name: Run Gradle Experiment 02
6765
run: |
6866
cd gradle-enterprise-gradle-build-validation
69-
./02-validate-local-build-caching-same-location.sh -r https://github.com/etiennestuder/java-ordered-properties -t build -s https://ge.solutions-team.gradle.com
67+
./02-validate-local-build-caching-same-location.sh -r https://github.com/etiennestuder/java-ordered-properties -t build -s https://ge.solutions-team.gradle.com --debug
7068
- name: Run Gradle Experiment 03
7169
run: |
7270
cd gradle-enterprise-gradle-build-validation
73-
./03-validate-local-build-caching-different-locations.sh -r https://github.com/etiennestuder/java-ordered-properties -t build -s https://ge.solutions-team.gradle.com
71+
./03-validate-local-build-caching-different-locations.sh -r https://github.com/etiennestuder/java-ordered-properties -t build -s https://ge.solutions-team.gradle.com --debug
7472
- name: Run Gradle Experiment 04
7573
run: |
7674
cd gradle-enterprise-gradle-build-validation
77-
./04-validate-remote-build-caching-ci-ci.sh -1 https://ge.solutions-team.gradle.com/s/xildcv6frocau -2 https://ge.solutions-team.gradle.com/s/m5e7tyzedn562
75+
./04-validate-remote-build-caching-ci-ci.sh -1 https://ge.solutions-team.gradle.com/s/xildcv6frocau -2 https://ge.solutions-team.gradle.com/s/m5e7tyzedn562 --debug
7876
- name: Run Maven Experiment 01
7977
run: |
8078
cd gradle-enterprise-maven-build-validation
81-
./01-validate-local-build-caching-same-location.sh -r https://github.com/gradle/maven-build-scan-quickstart.git -g test -s https://ge.solutions-team.gradle.com
79+
./01-validate-local-build-caching-same-location.sh -r https://github.com/gradle/maven-build-scan-quickstart.git -g test -s https://ge.solutions-team.gradle.com --debug
8280
- name: Run Maven Experiment 02
8381
run: |
8482
cd gradle-enterprise-maven-build-validation
85-
./02-validate-local-build-caching-different-locations.sh -r https://github.com/gradle/maven-build-scan-quickstart.git -g test -s https://ge.solutions-team.gradle.com
83+
./02-validate-local-build-caching-different-locations.sh -r https://github.com/gradle/maven-build-scan-quickstart.git -g test -s https://ge.solutions-team.gradle.com --debug
8684
- name: Run Maven Experiment 03
8785
run: |
8886
cd gradle-enterprise-maven-build-validation
89-
./03-validate-remote-build-caching-ci-ci.sh -1 https://ge.solutions-team.gradle.com/s/oll3ve3wdv2t6 -2 https://ge.solutions-team.gradle.com/s/eaue4kvqnvnay
90-
87+
./03-validate-remote-build-caching-ci-ci.sh -1 https://ge.solutions-team.gradle.com/s/oll3ve3wdv2t6 -2 https://ge.solutions-team.gradle.com/s/eaue4kvqnvnay --debug

Diff for: components/scripts/lib/gradle.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ invoke_gradle() {
3939

4040
# https://stackoverflow.com/a/31485948
4141
while IFS= read -r -d ''; do
42-
args+=( "$REPLY" )
42+
local extra_arg="$REPLY"
43+
if [ -n "$extra_arg" ]; then
44+
args+=("$extra_arg")
45+
fi
4346
done < <(xargs printf '%s\0' <<<"$extra_args")
4447

4548
args+=("$@")

Diff for: components/scripts/lib/maven.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ invoke_maven() {
6767

6868
# https://stackoverflow.com/a/31485948
6969
while IFS= read -r -d ''; do
70-
args+=( "$REPLY" )
70+
local extra_arg="$REPLY"
71+
if [ -n "$extra_arg" ]; then
72+
args+=("$extra_arg")
73+
fi
7174
done < <(xargs printf '%s\0' <<<"$extra_args")
7275

7376
args+=("$@")

0 commit comments

Comments
 (0)