File tree Expand file tree Collapse file tree 5 files changed +48
-12
lines changed Expand file tree Collapse file tree 5 files changed +48
-12
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on : push
4+
5+ jobs :
6+ Build :
7+ runs-on : ubuntu-latest
8+ strategy :
9+ fail-fast : true
10+
11+ env :
12+ FC : gfortran
13+ GCC_V : 10
14+
15+ steps :
16+ - name : Checkout code
17+ uses : actions/checkout@v2
18+
19+ - name : Install Dependencies
20+ run : |
21+ sudo apt install -y gfortran-${GCC_V} cmake mpich
22+ sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} 100
23+
24+ - name : Build and Test
25+ run : |
26+ mkdir build
27+ cd build
28+ cmake -Wdev -DCMAKE_INSTALL_PREFIX:PATH="${HOME}/OpenCoarrays" -DCMAKE_BUILD_TYPE:STRING="Debug" ..
29+ make -j $(nproc)
30+ ctest --output-on-failure --schedule-random --repeat-until-fail 1 --timeout 200
31+ make install
32+ make uninstall
Original file line number Diff line number Diff line change @@ -11,9 +11,7 @@ set_or_print_downloader()
1111
1212 package_name=" ${arg_p:- ${arg_D:- ${arg_P:- ${arg_U:- ${arg_V} } } } } "
1313
14- if [[ " ${package_name} " == " gcc" ]]; then
15- arg_b=${arg_b:- releases/ gcc-${version_to_build} }
16- elif [[ " ${package_name} " == " ofp" ]]; then
14+ if [[ " ${package_name} " == " ofp" ]]; then
1715 " ${OPENCOARRAYS_SRC_DIR} /prerequisites/install-ofp.sh" " ${@ } "
1816 exit 0
1917 fi
@@ -36,7 +34,7 @@ set_or_print_downloader()
3634 tried=" curl, wget, and ftp"
3735 fi
3836
39- if [[ " ${package_name} " == " gcc" ]]; then
37+ if [[ " ${package_name} " == " gcc" && ! -z ${arg_b :- } ]]; then
4038 if type git & > /dev/null; then
4139 fetch=git
4240 else
Original file line number Diff line number Diff line change 2121 major_minor=" ${version_to_build% .* } "
2222 fi
2323 package_url_head=(
24- " gcc;https://gcc .gnu.org/git /"
24+ " gcc;https://ftp .gnu.org/gnu/gcc/gcc- ${version_to_build-} /"
2525 " wget;https://ftpmirror.gnu.org/gnu/wget/"
2626 " m4;https://ftpmirror.gnu.org/gnu/m4/"
2727 " pkg-config;https://pkgconfig.freedesktop.org/releases/"
4444 fi
4545 done
4646
47+ if [[ ! -z ${arg_b:- } && ${package_to_build} == ' gcc' ]]; then
48+ url_head=" https://gcc.gnu.org/git/"
49+ fi
50+
4751 # Set differing tails for GCC release downloads versus development branch checkouts
4852 package_url_tail=(
49- " gcc;gcc"
53+ " gcc;gcc- ${version_to_build-} .tar.gz "
5054 " wget;wget-${version_to_build-} .tar.gz"
5155 " m4;m4-${version_to_build-} .tar.bz2"
5256 " pkg-config;pkg-config-${version_to_build-} .tar.gz"
7175 fi
7276 done
7377
78+ if [[ ! -z ${arg_b:- } && ${package_to_build} == ' gcc' ]]; then
79+ url_tail=" gcc"
80+ fi
7481
7582 if [[ -z " ${url_head:- } " || -z " ${url_tail} " ]]; then
7683 emergency " Package ${package_name:- } not recognized. Use --l or --list-packages to list the allowable names."
Original file line number Diff line number Diff line change @@ -19,7 +19,10 @@ build_opencoarrays()
1919 MPIFC_show=($( " $MPIFC " -show) )
2020 MPICC_show=($( " $MPICC " -show) )
2121 if [[ " ${MPIFC_show[0]} " != * gfortran* ]]; then
22- emergency " build_opencoarrays.sh: MPI doesn't wrap gfortran/gcc: \$ {MPIFC_show}=${MPIFC_show[*]} "
22+ export fortran_compiler_identity=" $( ${MPIFC_show[0]} --version) "
23+ if [[ $fortran_compiler_identity != " GNU Fortran" * ]]; then
24+ emergency " build_opencoarrays.sh: MPI doesn't wrap gfortran/gcc: \$ {MPIFC_show}=${MPIFC_show[*]} "
25+ fi
2326 fi
2427 if [[ -z " ${OPENCOARRAYS_DEVELOPER:- } " ]]; then
2528 # We should examine the value too, but CMake has many ways of saying "true"
Original file line number Diff line number Diff line change 22report_results ()
33{
44 fully_qualified_FC=" $( type -P " ${FC} " ) "
5- if [[ ${fully_qualified_FC} != * gfortran* ]]; then
6- emergency " report_results.sh: non-gfortran compiler: \$ {fully_qualified_FC}=${fully_qualified_FC} "
7- fi
8- # Set path_to_FC fully-qualified gfortran location
9- compiler_install_root=" ${fully_qualified_FC% bin/ gfortran* } "
5+ compiler_install_root=" ${fully_qualified_FC% bin/ ${FC} } "
106
117 fully_qualified_MPIFC=" $( type -P " ${MPIFC} " ) "
128 mpi_install_root=" ${fully_qualified_MPIFC% bin/ mpifort* } "
You can’t perform that action at this time.
0 commit comments