Skip to content

Commit 62a6c1f

Browse files
authored
Enable CI for windows (opensearch-project#1140)
Signed-off-by: Peng Huo <[email protected]>
1 parent 8570a1f commit 62a6c1f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+568
-4061
lines changed

.github/workflows/sql-test-and-build-workflow.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,31 @@ env:
2323
jobs:
2424
build:
2525
strategy:
26+
# Run all jobs
27+
fail-fast: false
2628
matrix:
27-
java:
28-
- 8
29-
- 11
30-
- 14
31-
runs-on: ubuntu-latest
29+
entry:
30+
- { os: ubuntu-latest, java: 8 }
31+
- { os: windows-latest, java: 8, os_build_args: -x doctest -x integTest -x jacocoTestReport -x compileJdbc}
32+
- { os: ubuntu-latest, java: 11 }
33+
- { os: windows-latest, java: 11, os_build_args: -x doctest -x integTest -x jacocoTestReport -x compileJdbc}
34+
- { os: ubuntu-latest, java: 14 }
35+
- { os: windows-latest, java: 14, os_build_args: -x doctest -x integTest -x jacocoTestReport -x compileJdbc }
36+
runs-on: ${{ matrix.entry.os }}
3237

3338
steps:
3439
- uses: actions/checkout@v3
3540

36-
- name: Set up JDK ${{ matrix.java }}
41+
- name: Set up JDK ${{ matrix.entry.java }}
3742
uses: actions/setup-java@v1
3843
with:
39-
java-version: ${{ matrix.java }}
44+
java-version: ${{ matrix.entry.java }}
4045

4146
- name: Build with Gradle
42-
run: ./gradlew --continue build assemble -Dopensearch.version=${{ env.OPENSEARCH_VERSION }}
47+
run: ./gradlew --continue build ${{ matrix.entry.os_build_args }}
4348

4449
- name: Run backward compatibility tests
50+
if: ${{ matrix.entry.os == 'ubuntu-latest' }}
4551
run: ./bwctest.sh
4652

4753
- name: Create Artifact Path
@@ -51,7 +57,7 @@ jobs:
5157
5258
# This step uses the codecov-action Github action: https://github.com/codecov/codecov-action
5359
- name: Upload SQL Coverage Report
54-
if: always()
60+
if: ${{ always() && matrix.entry.os == 'ubuntu-latest' }}
5561
uses: codecov/codecov-action@v3
5662
with:
5763
flags: sql-engine
@@ -60,11 +66,11 @@ jobs:
6066
- name: Upload Artifacts
6167
uses: actions/upload-artifact@v2
6268
with:
63-
name: opensearch-sql
69+
name: opensearch-sql-${{ matrix.entry.os }}
6470
path: opensearch-sql-builds
6571

6672
- name: Upload test reports
67-
if: always()
73+
if: ${{ always() && matrix.entry.os == 'ubuntu-latest' }}
6874
uses: actions/upload-artifact@v2
6975
with:
7076
name: test-reports

.github/workflows/sql-workbench-test-and-build-workflow.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,15 @@ env:
1616

1717
jobs:
1818
build:
19-
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
os: [ubuntu-latest, windows-latest]
22+
runs-on: ${{ matrix.os }}
2023
steps:
24+
- name: Enable longer filenames
25+
if: ${{ matrix.os == 'windows-latest' }}
26+
run: git config --system core.longpaths true
27+
2128
- name: Checkout Plugin
2229
uses: actions/checkout@v3
2330

@@ -51,7 +58,7 @@ jobs:
5158
yarn test:jest --coverage
5259
5360
- name: Upload coverage
54-
if: always()
61+
if: ${{ matrix.os == 'ubuntu-latest' }}
5562
uses: codecov/codecov-action@v3
5663
with:
5764
flags: query-workbench
@@ -68,5 +75,5 @@ jobs:
6875
if: always()
6976
uses: actions/upload-artifact@v1 # can't update to v3 because upload fails
7077
with:
71-
name: workbench
78+
name: workbench-${{ matrix.os }}
7279
path: ../OpenSearch-Dashboards/plugins/workbench/build

integ-test/build.gradle

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -140,28 +140,6 @@ integTest {
140140
exclude 'org/opensearch/sql/legacy/OrderIT.class'
141141
}
142142

143-
144-
task docTest(type: RestIntegTestTask) {
145-
dependsOn ':plugin:bundlePlugin'
146-
147-
systemProperty 'tests.security.manager', 'false'
148-
systemProperty('project.root', project.projectDir.absolutePath)
149-
150-
// Tell the test JVM if the cluster JVM is running under a debugger so that tests can use longer timeouts for
151-
// requests. The 'doFirst' delays reading the debug setting on the cluster till execution time.
152-
doFirst { systemProperty 'cluster.debug', getDebug() }
153-
154-
if (System.getProperty("test.debug") != null) {
155-
jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005'
156-
}
157-
158-
include 'org/opensearch/sql/doctest/**/*IT.class'
159-
exclude 'org/opensearch/sql/correctness/**/*IT.class'
160-
exclude 'org/opensearch/sql/ppl/**/*IT.class'
161-
exclude 'org/opensearch/sql/sql/**/*IT.class'
162-
exclude 'org/opensearch/sql/legacy/**/*IT.class'
163-
}
164-
165143
task comparisonTest(type: RestIntegTestTask) {
166144
dependsOn ':plugin:bundlePlugin'
167145

integ-test/src/test/java/org/opensearch/sql/doctest/admin/MonitoringIT.java

Lines changed: 0 additions & 76 deletions
This file was deleted.

integ-test/src/test/java/org/opensearch/sql/doctest/beyond/FullTextIT.java

Lines changed: 0 additions & 137 deletions
This file was deleted.

0 commit comments

Comments
 (0)