-
Notifications
You must be signed in to change notification settings - Fork 1
130 lines (105 loc) · 4.05 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on:
push:
branches: [ master, development, experimental, osb* ]
pull_request:
branches: [ master, development, experimental, osb* ]
jobs:
build_and_test:
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
java: [ '8', '11', '16', '17', '19']
runs-on: [ubuntu-latest, macos-latest, windows-2019]
name: Test on Java ${{ matrix.Java }} on ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.Java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.Java }}
distribution: 'temurin'
- name: Install and test (non Win)
env:
main_repo_branch: ${GITHUB_REF_NAME}
if: ${{ matrix.runs-on != 'windows-2019' }}
run: |
export main_repo_branch=${{env.main_repo_branch}}
if [[ ${main_repo_branch} != "master" && ${main_repo_branch} != "development" && ${main_repo_branch} != "experimental" && ${main_repo_branch} != *"osb"* ]]; then main_repo_branch=development ; fi
echo Using branch $main_repo_branch
git clone https://github.com/NeuroML/org.neuroml.model.injectingplugin.git
cd org.neuroml.model.injectingplugin
git checkout $main_repo_branch
mvn install
cd ..
git clone https://github.com/NeuroML/NeuroML2.git
cd NeuroML2
git checkout $main_repo_branch
mvn install
cd ..
git clone https://github.com/LEMS/jLEMS.git
cd jLEMS
git checkout $main_repo_branch
mvn install
cd ..
git clone https://github.com/NeuroML/org.neuroml.model.git
cd org.neuroml.model
git checkout $main_repo_branch
mvn install
cd ..
git clone https://github.com/NeuroML/org.neuroml.export.git
cd org.neuroml.export
git checkout $main_repo_branch
mvn install
cd ..
# Install this package and test with Maven
pwd
mvn install
mvn dependency:tree
- name: Install and test (Win)
if: ${{ matrix.runs-on == 'windows-2019' }}
run: |
# Install org.neuroml.model.injectingplugin
$env:main_repo_branch=$env:GITHUB_REF_NAME
if ( $env:main_repo_branch -ne "master" -and $env:main_repo_branch -ne "development" -and $env:main_repo_branch -ne "experimental" -and $env:main_repo_branch -notlike '*osb*' ) { $env:main_repo_branch="development" }
echo "Using branch $env:main_repo_branch..."
git clone https://github.com/NeuroML/org.neuroml.model.injectingplugin.git
cd org.neuroml.model.injectingplugin
git checkout $env:main_repo_branch
mvn install
cd ..
# Install NeuroML2
echo Using branch $env:GITHUB_REF_NAME
git clone https://github.com/NeuroML/NeuroML2.git
cd NeuroML2
git checkout $env:main_repo_branch
mvn install
cd ..
git clone https://github.com/LEMS/jLEMS.git
cd jLEMS
git checkout $env:main_repo_branch
mvn install
cd ..
git clone https://github.com/NeuroML/org.neuroml.model.git
cd org.neuroml.model
git checkout $env:main_repo_branch
mvn install
cd ..
git clone https://github.com/NeuroML/org.neuroml.export.git
cd org.neuroml.export
git checkout $env:main_repo_branch
mvn install
cd ..
# Install this package and test with Maven
pwd
mvn install
mvn dependency:tree
- name: Run SBML test suite
if: ${{ matrix.runs-on == 'ubuntu-latest' }}
run: |
git clone https://github.com/sbmlteam/sbml-test-suite.git
mvn assembly:assembly -DdescriptorId=jar-with-dependencies
java -Xmx400M -classpath target/*jar-with-dependencies.jar org.neuroml.importer.sbml.SBMLImporter -runSBMLTestSuite