-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure Github CI to run tests on Windows #75
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ on: | |
schedule: | ||
- cron: '0 23 * * *' | ||
jobs: | ||
build-released-jvm: | ||
name: JVM build - released Quarkus | ||
linux-build-released-jvm: | ||
name: Linux - JVM build - released Quarkus | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
|
@@ -35,8 +35,8 @@ jobs: | |
with: | ||
name: ci-artifacts | ||
path: artifacts-jvm${{ matrix.java }}.zip | ||
build-released-native: | ||
name: Native build - released Quarkus | ||
linux-build-released-native: | ||
name: Linux - Native build - released Quarkus | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
|
@@ -96,4 +96,90 @@ jobs: | |
if: failure() | ||
with: | ||
name: ci-artifacts | ||
path: artifacts-code-start${{ matrix.java }}.zip | ||
path: artifacts-code-start${{ matrix.java }}.zip | ||
windows-build-released-jvm: | ||
name: Windows - JVM build - released Quarkus | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
java: [ 11 ] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: Install JDK {{ matrix.java }} | ||
uses: joschi/setup-jdk@e87a7cec853d2dd7066adf837fe12bf0f3d45e52 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
- name: Build with Maven | ||
shell: bash | ||
run: | | ||
mvn -V -B -s .github/mvn-settings.xml clean verify -DexcludeTags='product,native,codequarkus' | ||
- name: Zip Artifacts | ||
if: failure() | ||
shell: bash | ||
run: | | ||
# Disambiguate windows find from cygwin find | ||
/usr/bin/find . -name '*-reports' -o -name 'archived-logs' -type d | tar -czf artifacts-windows-jvm${{ matrix.java }}.tar -T - | ||
- name: Archive artifacts | ||
uses: actions/upload-artifact@v1 | ||
if: failure() | ||
with: | ||
name: ci-artifacts | ||
path: artifacts-windows-jvm${{ matrix.java }}.tar | ||
windows-build-released-native: | ||
name: Windows - Native build - released Quarkus | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
java: [ 11 ] | ||
# Version 21.1 is not working due to https://github.com/quarkusio/quarkus/issues/14904 | ||
graalvm-version: [ "21.0.0.2.java11" ] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: Install JDK {{ matrix.java }} | ||
uses: joschi/setup-jdk@e87a7cec853d2dd7066adf837fe12bf0f3d45e52 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
- name: Install cl.exe | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
- uses: microsoft/setup-msbuild@v1 | ||
- name: Setup GraalVM | ||
id: setup-graalvm | ||
uses: DeLaGuardo/setup-graalvm@master | ||
with: | ||
graalvm-version: ${{ matrix.graalvm-version }} | ||
java: java${{ matrix.graalvm-version }} | ||
- name: Install native-image component | ||
run: | | ||
gu.cmd install native-image | ||
- name: Configure Pagefile | ||
# Increased the page-file size due to memory-consumption of native-image command | ||
# For details see https://github.com/actions/virtual-environments/issues/785 | ||
uses: al-cheb/[email protected] | ||
- name: Build with Maven | ||
run: | | ||
mvn -V -B -s .github/mvn-settings.xml clean verify -DexcludeTags="product,codequarkus" -Dquarkus.native.native-image-xmx=6g | ||
shell: cmd | ||
- name: Zip Artifacts | ||
if: failure() | ||
shell: bash | ||
run: | | ||
# Disambiguate windows find from cygwin find | ||
/usr/bin/find . -name '*-reports' -o -name 'archived-logs' -type d | tar -czf artifacts-windows-native${{ matrix.java }}.tar -T - | ||
- name: Archive artifacts | ||
uses: actions/upload-artifact@v1 | ||
if: failure() | ||
with: | ||
name: ci-artifacts | ||
path: artifacts-windows-native${{ matrix.java }}.tar |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,10 +68,7 @@ public void testRuntime(TestInfo testInfo, Apps app, MvnCmds mvnCmds, String sub | |
// Clean target directory | ||
cleanTarget(app); | ||
|
||
// Delete dir with special chars | ||
if (appDestDir.exists()) { | ||
FileUtils.deleteDirectory(appDestDir); | ||
} | ||
removeDirWithSpecialCharacters(appDestDir); | ||
|
||
// Make dir with special chars | ||
if (!appDestDir.mkdir()) { | ||
|
@@ -155,28 +152,24 @@ public void testRuntime(TestInfo testInfo, Apps app, MvnCmds mvnCmds, String sub | |
} | ||
writeReport(cn, mn, whatIDidReport.toString()); | ||
|
||
// Remove dir with special chars | ||
if (appDestDir.exists()) { | ||
FileUtils.deleteDirectory(appDestDir); | ||
} | ||
removeDirWithSpecialCharacters(appDestDir); | ||
} | ||
} | ||
|
||
|
||
@Test | ||
public void spacesJVM(TestInfo testInfo) throws IOException, InterruptedException { | ||
testRuntime(testInfo, Apps.JAX_RS_MINIMAL, MvnCmds.JVM, "s p a c e s"); | ||
testRuntime(testInfo, Apps.JAX_RS_MINIMAL, MvnCmds.JVM, "s p a c e s j v m"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Explanation about this change in PR description |
||
} | ||
|
||
@Test | ||
public void spacesDEV(TestInfo testInfo) throws IOException, InterruptedException { | ||
testRuntime(testInfo, Apps.JAX_RS_MINIMAL, MvnCmds.DEV, "s p a c e s"); | ||
testRuntime(testInfo, Apps.JAX_RS_MINIMAL, MvnCmds.DEV, "s p a c e s d e v"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Explanation about this change in PR description |
||
} | ||
|
||
@Test | ||
@Tag("native") | ||
public void spacesNative(TestInfo testInfo) throws IOException, InterruptedException { | ||
testRuntime(testInfo, Apps.JAX_RS_MINIMAL, MvnCmds.NATIVE, "s p a c e s"); | ||
testRuntime(testInfo, Apps.JAX_RS_MINIMAL, MvnCmds.NATIVE, "s p a c e s n a t i v e"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Explanation about this change in PR description |
||
} | ||
|
||
@Test | ||
|
@@ -193,6 +186,7 @@ public void specialDEV(TestInfo testInfo) throws IOException, InterruptedExcepti | |
|
||
@Test | ||
@Tag("native") | ||
@DisabledOnOs({OS.WINDOWS}) // https://github.com/quarkusio/quarkus/issues/9707 | ||
public void specialNative(TestInfo testInfo) throws IOException, InterruptedException { | ||
testRuntime(testInfo, Apps.JAX_RS_MINIMAL, MvnCmds.NATIVE, ",;~!@#$%^&()"); | ||
} | ||
|
@@ -203,12 +197,14 @@ public void diacriticsJVM(TestInfo testInfo) throws IOException, InterruptedExce | |
} | ||
|
||
@Test | ||
@DisabledOnOs({OS.WINDOWS}) // https://github.com/quarkusio/quarkus/issues/9707 | ||
public void diacriticsDEV(TestInfo testInfo) throws IOException, InterruptedException { | ||
testRuntime(testInfo, Apps.JAX_RS_MINIMAL, MvnCmds.DEV, "ěščřžýáíéůú"); | ||
} | ||
|
||
@Test | ||
@Tag("native") | ||
@DisabledOnOs({OS.WINDOWS}) // https://github.com/quarkusio/quarkus/issues/9707 | ||
public void diacriticsNative(TestInfo testInfo) throws IOException, InterruptedException { | ||
testRuntime(testInfo, Apps.JAX_RS_MINIMAL, MvnCmds.NATIVE, "ěščřžýáíéůú"); | ||
} | ||
|
@@ -226,6 +222,7 @@ public void japaneseDEV(TestInfo testInfo) throws IOException, InterruptedExcept | |
|
||
@Test | ||
@Tag("native") | ||
@DisabledOnOs({OS.WINDOWS}) // https://github.com/quarkusio/quarkus/issues/9707 | ||
public void japaneseNative(TestInfo testInfo) throws IOException, InterruptedException { | ||
testRuntime(testInfo, Apps.JAX_RS_MINIMAL, MvnCmds.NATIVE, "元気かい"); | ||
} | ||
|
@@ -243,8 +240,20 @@ public void otherDEV(TestInfo testInfo) throws IOException, InterruptedException | |
|
||
@Test | ||
@Tag("native") | ||
@DisabledOnOs({OS.WINDOWS}) // https://github.com/quarkusio/quarkus/issues/9707 | ||
public void otherNative(TestInfo testInfo) throws IOException, InterruptedException { | ||
testRuntime(testInfo, Apps.JAX_RS_MINIMAL, MvnCmds.NATIVE, "Îñţérñåţîöñåļîžåţîờñ"); | ||
} | ||
|
||
private void removeDirWithSpecialCharacters(File appDestDir) { | ||
// Remove dir with special chars | ||
try { | ||
if (appDestDir.exists()) { | ||
FileUtils.deleteDirectory(appDestDir); | ||
} | ||
} catch (IOException ignored) { | ||
// ignored when the folder could not be deleted. | ||
} | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explanation about this change in PR description