Remove deprecated use of getConvention
#506
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Test native-gradle-plugin" | |
on: | |
push: | |
paths: | |
- 'native-gradle-plugin/**' | |
- 'samples/**' | |
- 'common/**' | |
- '.github/actions/prepare-environment' | |
- '.github/workflows/test-native-gradle-plugin.yml' | |
pull_request: | |
paths: | |
- 'native-gradle-plugin/**' | |
- 'samples/**' | |
- 'common/**' | |
- '.github/actions/prepare-environment' | |
- '.github/workflows/test-native-gradle-plugin.yml' | |
workflow_dispatch: | |
concurrency: | |
group: "workflow = ${{ github.workflow }}, ref = ${{ github.event.ref }}, pr = ${{ github.event.pull_request.id }}" | |
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'graalvm/native-build-tools' }} | |
jobs: | |
test-native-gradle-plugin: | |
name: "Sanity checks" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
java-version: [ 17 ] | |
os: [ ubuntu-20.04 ] | |
steps: | |
- name: "☁️ Checkout repository" | |
uses: actions/checkout@v3 | |
- name: "🔧 Prepare environment" | |
uses: ./.github/actions/prepare-environment | |
with: | |
java-version: ${{ matrix.java-version }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- 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 | |
with: | |
name: unit-tests-results | |
path: native-gradle-plugin/build/reports/tests/test/ | |
functional-testing-gradle-plugin-dev: | |
name: "Functional testing (GraalVM Dev Build)" | |
runs-on: ${{ matrix.os }} | |
env: | |
IS_GRAALVM_DEV_BUILD: 'true' | |
strategy: | |
fail-fast: false | |
matrix: | |
java-version: [ 17 ] | |
os: [ ubuntu-20.04 ] | |
steps: | |
- name: "☁️ Checkout repository" | |
uses: actions/checkout@v2 | |
- 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' | |
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 | |
with: | |
name: functional-tests-results-graalvm-dev | |
path: native-gradle-plugin/build/reports/tests/functionalTest/ | |
functional-testing-gradle-plugin: | |
name: "Functional testing" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
gradle-version: ["current", "7.4"] | |
gradle-config-cache-version: ["current", "8.0.1"] | |
# Following versions are disabled temporarily in order to speed up PR testing | |
# "7.3.3", "7.2", "7.1", "6.8.3" | |
java-version: [ 17 ] | |
os: [ ubuntu-20.04 ] | |
steps: | |
- name: "☁️ Checkout repository" | |
uses: actions/checkout@v3 | |
- 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-gradle-plugin:functionalTest -DgradleVersion=${{ matrix.gradle-version }} | |
- name: "❓ Check and test the plugin with configuration cache" | |
run: ./gradlew :native-gradle-plugin:configCacheFunctionalTest -DgradleVersion=${{ matrix.gradle-config-cache-version }} | |
- name: "📜 Upload functional tests results" | |
if: always() | |
uses: actions/upload-artifact@v2 | |
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 | |
matrix: | |
java-version: [ 17 ] | |
os: [ windows-latest ] | |
steps: | |
- name: "☁️ Checkout repository" | |
uses: actions/checkout@v3 | |
- 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 | |
with: | |
name: windows-gradle-functional-tests-results | |
path: native-gradle-plugin/build/reports/tests/ |