Updated documentation #1731
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 | |
on: | |
workflow_call: | |
inputs: | |
refLsp4ij: | |
description: 'Reference/branch for Lsp4ij checkout' | |
type: string | |
required: true | |
default: main | |
lsp4ijBranch: | |
description: 'PR number or branch name for Artifact upload' | |
type: string | |
required: true | |
useLocalPlugin: | |
description: 'Use lsp4ij locally' | |
required: true | |
type: boolean | |
default: false | |
refLTITag: | |
description: 'Reference LTI Tag/Branch' | |
type: string | |
required: true | |
default: main | |
workflow_dispatch: | |
inputs: | |
useLocalPlugin: | |
description: 'Use lsp4ij locally' | |
required: true | |
type: boolean | |
default: false | |
refLsp4ij: | |
description: 'Reference/branch for Lsp4ij checkout' | |
type: string | |
required: true | |
default: main | |
refLTITag: | |
description: 'Reference LTI Tag/Branch' | |
type: string | |
required: false | |
default: main | |
push: | |
branches: '**' | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
name: build ( ${{ matrix.runtime.name }}, ${{ matrix.excludeLTITag }} ) | |
runs-on: ${{ matrix.runtime.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
runtime: | |
- name: linux | |
os: ubuntu-latest | |
reportName: linux-test-report | |
- name: mac | |
os: macOS-latest | |
reportName: mac-test-report | |
- name: windows | |
os: windows-latest | |
reportName: windows-test-report | |
# It’s not necessary to remove the below condition even after removing the '24.0.9' version from the 'tag' array in the cron job build. | |
# Specify the LTI tag to limit the OS. | |
# Adding a check to verify if 'refLTITag' is equal to '24.0.9'. | |
excludeLTITag: | |
- ${{ inputs.refLTITag == '24.0.9' }} | |
# Adding a check on macOS and Windows to verify if 'excludeLTITag' is equal to 'true'. The value of 'excludeLTITag' is used to determine whether the job need to be executed. | |
exclude: | |
- excludeLTITag: true | |
runtime: | |
name: mac | |
- excludeLTITag: true | |
runtime: | |
name: windows | |
env: | |
USE_LOCAL_PLUGIN: ${{ inputs.useLocalPlugin || false }} | |
REF_LSP4IJ: ${{ inputs.refLsp4ij }} | |
LSP4IJ_BRANCH: ${{ inputs.lsp4ijBranch || 'default' }} | |
REF_LTI_TAG: ${{ inputs.refLTITag }} | |
steps: | |
- name: Configure pagefile | |
if: contains(matrix.os, 'windows') | |
uses: al-cheb/[email protected] | |
with: | |
minimum-size: 8GB | |
maximum-size: 10GB | |
disk-root: "C:" | |
- name: 'Checkout liberty-tools-intellij' | |
uses: actions/checkout@v4 | |
with: | |
path: liberty-tools-intellij | |
ref: ${{ env.REF_LTI_TAG }} | |
- name: 'Install required integration test software' | |
working-directory: ./liberty-tools-intellij | |
run: bash ./src/test/resources/ci/scripts/setup.sh | |
# Checkout and build lsp4ij only if USE_LOCAL_PLUGIN is true | |
- name: 'Checkout lsp4ij' | |
if: ${{ inputs.useLocalPlugin == true }} | |
uses: actions/checkout@v4 | |
with: | |
repository: redhat-developer/lsp4ij | |
path: lsp4ij | |
ref: ${{ env.REF_LSP4IJ }} | |
- name: 'Build Lsp4ij' | |
if: ${{ inputs.useLocalPlugin == true }} | |
working-directory: ./lsp4ij | |
run: bash ./gradlew buildPlugin | |
- name: 'Unzip lsp4ij file' | |
if: ${{ inputs.useLocalPlugin == true }} | |
working-directory: ./lsp4ij/build/distributions | |
run: | | |
unzip -o '*.zip' -d . | |
- name: 'Build Liberty-Tools-Intellij' | |
working-directory: ./liberty-tools-intellij | |
run: bash ./gradlew buildPlugin -PuseLocal=${{ env.USE_LOCAL_PLUGIN }} | |
- name: 'Archive artifacts' | |
if: ${{ runner.os == 'Linux' && !failure() }} | |
uses: actions/[email protected] | |
with: | |
name: liberty-tools-intellij-LTI-${{ env.REF_LTI_TAG || 'default' }}-LSP4IJ-${{ env.LSP4IJ_BRANCH }} | |
path: | | |
./**/*liberty-tools-intellij*.zip | |
./**/libs/*liberty-tools-intellij*.jar | |
if-no-files-found: warn | |
retention-days: 7 | |
- name: 'Run UI integration tests' | |
id: run_tests | |
working-directory: ./liberty-tools-intellij | |
run: bash ./src/test/resources/ci/scripts/run.sh | |
- name: 'Archive Test logs and reports' | |
if: ${{ failure() && steps.run_tests.conclusion == 'failure' }} | |
uses: actions/[email protected] | |
with: | |
name: ${{ matrix.runtime.reportName }}-LTI-${{ env.REF_LTI_TAG || 'default' }}-LSP4IJ-${{ env.LSP4IJ_BRANCH }} | |
path: | | |
liberty-tools-intellij/build/reports/ |