-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.6 KB
/
crystal.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
name: mpi.cr CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
vendor: [mpich-3.3.2, mpich-3.2.1, openmpi-4.0.3, openmpi-3.1.6, openmpi-3.0.6]
container:
image: crystallang/crystal
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
id: cache-dep
with:
path: ${GITHUB_WORKSPACE}/${{ matrix.vendor }}
key: ${{ matrix.vendor }}
- name: Install dependencies
shell: bash
if: steps.cache-dep.outputs.cache-hit != 'true'
run: |
apt update
declare -a mpi_vendor_array=($(echo "${{ matrix.vendor }}" | tr "-" "\n"))
export MPI_LIBRARY="${mpi_vendor_array[0]}"
export MPI_LIBRARY_VERSION="${mpi_vendor_array[1]}"
apt-get -yq --no-install-suggests --no-install-recommends install build-essential gfortran wget
sh ci/install-mpi.sh
cp -r "${HOME}/opt/${{ matrix.vendor }}" ${GITHUB_WORKSPACE}/${{ matrix.vendor }}
- name: Reuse dependencies
if: steps.cache-dep.outputs.cache-hit == 'true'
run: |
echo "MPI library already installed: ${PACKAGE_NAME}"
cp -r ${GITHUB_WORKSPACE}/${{ matrix.vendor }} "${HOME}/opt/${{ matrix.vendor }}"
- name: Run tests
run: |
export MPI_PREFIX="${HOME}/opt/${{ matrix.vendor }}"
export PATH="${MPI_PREFIX}/bin:${PATH}"
export LD_LIBRARY_PATH="${MPI_PREFIX}/lib:${LD_LIBRARY_PATH}"
export LIBRARY_PATH="${MPI_PREFIX}/lib:${LIBRARY_PATH}"
make
make spec no-debug=1