diff --git a/.github/workflows/multiplatform-ls-build.yml b/.github/workflows/multiplatform-ls-build.yml new file mode 100644 index 000000000..2482c457e --- /dev/null +++ b/.github/workflows/multiplatform-ls-build.yml @@ -0,0 +1,67 @@ +name: Multiple Platforms Builds for Language Servers + +on: + workflow_dispatch: + inputs: + java_version: + description: JDK version to build the artifacts + required: false + default: '21' + type: string + skip_tests: + description: skip ls tests execution + required: false + default: false + type: boolean + workflow_call: + inputs: + java_version: + description: JDK version to build the artifacts + required: false + default: '21' + type: string + skip_tests: + description: skip ls tests execution + required: false + default: false + type: boolean + +jobs: + platform_matrix: + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + with: + sparse-checkout: | + .github + headless-services + eclipse-language-servers + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + - name: Enforce https instead of http + run: ./nohttp.sh + - name: Build Language Servers JARs on Linux + if: matrix.os == 'ubuntu-latest' + run: | + cd headless-services + if command -v xvfb-run ; then + xvfb-run ./mvnw --batch-mode clean install -DskipTests=${{ inputs.skip_tests }} + else + ./mvnw --batch-mode clean install -DskipTests=${{ inputs.skip_tests }} + fi + - name: Build Language Servers JARs on Windows + if: matrix.os == 'windows-latest' + run: | + cd headless-services + mvnw.cmd --batch-mode clean install -DskipTests=${{ inputs.skip_tests }} + - name: Build Language Servers JARs on Mac OSX + if: matrix.os == 'macos-latest' + run: | + cd headless-services + ./mvnw --batch-mode clean install -DskipTests=${{ inputs.skip_tests }}