Installer and OSGi test fixes (#1999) #227
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
# | |
# Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation | |
# | |
# This program and the accompanying materials are made available under the | |
# terms of the Eclipse Public License v. 2.0 which is available at | |
# http://www.eclipse.org/legal/epl-2.0, | |
# or the Eclipse Distribution License v. 1.0 which is available at | |
# http://www.eclipse.org/org/documents/edl-v10.php. | |
# | |
# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause | |
# | |
name: EclipseLink build (2.7.x) | |
on: | |
push: | |
branches: [ '2.7' ] | |
pull_request: | |
branches: [ '2.7' ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
maven_version: 3.8.8 | |
jobs: | |
build: | |
name: Test on JDK ${{ matrix.java_version }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java_version: [ 17, 21 ] | |
steps: | |
- name: Start MySQL Database | |
run: | | |
sudo systemctl start mysql.service | |
mysql -e 'SET GLOBAL log_bin_trust_function_creators = 1;' -uroot -proot | |
mysql -e 'CREATE DATABASE ecltests;' -uroot -proot | |
mysql -e 'SHOW DATABASES;' -uroot -proot | |
- name: Cache local Maven repository | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Checkout for build | |
uses: actions/checkout@v3 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.java_version }} | |
- name: Init | |
run: | | |
mkdir $HOME/extension.lib.external | |
wget -nc https://repo1.maven.org/maven2/junit/junit/4.12/junit-4.12.jar -O $HOME/extension.lib.external/junit-4.12.jar | |
wget -nc https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar -O $HOME/extension.lib.external/hamcrest-core-1.3.jar | |
wget -nc https://repo1.maven.org/maven2/org/jmockit/jmockit/1.35/jmockit-1.35.jar -O $HOME/extension.lib.external/jmockit-1.35.jar | |
wget -nc https://repo1.maven.org/maven2/org/jboss/logging/jboss-logging/3.4.1.Final/jboss-logging-3.4.1.Final.jar -O $HOME/extension.lib.external/jboss-logging-3.4.1.Final.jar | |
wget -nc https://repo1.maven.org/maven2/org/glassfish/javax.el/3.0.1-b08/javax.el-3.0.1-b08.jar -O $HOME/extension.lib.external/javax.el-3.0.1-b08.jar | |
wget -nc https://repo1.maven.org/maven2/com/fasterxml/classmate/1.5.1/classmate-1.5.1.jar -O $HOME/extension.lib.external/classmate-1.5.1.jar | |
wget -nc https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.7-bin.tar.gz -O $HOME/extension.lib.external/apache-ant-1.10.7-bin.tar.gz | |
wget -nc https://download.eclipse.org/eclipse/downloads/drops4/R-4.10-201812060815/eclipse-SDK-4.10-linux-gtk-x86_64.tar.gz -O $HOME/extension.lib.external/eclipse-SDK-4.10-linux-gtk-x86_64.tar.gz | |
wget -nc https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.28/mysql-connector-java-8.0.28.jar -O $HOME/extension.lib.external/mysql-connector-java.jar | |
tar -x -z -C $HOME -f $HOME/extension.lib.external/apache-ant-1.10.7-bin.tar.gz | |
tar -x -z -C $HOME/extension.lib.external -f $HOME/extension.lib.external/eclipse-SDK-4.10-linux-gtk-x86_64.tar.gz | |
echo "extensions.depend.dir=$HOME/extension.lib.external" >> $HOME/build.properties | |
echo "junit.lib=$HOME/extension.lib.external/junit-4.12.jar:$HOME/extension.lib.external/hamcrest-core-1.3.jar" >> $HOME/build.properties | |
echo "jdbc.driver.jar=$HOME/extension.lib.external/mysql-connector-java.jar" >> $HOME/build.properties | |
echo 'db.driver=com.mysql.cj.jdbc.Driver' >> $HOME/build.properties | |
echo 'db.url=jdbc:mysql://localhost:3306/ecltests?allowPublicKeyRetrieval=true' >> $HOME/build.properties | |
echo 'db.user=root' >> $HOME/build.properties | |
echo 'db.pwd=root' >> $HOME/build.properties | |
echo 'db.platform=org.eclipse.persistence.platform.database.MySQLPlatform' >> $HOME/build.properties | |
echo "eclipse.install.dir=$HOME/extension.lib.external/eclipse" >> $HOME/build.properties | |
- name: Build | |
run: | | |
export M2_HOME=/usr/share/apache-maven-${{ env.maven_version }} | |
ant -f antbuild.xml build | |
- name: Verify | |
run: | | |
export M2_HOME=/usr/share/apache-maven-${{ env.maven_version }} | |
ant -f antbuild.xml -Dtest.fail.fast=true -Dfail.on.error=true test-lrg |