-
Notifications
You must be signed in to change notification settings - Fork 7
59 lines (54 loc) · 1.63 KB
/
test_python.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
name: TREXIO converter python tests
on:
push:
branches: [main, ci_hotfix]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build:
name: TREXIO Github CI Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
timeout-minutes: 200
strategy:
matrix:
python-version: ["3.8"]
fail-fast: false
defaults:
run:
shell: bash --noprofile --norc {0}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
- name: Install Cmake and HDF5
run: |
sudo apt-get update
sudo apt-get install -y cmake
sudo apt-get install -y libhdf5-dev
- name: Install Trexio
run: |
sudo apt-get update
sudo apt-get install -y gfortran
sudo apt-get install -y gcc
wget https://github.com/TREX-CoE/trexio/releases/download/v2.4.2/trexio-2.4.2.tar.gz
tar -xzf trexio-2.4.2.tar.gz
cd trexio-2.4.2/
./configure FC=gfortran CC=gcc
make all
make check
sudo make install
sudo cp include/* /usr/local/include/
python -m pip install trexio
python -m pip install trexio_tools
- name: "Test 00 Python-${{ matrix.python-version }} unit testing using pytest"
run: |
echo "Running the trex2champ converter tests with python-${{ matrix.python-version }}"
cd tools/trex_tools
pytest