done #132 #466
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
name: Lphy BEAST tests | |
on: [ push, pull_request, workflow_dispatch ] | |
jobs: | |
test-lphybeast: | |
runs-on: ubuntu-latest | |
steps: | |
# must under LPhyBeast folder, otherwise build will fail | |
- name: Checkout main | |
uses: actions/checkout@v3 | |
with: | |
path: LPhyBeast | |
# - name: Checkout Lphy | |
# uses: actions/checkout@v3 | |
# with: | |
# repository: LinguaPhylo/linguaPhylo | |
# path: linguaPhylo | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'adopt' | |
cache: 'gradle' | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-version: 7.6 | |
# pwd /home/runner/work/LPhyBeast/LPhyBeast | |
# PWD=$(pwd) | |
# package path /home/runner/.beast/2.7 | |
- name: Set environmental variables | |
run: | | |
mkdir /home/runner/.beast | |
rm -rf /home/runner/.beast/2.7 | |
mkdir /home/runner/.beast/2.7 | |
ls LPhyBeast | |
find . -name "lib" | |
echo "BEAST_LIB=LPhyBeast/lphybeast/lib" >> $GITHUB_ENV | |
echo "LAUNCHER=launcher-2.7.6.jar" >> $GITHUB_ENV | |
echo "REPO_DIR=/home/runner/.beast/2.7" >> $GITHUB_ENV | |
echo $REPO_DIR | |
# /home/runner/.beast/2.7 | |
- name: Install packages | |
run: | | |
ls $BEAST_LIB/$LAUNCHER | |
ls $REPO_DIR | |
java -Djava.library.path="$BEAST_LIB" -cp "$BEAST_LIB/$LAUNCHER" beast.pkgmgmt.PackageManager -add bdtree | |
java -Djava.library.path="$BEAST_LIB" -cp "$BEAST_LIB/$LAUNCHER" beast.pkgmgmt.PackageManager -add BEAST_CLASSIC | |
java -Djava.library.path="$BEAST_LIB" -cp "$BEAST_LIB/$LAUNCHER" beast.pkgmgmt.PackageManager -add BEASTLabs | |
java -Djava.library.path="$BEAST_LIB" -cp "$BEAST_LIB/$LAUNCHER" beast.pkgmgmt.PackageManager -add FastRelaxedClockLogNormal | |
java -Djava.library.path="$BEAST_LIB" -cp "$BEAST_LIB/$LAUNCHER" beast.pkgmgmt.PackageManager -add feast | |
java -Djava.library.path="$BEAST_LIB" -cp "$BEAST_LIB/$LAUNCHER" beast.pkgmgmt.PackageManager -add SSM | |
# https://github.com/CompEvol/beast2/issues/1078 | |
- name: Install beast2 base | |
run: | | |
find $REPO_DIR -type d | |
mkdir $REPO_DIR/BEAST.base | |
cp $BEAST_LIB/BEAST.base.version.xml $REPO_DIR/BEAST.base/version.xml | |
mkdir $REPO_DIR/BEAST.base/lib | |
cp $BEAST_LIB/BEAST.base-*.jar $REPO_DIR/BEAST.base/lib | |
#./linguaPhylo/lphy/lib | |
#./LPhyBeast/lphybeast/lib | |
- name: Check all packages | |
run: | | |
ls $REPO_DIR/*/lib | |
- name: Run unit tests | |
# change working dir, so gradle will work | |
working-directory: ./LPhyBeast | |
# only available in lphy at the moment | |
# temp disable test because of github issue | |
run: ./gradlew build | |
- name: Publish unit test results | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
if: always() | |
with: | |
files: ./LPhyBeast/*/build/test-results/**/*.xml |