Skip to content

Commit

Permalink
[Build] Run full build and test workflow on all platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
HannesWell committed Apr 8, 2024
1 parent 825c69f commit 676bec3
Showing 1 changed file with 22 additions and 56 deletions.
78 changes: 22 additions & 56 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,20 @@ on:

jobs:
build:
runs-on: ubuntu-latest
name: Build ${{ matrix.config.name }}
runs-on: ${{ matrix.config.runner-os }}
strategy:
fail-fast: false
matrix:
config:
- { name: Linux, runner-os: ubuntu-latest, ws: gtk, os: linux, native-extension: so, script-extension: sh }
- { name: Windows, runner-os: windows-2019, ws: win32, os: win32, native-extension: dll, script-extension: bat }
- { name: MacOS, runner-os: macos-latest, ws: cocoa, os: macosx, native-extension: so, script-extension: sh }
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # required for jgit timestamp provider to work
path: equinox
- name: checkout equinox.binaries
uses: actions/checkout@v4
with:
Expand All @@ -37,9 +46,18 @@ jobs:
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.6
- name: Install GTK requirements
if: ${{ matrix.config.ws == 'gtk'}}
run: |
sudo apt-get update -q -y
sudo apt-get install -q -y libgtk-3-dev
- name: Build native executable and launcher
working-directory: equinox/features/org.eclipse.equinox.executable.feature/library/${{ matrix.config.ws }}
run: ./build.${{ matrix.config.script-extension }} -ws ${{ matrix.config.ws }} -os ${{ matrix.config.os }} -arch x86_64 install
- name: Build with Maven
uses: coactions/setup-xvfb@v1
with:
working-directory: equinox
run: >-
mvn
--batch-mode
Expand All @@ -49,66 +67,14 @@ jobs:
-Dmaven.test.failure.ignore=true
-Drt.equinox.binaries.loc=${{ github.workspace }}/rt.equinox.binaries
clean verify
- name: Upload Test Results
uses: actions/upload-artifact@v4
with:
name: test-results
if-no-files-found: error
path: '**/target/*-reports/*.xml'

build-launcher:
name: Build launcher ${{ matrix.config.name }}
runs-on: ${{ matrix.config.runner-os }}
strategy:
fail-fast: false
matrix:
config:
- { name: Linux, runner-os: ubuntu-latest, ws: gtk, os: linux, native-extension: so }
- { name: Windows, runner-os: windows-2019, ws: win32, os: win32, native-extension: dll }
- { name: MacOS, runner-os: macos-latest, ws: cocoa, os: macosx, native-extension: so }
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.6
- name: Install GTK requirements
run: |
sudo apt-get update -q -y
sudo apt-get install -q -y libgtk-3-dev
if: ${{ matrix.config.ws == 'gtk'}}
- name: Build on POSIX
working-directory: features/org.eclipse.equinox.executable.feature/library/${{ matrix.config.ws }}
env:
BINARIES_DIR: ${{ github.workspace }}/equinox.binaries
run: ./build.sh -ws ${{ matrix.config.ws }} -os ${{ matrix.config.os }} -arch x86_64 install
if: ${{ matrix.config.ws != 'win32'}}
- name: Build on Windows
working-directory: features/org.eclipse.equinox.executable.feature/library/win32
env:
BINARIES_DIR: ${{ github.workspace }}\equinox.binaries
run: .\build.bat -ws win32 -os win32 -arch x86_64 install
if: ${{ matrix.config.ws == 'win32'}}
- name: Test native launcher and executable
env:
EQUINOX_BINARIES_LOC: ${{ github.workspace }}/equinox.binaries
run: mvn -B -pl org.eclipse.equinox:org.eclipse.equinox.launcher.tests -am verify
- name: Upload artifacts
- name: Upload native artifacts
uses: actions/upload-artifact@v4
if: success()
with:
name: ${{ matrix.config.name }} launcher artifacts
path: |
equinox.binaries/org.eclipse.equinox.executable/bin/${{ matrix.config.ws }}/${{ matrix.config.os }}/x86_64/**/eclipse*
equinox.binaries/org.eclipse.equinox.launcher.${{ matrix.config.ws }}.${{ matrix.config.os }}.x86_64/eclipse_*.${{ matrix.config.native-extension }}
rt.equinox.binaries/org.eclipse.equinox.executable/bin/${{ matrix.config.ws }}/${{ matrix.config.os }}/x86_64/**/eclipse*
rt.equinox.binaries/org.eclipse.equinox.launcher.${{ matrix.config.ws }}.${{ matrix.config.os }}.x86_64/eclipse_*.${{ matrix.config.native-extension }}
if-no-files-found: error
- name: Upload ${{ matrix.config.name }} Test Results
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 676bec3

Please sign in to comment.