build plugin #13
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: build plugin | |
on: | |
workflow_dispatch: | |
jobs: | |
generate-build-number: | |
runs-on: ubuntu-latest | |
outputs: | |
build_number: ${{ steps.buildnumber.outputs.build_number }} | |
steps: | |
- name: Generate build number | |
uses: einaregilsson/build-number@v3 | |
id: buildnumber | |
with: | |
token: ${{ secrets.github_token }} | |
prefix: rust | |
build-native-code: | |
uses: ./.github/workflows/build-native-code.yml | |
with: | |
rust-version: stable | |
cache: false | |
build: | |
needs: [ generate-build-number, build-native-code ] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
platform-version: [ 241, 242 ] | |
env: | |
ORG_GRADLE_PROJECT_buildNumber: ${{ needs.generate-build-number.outputs.build_number }} | |
ORG_GRADLE_PROJECT_platformVersion: ${{ matrix.platform-version }} | |
ORG_GRADLE_PROJECT_enableBuildSearchableOptions: true | |
ORG_GRADLE_PROJECT_compileNativeCode: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: corretto | |
java-version: 17 | |
- name: Load native binaries | |
uses: ./.github/actions/load-native-binaries | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
gradle-home-cache-excludes: | | |
caches/modules-2/files-2.1/com.jetbrains.intellij.idea | |
caches/modules-2/files-2.1/idea | |
caches/transforms-* | |
caches/*/transforms | |
- name: Build rust plugin | |
run: ./gradlew :plugin:buildPlugin | |
- name: Save artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: intellij-rust-${{ matrix.platform-version }} | |
path: plugin/build/distributions/*.zip |