CPRC uses own prefix for traits if needed #1527
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: BEAST CI | |
#on: | |
# push: | |
# branches: | |
# - main | |
# pull_request: | |
on: [push] | |
# Cancel if a newer run is started | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
env: | |
BEAGLE_DIR: beagle-lib | |
BEAGLE_LIB: beagle-lib/usr/local/lib | |
LD_LIBRARY_PATH: beagle-lib/usr/local/lib | |
BEAGLE_BRANCH: v4_release | |
jobs: | |
setup: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: "8" | |
distribution: "adopt" | |
- name: Setup cmake | |
uses: lukka/get-cmake@latest | |
- name: Cache BEAGLE and BEAST | |
id: cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
${{ env.BEAGLE_DIR }} | |
build/dist | |
key: beagle-beast-${{ hashFiles('**/build_beagle.sh', '**/build.xml') }} | |
- name: Build BEAGLE | |
# if: steps.cache.outputs.cache-hit != 'true' | |
run: | | |
chmod +x ./.github/scripts/build_beagle.sh | |
./.github/scripts/build_beagle.sh | |
- name: Build BEAST | |
# if: steps.cache.outputs.cache-hit != 'true' | |
run: ant dist | |
- name: Check BEAGLE | |
run: | | |
ls ${BEAGLE_LIB} | |
java -jar -Djava.library.path=${BEAGLE_LIB} build/dist/beast.jar -beagle_info | |
- name: Set up test matrices | |
id: set-matrices | |
run: | | |
echo "xml-matrix=$(ls tests/TestXML/*.xml | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT | |
echo "xml-load-state-matrix=$(ls tests/TestXMLwithLoadState/*.xml | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT | |
outputs: | |
xml-matrix: ${{ steps.set-matrices.outputs.xml-matrix }} | |
xml-load-state-matrix: ${{ steps.set-matrices.outputs.xml-load-state-matrix }} | |
test-xml: | |
needs: setup | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
file: ${{fromJson(needs.setup.outputs.xml-matrix)}} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
${{ env.BEAGLE_DIR }} | |
build/dist | |
key: beagle-beast-${{ hashFiles('**/build_beagle.sh', '**/build.xml') }} | |
- name: Run test for ${{ matrix.file }} | |
run: java -Djava.library.path=${BEAGLE_LIB} -jar build/dist/beast.jar -fail_threads -seed 666 -overwrite ${{ matrix.file }} | |
test-xml-load-state: | |
needs: setup | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
file: ${{fromJson(needs.setup.outputs.xml-load-state-matrix)}} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
${{ env.BEAGLE_DIR }} | |
build/dist | |
key: beagle-beast-${{ hashFiles('**/build_beagle.sh', '**/build.xml') }} | |
- name: Run test with load state for ${{ matrix.file }} | |
run: | | |
checkpoint=tests/TestXMLwithLoadState/$(basename ${{ matrix.file }} .xml).chkpt | |
java -Djava.library.path=${BEAGLE_LIB} -jar build/dist/beast.jar -fail_threads -seed 666 -load_state $checkpoint -overwrite ${{ matrix.file }} | |
test-junit: | |
needs: setup | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
${{ env.BEAGLE_DIR }} | |
build/dist | |
key: beagle-beast-${{ hashFiles('**/build_beagle.sh', '**/build.xml') }} | |
- name: Run JUnit tests | |
run: ant -Djava.library.path=${BEAGLE_LIB} junit |