Updated Capella 6.1.0 targetplatform. #412
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
# This workflow will build a Java project with Maven | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Java CI with Maven | |
on: [push, pull_request] | |
jobs: | |
matrix_prep: | |
# Using a separate job and agent so as to be able to use tools like 'sed' and 'jq' | |
runs-on: ubuntu-22.04 | |
# Defining outputs of a job allows for easier consumption and use | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
# Checking out code as the set-matrix step utilizes a file named matrix_includes.json | |
- name: Check out code | |
uses: actions/checkout@v3 | |
# This step is explained more in a following section | |
- id: set-matrix | |
run: | | |
matrix=$(jq . .github/workflows/matrix_includes.json) | |
echo "matrix={\"include\":$(echo $matrix)}\"" >> $GITHUB_OUTPUT | |
build: | |
needs: matrix_prep | |
runs-on: ubuntu-22.04 | |
strategy: | |
# We need to convert the json string output into an object that the GitHub Workflow expects. | |
# Thankfully, the json-schema for Workflows allows 'matrix' to be set to an expression. | |
matrix: ${{fromJson(needs.matrix_prep.outputs.matrix)}} | |
steps: | |
- name: Environment | |
run: | | |
echo GITHUB_WORKSPACE $GITHUB_WORKSPACE | |
echo GITHUB_REF $GITHUB_REF | |
echo GITHUB_SHA $GITHUB_SHA | |
echo GITHUB_EVENT_NAME $GITHUB_EVENT_NAME | |
echo JAVA ${{ matrix.java }} | |
echo PROFILE ${{ matrix.profile }} | |
echo TYCHO ${{ matrix.tycho }} | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Check if release is needed | |
id: release_check | |
env: | |
PROFILE: ${{ matrix.profile }} | |
run: | | |
if [[ "$PROFILE" == *"updatesite"* && "$(git tag --points-at HEAD)" != "" ]]; then export IS_RELEASE=true; fi | |
echo "IS_RELEASE=${IS_RELEASE}" >> $GITHUB_OUTPUT | |
- name: Set up JDK ${{ matrix.java }} | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: ${{ matrix.java }} | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ matrix.tycho }}-${{ hashFiles('**/pom.xml', '**/*.product') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Install metacity and xvfb | |
uses: awalsh128/[email protected] | |
with: | |
packages: xvfb metacity | |
version: 1.0 | |
- name: Build with Maven (${{ matrix.profile }}) | |
id: maven_build | |
env: | |
MAVEN_OPTS: ${{ matrix.mavenOpt }} | |
run: | | |
/usr/bin/Xvfb :99 -ac -screen 0 1440x900x16& | |
ps auxwww | grep Xvfb | |
export DISPLAY=:99 | |
echo DISPLAY $DISPLAY | |
mvn clean verify -fae -P${{ matrix.profile }} "-Dtycho=${{ matrix.tycho }}" -Dmaven.wagon.provider.http=httpclient -Dmaven.artifact.threads=12 -Dhttp.tcp.nodelay=false | |
- name: Prepare deploy local directory | |
id: prepare_deploy | |
if: ${{ steps.release_check.outputs.IS_RELEASE }} | |
run: | | |
export TAG_OR_BRANCH="$(echo $GITHUB_REF | cut -d"/" -f3)/nightly" | |
if [[ "$(echo $GITHUB_REF | cut -d"/" -f2)" != "heads" ]]; then export TAG_OR_BRANCH="$(echo $GITHUB_REF | cut -d"/" -f3)"; fi | |
chmod a+x ./scripts/prepare-deploy-local-dir.sh | |
./scripts/prepare-deploy-local-dir.sh $GITHUB_WORKSPACE/$TAG_OR_BRANCH | |
echo "TAG_OR_BRANCH=${TAG_OR_BRANCH}" >> $GITHUB_OUTPUT | |
- name: Create Release ${{ github.ref }} | |
id: create_release | |
if: ${{ steps.release_check.outputs.IS_RELEASE }} | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset | |
id: upload_release_asset | |
if: ${{ steps.release_check.outputs.IS_RELEASE }} | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ${{ steps.prepare_deploy.outputs.TAG_OR_BRANCH }}/repository/org.eclipse.python4capella.update.zip | |
asset_name: org.eclipse.python4capella.update.zip | |
asset_content_type: application/zip | |
# For PyDev 8.2.0 | |
- name: Build with Maven for PyDev 8.2.0 (${{ matrix.profile }}) | |
id: maven_build_PyDev8_2_0 | |
if: ${{ steps.release_check.outputs.IS_RELEASE }} | |
run: | | |
mvn clean verify -fae -P${{ matrix.profile }}-PyDev8.2.0 "-Dtycho=${{ matrix.tycho }}" -Dmaven.wagon.provider.http=httpclient -Dmaven.artifact.threads=12 -Dhttp.tcp.nodelay=false | |
- name: Prepare deploy local directory for PyDev 8.2.0 | |
id: prepare_deploy_PyDev8_2_0 | |
if: ${{ steps.release_check.outputs.IS_RELEASE }} | |
run: | | |
export TAG_OR_BRANCH="$(echo $GITHUB_REF | cut -d"/" -f3)/nightly" | |
if [[ "$(echo $GITHUB_REF | cut -d"/" -f2)" != "heads" ]]; then export TAG_OR_BRANCH="$(echo $GITHUB_REF | cut -d"/" -f3)"; fi | |
chmod a+x ./scripts/prepare-deploy-local-dir.sh | |
./scripts/prepare-deploy-local-dir.sh $GITHUB_WORKSPACE/$TAG_OR_BRANCH | |
echo "TAG_OR_BRANCH=${TAG_OR_BRANCH}" >> $GITHUB_OUTPUT | |
- name: Upload Release Asset for PyDev 8.2.0 | |
id: upload_release_asset_PyDev8_2_0 | |
if: ${{ steps.release_check.outputs.IS_RELEASE }} | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ${{ steps.prepare_deploy_PyDev8_2_0.outputs.TAG_OR_BRANCH }}/repository/org.eclipse.python4capella.update.zip | |
asset_name: org.eclipse.python4capella.update-Capella-1.4.zip | |
asset_content_type: application/zip | |