-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup_dev.ps1
50 lines (39 loc) · 1.08 KB
/
setup_dev.ps1
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
# Check that verifyta is in PATH
$verify_ta_version = verifyta.exe -v
if (-not $LASTEXITCODE -eq 0){
Write-Error "verifyta is not in PATH. Install UPPAAL or make sure it is in the PATH."
Exit
}
$venv = "venv"
if (-not (Test-Path -Path $venv)) {
Write-Output "Creating virtual environment"
& python -m venv "$venv"
}
# Check error
if (-not (Test-Path -Path $venv)) {
Write-Error "Failed create virtual environment"
Exit 1
}
Write-Output "Activate virtual env"
& "$venv\Scripts\Activate.ps1"
Write-Output "Upgrade pip"
python -m pip install --upgrade pip
if (-not $LASTEXITCODE -eq 0){
Write-Error "Pip upgrade failed."
Exit $LASTEXITCODE
}
Write-Output "Use wheel"
pip install wheel
if (-not $LASTEXITCODE -eq 0){
Write-Error "Install wheel failed."
Exit $LASTEXITCODE
}
Write-Output "Install python packages"
pip install -r requirements.txt
# Check error
if (-not $LASTEXITCODE -eq 0){
Write-Error "Package installation failed."
Exit $LASTEXITCODE
}
Write-Output "Running tests"
python run_tests.py