-
Notifications
You must be signed in to change notification settings - Fork 3
86 lines (79 loc) · 2.69 KB
/
sifdecoder.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
name: sifdecoder
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: ${{ matrix.os }} -- ${{ matrix.problems }} -- ${{ matrix.precision }} precision
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
version: ['12']
problems: ['sifcollection', 'maros-meszaros', 'netlib-lp']
precision: ['single', 'double', 'quadruple']
runs-on: ${{ matrix.os }}
steps:
- name: Check out SIFDecode
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Meson and Ninja
run: pip install meson ninja
- name: Install compilers
uses: fortran-lang/setup-fortran@main
with:
compiler: ${{ matrix.compiler }}
version: ${{ matrix.version }}
# Uncomment this section to obtain ssh access to VM
# - name: Setup tmate session
# if: matrix.os == 'windows-latest'
# uses: mxschmitt/action-tmate@v3
- name: Download ${{ matrix.problems }}
shell: bash
run: |
cd $GITHUB_WORKSPACE/../
if [[ "${{ matrix.problems }}" == "sifcollection" ]]; then
git clone https://bitbucket.org/optrove/sif
fi
if [[ "${{ matrix.problems }}" == "maros-meszaros" ]]; then
git clone https://bitbucket.org/optrove/maros-meszaros
mv maros-meszaros sif
fi
if [[ "${{ matrix.problems }}" == "netlib-lp" ]]; then
git clone https://bitbucket.org/optrove/netlib-lp
mv netlib-lp sif
fi
- name: SIFDecode
shell: bash
run: |
meson setup builddir -Ddefault_library=static
meson compile -C builddir
cp builddir/sifdecoder_standalone $GITHUB_WORKSPACE/../sif
- name: Decode the SIF files
shell: bash
run: |
cd $GITHUB_WORKSPACE/../sif
for file in *.SIF; do
if [ -f "$file" ]; then
echo "Processing $file"
rm -f *.f *.o *.d
if [[ "${{ matrix.precision }}" == "single" ]]; then
./sifdecoder_standalone -sp "$file"
gfortran -shared -fPIC *.f
fi
if [[ "${{ matrix.precision }}" == "double" ]]; then
./sifdecoder_standalone -dp "$file"
gfortran -shared -fPIC *.f
fi
if [[ "${{ matrix.precision }}" == "quadruple" ]]; then
./sifdecoder_standalone -qp "$file"
gfortran -shared -fPIC *.f
fi
fi
done