Skip to content
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

Re-enable Windows builds. #524

Merged
merged 17 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/actions/prepare-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,18 @@ inputs:
runs:
using: "composite"
steps:
- name: "🔧 Setup Java 11"
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
if: runner.os == 'Windows'
- name: "🔧 Install GraalVM (JDK${{ inputs.java-version }})"
uses: graalvm/setup-graalvm@main
with:
components: 'native-image'
github-token: ${{ inputs.github-token }}
java-version: ${{ inputs.java-version }}
distribution: 'graalvm'
github-token: ${{ inputs.github-token }}
- name: "🔒 Configure push access"
if: ${{ inputs.push-access == '1' }}
shell: "bash"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
os: [ ubuntu-20.04 ]
steps:
- name: "☁ Checkout repository"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ssh-key: "${{ secrets.SSH_PRIVATE_KEY }}"
- name: "🔧 Prepare environment"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
os: [ ubuntu-22.04 ]
steps:
- name: "☁ Checkout repository"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ssh-key: "${{ secrets.SSH_PRIVATE_KEY }}"
- name: "🔧 Prepare environment"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test-graalvm-metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ on:
push:
paths:
- 'common/graalvm-reachability-metadata/**'
- '.github/actions/prepare-environment'
- '.github/actions/**'
- '.github/workflows/test-graalvm-metadata.yml'
pull_request:
paths:
- 'common/graalvm-reachability-metadata/**'
- '.github/actions/prepare-environment'
- '.github/actions/**'
- '.github/workflows/test-graalvm-metadata.yml'
workflow_dispatch:

Expand All @@ -28,7 +28,7 @@ jobs:
os: [ ubuntu-20.04 ]
steps:
- name: "☁️ Checkout repository"
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: "🔧 Prepare environment"
uses: ./.github/actions/prepare-environment
with:
Expand All @@ -40,7 +40,7 @@ jobs:
run: ./gradlew :graalvm-reachability-metadata:test
- name: "📜 Upload tests results"
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: tests-results
path: common/graalvm-reachability-metadata/build/reports/tests/
8 changes: 4 additions & 4 deletions .github/workflows/test-junit-platform-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ on:
push:
paths:
- 'common/junit-platform-native/**'
- '.github/actions/prepare-environment'
- '.github/actions/**'
- '.github/workflows/test-junit-platform-native.yml'
pull_request:
paths:
- 'common/junit-platform-native/**'
- '.github/actions/prepare-environment'
- '.github/actions/**'
- '.github/workflows/test-junit-platform-native.yml'
workflow_dispatch:

Expand All @@ -28,7 +28,7 @@ jobs:
os: [ ubuntu-20.04 ]
steps:
- name: "☁️ Checkout repository"
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: "🔧 Prepare environment"
uses: ./.github/actions/prepare-environment
with:
Expand All @@ -42,7 +42,7 @@ jobs:
run: ./gradlew :junit-platform-native:nativeTest
- name: "📜 Upload tests results"
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: tests-results
path: common/junit-platform-native/build/reports/tests/
34 changes: 17 additions & 17 deletions .github/workflows/test-native-gradle-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ on:
- 'native-gradle-plugin/**'
- 'samples/**'
- 'common/**'
- '.github/actions/prepare-environment'
- '.github/actions/**'
- '.github/workflows/test-native-gradle-plugin.yml'
pull_request:
paths:
- 'native-gradle-plugin/**'
- 'samples/**'
- 'common/**'
- '.github/actions/prepare-environment'
- '.github/actions/**'
- '.github/workflows/test-native-gradle-plugin.yml'
workflow_dispatch:

Expand All @@ -32,7 +32,7 @@ jobs:
os: [ ubuntu-20.04 ]
steps:
- name: "☁️ Checkout repository"
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: "🔧 Prepare environment"
uses: ./.github/actions/prepare-environment
with:
Expand All @@ -41,7 +41,7 @@ jobs:
- name: "❓ Unit tests and inspections"
run: ./gradlew :native-gradle-plugin:test :native-gradle-plugin:inspections
- name: "📜 Upload unit test results"
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: unit-tests-results
path: native-gradle-plugin/build/reports/tests/test/
Expand All @@ -57,24 +57,24 @@ jobs:
os: [ ubuntu-20.04 ]
steps:
- name: "☁️ Checkout repository"
uses: actions/checkout@v2
- uses: ./.github/actions/prepare-environment
uses: actions/checkout@v4
- name: "🔧 Prepare environment"
uses: ./.github/actions/prepare-environment
with:
java-version: ${{ matrix.java-version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: "🔧 Install GraalVM (dev)"
uses: graalvm/setup-graalvm@main
with:
components: 'native-image'
github-token: ${{ inputs.github-token }}
java-version: 'dev'
distribution: 'graalvm'
github-token: ${{ inputs.github-token }}
set-java-home: 'false'
- name: "❓ Check and test the plugin"
run: ./gradlew :native-gradle-plugin:functionalTest
- name: "📜 Upload functional tests results"
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: functional-tests-results-graalvm-dev
path: native-gradle-plugin/build/reports/tests/functionalTest/
Expand All @@ -92,8 +92,9 @@ jobs:
os: [ ubuntu-20.04 ]
steps:
- name: "☁️ Checkout repository"
uses: actions/checkout@v3
- uses: ./.github/actions/prepare-environment
uses: actions/checkout@v4
- name: "🔧 Prepare environment"
uses: ./.github/actions/prepare-environment
with:
java-version: ${{ matrix.java-version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -103,14 +104,12 @@ jobs:
run: ./gradlew :native-gradle-plugin:configCacheFunctionalTest -DgradleVersion=${{ matrix.gradle-config-cache-version }}
- name: "📜 Upload functional tests results"
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: functional-tests-results-${{ matrix.gradle-version }}
path: native-gradle-plugin/build/reports/tests/functionalTest/
functional-testing-gradle-plugin-windows:
name: "Windows Gradle plugin functional testing"
if: ${{ false }}
# Disabled due to https://github.com/gradle/native-platform/issues/274
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -119,16 +118,17 @@ jobs:
os: [ windows-latest ]
steps:
- name: "☁️ Checkout repository"
uses: actions/checkout@v3
- uses: ./.github/actions/prepare-environment
uses: actions/checkout@v4
- name: "🔧 Prepare environment"
uses: ./.github/actions/prepare-environment
with:
java-version: ${{ matrix.java-version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: "❓ Check and test the Gradle plugin"
run: ./gradlew :native-gradle-plugin:functionalTest --no-daemon --fail-fast
- name: "📜 Upload tests results"
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: windows-gradle-functional-tests-results
path: native-gradle-plugin/build/reports/tests/
20 changes: 10 additions & 10 deletions .github/workflows/test-native-maven-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ on:
- 'native-maven-plugin/**'
- 'samples/**'
- 'common/**'
- '.github/actions/prepare-environment'
- '.github/actions/**'
- '.github/workflows/test-native-maven-plugin.yml'
pull_request:
paths:
- 'native-maven-plugin/**'
- 'samples/**'
- 'common/**'
- '.github/actions/prepare-environment'
- '.github/actions/**'
- '.github/workflows/test-native-maven-plugin.yml'
workflow_dispatch:

Expand All @@ -32,23 +32,22 @@ jobs:
os: [ ubuntu-20.04 ]
steps:
- name: "☁️ Checkout repository"
uses: actions/checkout@v3
- uses: ./.github/actions/prepare-environment
uses: actions/checkout@v4
- name: "🔧 Prepare environment"
uses: ./.github/actions/prepare-environment
with:
java-version: ${{ matrix.java-version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: "❓ Check and test the plugin"
run: ./gradlew :native-maven-plugin:check --no-daemon
- name: "📜 Upload unit test results"
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: maven-functional-tests-results-${{ matrix.os }}
path: native-maven-plugin/build/reports/tests/
test-native-maven-plugin-windows:
name: "Windows Minimal Tests for Maven plugin"
if: ${{ false }}
# Fails with "Illegal char <�> at index 3: C:\�Users\�RUNNER~1\�AppData\�Local\�Temp\�spock_supports_spaces_in__0_testDirectory18198684407774777428\�with spaces\�local-repo\�org\�apache\�commons\�commons-lang3\�3.8.1\�commons-lang3-3.8.1.jar"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -57,16 +56,17 @@ jobs:
os: [ windows-latest ]
steps:
- name: "☁️ Checkout repository"
uses: actions/checkout@v3
- uses: ./.github/actions/prepare-environment
uses: actions/checkout@v4
- name: "🔧 Prepare environment"
uses: ./.github/actions/prepare-environment
with:
java-version: ${{ matrix.java-version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: "❓ Check and test the Maven plugin"
run: ./gradlew :native-maven-plugin:functionalTest --no-daemon --fail-fast
- name: "📜 Upload tests results"
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: windows-maven-functional-tests-results
path: native-maven-plugin/build/reports/tests/
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import java.nio.file.Files

class JavaApplicationFunctionalTest extends AbstractFunctionalTest {
def "can build a native image for a simple application"() {
def nativeApp = file("build/native/nativeCompile/java-application")
def nativeApp = getExecutableFile("build/native/nativeCompile/java-application")
debug = true

given:
Expand Down Expand Up @@ -85,7 +85,7 @@ class JavaApplicationFunctionalTest extends AbstractFunctionalTest {

@Issue("https://github.com/graalvm/native-build-tools/issues/129")
def "can build a native image with dependencies only needed by native image"() {
def nativeApp = file("build/native/nativeCompile/java-application")
def nativeApp = getExecutableFile("build/native/nativeCompile/java-application")

given:
withSample("java-application-with-extra-sourceset")
Expand Down Expand Up @@ -119,7 +119,7 @@ class JavaApplicationFunctionalTest extends AbstractFunctionalTest {
})
@Ignore("Need to find another way to test this since toolchains will now always be evaluated early")
def "can override toolchain selection"() {
def nativeApp = file("build/native/nativeCompile/java-application")
def nativeApp = getExecutableFile("build/native/nativeCompile/java-application")

given:
withSample("java-application")
Expand Down Expand Up @@ -178,7 +178,7 @@ class JavaApplicationFunctionalTest extends AbstractFunctionalTest {
}

and:
def nativeApp = file("build/native/nativeCompile/java-application")
def nativeApp = getExecutableFile("build/native/nativeCompile/java-application")
nativeApp.exists()

when:
Expand All @@ -191,7 +191,7 @@ class JavaApplicationFunctionalTest extends AbstractFunctionalTest {

@Issue("https://github.com/graalvm/native-build-tools/issues/275")
def "can pass environment variables to the builder process"() {
def nativeApp = file("build/native/nativeCompile/java-application")
def nativeApp = getExecutableFile("build/native/nativeCompile/java-application")

given:
withSample("java-application")
Expand Down Expand Up @@ -221,14 +221,19 @@ class JavaApplicationFunctionalTest extends AbstractFunctionalTest {
@IgnoreIf({ System.getenv("IS_GRAALVM_DEV_BUILD") })
def "can build a native image with PGO instrumentation"() {
def pgoDir = file("src/pgo-profiles/main").toPath()
def nativeApp = file("build/native/nativeCompile/java-application-instrumented")
def nativeApp = getExecutableFile("build/native/nativeCompile/java-application-instrumented")
def pgoFile = file("build/native/nativeCompile/default.iprof")

given:
withSample("java-application")
buildFile << """
graalvmNative.binaries.all {
verbose = true
graalvmNative {
useArgFile = false // required to check for --pgo flag
binaries {
all {
verbose = true
}
}
}
"""

Expand Down
Loading
Loading