-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (83 loc) · 3.33 KB
/
build-and-test.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
name: Build & test plugin
on:
pull_request:
branches: [devel, master]
jobs:
build:
runs-on: ubuntu-22.04
env:
SEND_INSTALLATION_STATISTICS: "False"
steps:
- name: Free Disk Space (Ubuntu only)
uses: jlumbroso/free-disk-space@main
- name: Set up MPI
uses: mpi4py/setup-mpi@master
with:
mpi: 'openmpi'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt install -y libfftw3-dev libhdf5-dev python3-numpy python3-dev libtiff5-dev unzip libsqlite3-dev default-jdk git cmake libopencv-dev make cmake
- name: Install CUDA
uses: Jimver/cuda-toolkit@master
id: cuda-toolkit
with:
cuda: '11.8.0'
method: network
sub-packages: '["nvcc", "toolkit"]'
- name: Install Miniconda
uses: conda-incubator/setup-miniconda@main
with:
miniconda-version: "latest"
auto-update-conda: true
auto-activate-base: true
activate-environment: scipion3
python-version: "3.8"
- name: Install Scipion
working-directory: ${{ github.workspace }}/../
run: |
pip install --user scipion-installer
python3 -m scipioninstaller -conda -noXmipp -noAsk scipion
- name: Cloning Xmipp
working-directory: ${{ github.workspace }}/../
run: git clone https://github.com/I2PC/xmipp.git
# Checkout Xmipp to Pull Request branch if exists
- name: Conditionally checkout Xmipp to ${{ github.head_ref }}
working-directory: ${{ github.workspace }}/../xmipp
env:
BRANCH_NAME: ${{ github.head_ref }}
run: |
if [ $(git ls-remote --heads https://github.com/I2PC/xmipp.git $BRANCH_NAME | wc -l) -eq 1 ]; then
git checkout $BRANCH_NAME
fi
# Log is shown afterwards because new Xmipp's installer does not show error trace if there is any
- name: Compile Xmipp
working-directory: ${{ github.workspace }}/../xmipp
env:
BUILD_TESTS: True
run: |
../scipion/scipion3 run ./xmipp --keep-output || (cat compileLOG.txt && false)
# Checkout scipion-em-xmipp to Pull Request branch if exists
- name: Conditionally checkout scipion-em-xmipp to ${{ github.head_ref }}
working-directory: ${{ github.workspace }}/../xmipp/src/scipion-em-xmipp
env:
BRANCH_NAME: ${{ github.head_ref }}
run: |
if [ $(git ls-remote --heads https://github.com/I2PC/scipion-em-xmipp.git $BRANCH_NAME | wc -l) -eq 1 ]; then
git checkout $BRANCH_NAME
fi
- name: Install scipion-em-xmipp
working-directory: ${{ github.workspace }}/../xmipp/src/scipion-em-xmipp
run: ${{ github.workspace }}/../scipion/scipion3 installp -p . --devel --noBin
- name: Checkout repository
uses: actions/checkout@main
with:
ref: ${{ github.head_ref }}
- name: Install plugin from pull request
working-directory: ${{ github.workspace }}
run: ../scipion/scipion3 installp -p . --devel
- name: Run tests
working-directory: ${{ github.workspace }}/${{ vars.FOLDER_WITH_VERSION }}
run: |
pip install --user scipion-testrunner
scipion_testrunner ${{ github.workspace }}/../scipion/scipion3 ${{ vars.FOLDER_WITH_VERSION }} --noGpu --testData=testData.json -j=3