Skip to content

Only apply a better profile if allowed #229

Only apply a better profile if allowed

Only apply a better profile if allowed #229

# This workflow will build a "Eclipse Platform SWT Bundles" using the eclipse.platform.swt repository as it contains platform specific codes
# For more information see: https://github.com/eclipse-platform/eclipse.platform.swt/
name: Verify Eclipse Platform SWT Build
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
branches:
- 'main'
jobs:
build-swt:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- { name: Linux, os: ubuntu-latest, native: gtk.linux.x86_64 }
- { name: Windows, os: windows-latest, native: win32.win32.x86_64 }
- { name: MacOS x86, os: macos-13, native: cocoa.macosx.x86_64 }
- { name: MacOS ARM, os: macos-latest, native: cocoa.macosx.aarch64 }
name: Verify ${{ matrix.config.name }}
steps:
- name: Checkout tycho code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: 'tycho'
- name: Checkout platform code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: 'swt'
submodules: 'recursive'
lfs: true
repository: 'eclipse-platform/eclipse.platform.swt'
fetch-depth: 0
- name: Set up Java
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
with:
java-version: |
11
17
21
distribution: 'temurin'
- name: Cache local Maven repository
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-verify-platform-swt-${{ hashFiles('**/pom.xml', '**/*.target') }}
restore-keys: |
${{ runner.os }}-maven-verify-platform-swt-
- name: Set up Maven
uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5
with:
maven-version: 3.9.9
- name: Build Tycho
env:
JAVA_HOME: ${{ env.JAVA_HOME_17_X64 }}
working-directory: 'tycho'
run: >-
mvn -U -V -e -B -ntp
-DskipTests
--file pom.xml
-T1C
clean install
- name: Run Platform SWT Build
env:
JAVA_HOME: ${{ env.JAVA_HOME_21_X64 }}
working-directory: 'swt'
shell: bash
run: >-
mvn
-ntp
--batch-mode
-Pbuild-individual-bundles
-Pbree-libs
-DskipTests
-Dtycho.version=$(mvn help:evaluate -f ../tycho -Dexpression=project.version -q -DforceStdout)
-T1C
clean verify