-
Notifications
You must be signed in to change notification settings - Fork 7
100 lines (80 loc) · 2.35 KB
/
python-test.yml
File metadata and controls
100 lines (80 loc) · 2.35 KB
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: Shroud Tests
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
jobs:
python-tests:
runs-on: ubuntu-latest
strategy:
matrix:
# python-version: [3.7, 3.8, 3.9, 3.10, 3.11]
python-version: [3.12]
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install "numpy<2"
# You can test your matrix by printing the current Python version
- name: Display Python version
run: |
python -c "import sys; print(sys.version)"
python -c "import numpy; print(numpy.__version__)"
- name: Install Shroud
run: |
make virtualenv
make develop
- name: Unittest
run: |
make test
- name: Test declarations
run: |
make test-decl
- name: Test wrapper generation
run: |
make -k do-test
- name: Compiler version
run: |
gcc --version
g++ --version
gfortran --version
- name: Python module
run: |
make -k test-python
fortran-tests:
runs-on: ubuntu-latest
strategy:
matrix:
# gcc-version: [9, 10, 11, 12]
gcc-version: [12, 13]
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install GCC
run: |
sudo apt-get update
sudo apt-get install -y gcc-${{ matrix.gcc-version }} g++-${{ matrix.gcc-version }} gfortran-${{ matrix.gcc-version }}
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.gcc-version }} 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.gcc-version }} 100
sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-${{ matrix.gcc-version }} 100
- name: Compiler version
run: |
gcc --version
g++ --version
gfortran --version
- name: Run GCC-specific tests
run: |
# Add commands to test your project with the selected GCC version
echo "Running tests with GCC-${{ matrix.gcc-version }}"
make -k test-c
make -k test-fortran