Skip to content

Commit

Permalink
sync with dev2
Browse files Browse the repository at this point in the history
  • Loading branch information
DrTimothyAldenDavis committed Feb 21, 2024
1 parent 68e59ad commit c28a5f1
Show file tree
Hide file tree
Showing 12 changed files with 580 additions and 1,798 deletions.
66 changes: 58 additions & 8 deletions .github/workflows/build-arch-emu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ concurrency: ci-arch-emu-${{ github.ref }}

env:
# string with name of libraries to be built
BUILD_LIBS: "SuiteSparse_config:AMD:COLAMD:SPEX"
BUILD_LIBS: "SuiteSparse_config:Mongoose:AMD:BTF:CAMD:CCOLAMD:COLAMD:CHOLMOD:CSparse:CXSparse:LDL:KLU:UMFPACK:ParU:RBio:SPQR:SPEX"
# string with name of libraries to be checked
CHECK_LIBS: "SuiteSparse_config:AMD:COLAMD:SPEX"
CHECK_LIBS: "SuiteSparse_config:Mongoose:AMD:BTF:CAMD:CCOLAMD:COLAMD:CHOLMOD:CSparse:CXSparse:LDL:KLU:UMFPACK:ParU:RBio:SPQR:SPEX"
# string with name of libraries that are installed
INSTALLED_LIBS: "SuiteSparse_config:AMD:COLAMD:SPEX"
INSTALLED_LIBS: "SuiteSparse_config:Mongoose:AMD:BTF:CAMD:CCOLAMD:COLAMD:CHOLMOD:CXSparse:LDL:KLU:UMFPACK:ParU:RBio:SPQR:SPEX"


jobs:
Expand All @@ -39,8 +39,8 @@ jobs:
include:
- arch: x86
ccache-max: 80M
extra-build-libs: ""
extra-check-libs: ""
extra-build-libs: ":GraphBLAS:LAGraph"
extra-check-libs: ":GraphBLAS:LAGraph"
- arch: aarch64
ccache-max: 42M
- arch: armv7
Expand All @@ -58,7 +58,7 @@ jobs:
run: lscpu

- name: checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
# shell: bash

- name: install dependencies
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
- name: restore ccache
# setup the GitHub cache used to maintain the ccache from one job to the next
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
# location of the ccache of the chroot in the root file system
path: /home/runner/rootfs/alpine-latest-${{ matrix.arch }}/home/runner/.ccache
Expand Down Expand Up @@ -164,7 +164,7 @@ jobs:
- name: save ccache
# Save the cache after we are done (successfully) building
# This helps to retain the ccache even if the subsequent steps are failing.
uses: actions/cache/save@v3
uses: actions/cache/save@v4
with:
path: /home/runner/rootfs/alpine-latest-${{ matrix.arch }}/home/runner/.ccache
key: ${{ steps.ccache-prepare.outputs.key }}
Expand All @@ -180,6 +180,25 @@ jobs:
echo "::endgroup::"
done
- name: build example using CMake
run: |
cd ${GITHUB_WORKSPACE}/Example/build
printf "::group::\033[0;32m==>\033[0m Configuring example\n"
cmake \
-DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/lib/cmake" \
-DBLA_VENDOR="Generic" \
..
echo "::endgroup::"
printf "::group::\033[0;32m==>\033[0m Building example\n"
cmake --build .
echo "::endgroup::"
printf "::group::\033[0;32m==>\033[0m Executing example\n"
printf "\033[1;35m C binary with shared libraries\033[0m\n"
./my_demo
printf "\033[1;35m C++ binary with shared libraries\033[0m\n"
./my_cxx_demo
echo "::endgroup::"
- name: test Config
run: |
IFS=:
Expand All @@ -195,3 +214,34 @@ jobs:
echo "::endgroup::"
done
- name: build example using autotools
run: |
cd ${GITHUB_WORKSPACE}/Example
printf "::group::\033[0;32m==>\033[0m Configuring example\n"
autoreconf -fi
mkdir build-autotools
cd build-autotools
PKG_CONFIG_PATH=${GITHUB_WORKSPACE}/lib/pkgconfig/ \
../configure --enable-shared --disable-static
echo "::endgroup::"
printf "::group::\033[0;32m==>\033[0m Building example\n"
make all
echo "::endgroup::"
printf "::group::\033[0;32m==>\033[0m Executing example\n"
printf "\033[1;35m C binary\033[0m\n"
LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/lib ./my_demo
printf "\033[1;35m C++ binary\033[0m\n"
LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/lib ./my_cxx_demo
echo "::endgroup::"
IFS=:
INSTALLED_LIBS="${INSTALLED_LIBS}${{ matrix.extra-build-libs }}"
for lib in ${INSTALLED_LIBS}; do
printf "::group:: \033[0;32m==>\033[0m Building test with library \033[0;32m${lib}\033[0m\n"
cd ${GITHUB_WORKSPACE}/TestConfig/${lib}
autoreconf -fi
mkdir build-autotools && cd build-autotools
PKG_CONFIG_PATH=${GITHUB_WORKSPACE}/lib/pkgconfig/ \
../configure --enable-shared --disable-static
make all
echo "::endgroup::"
done
141 changes: 132 additions & 9 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ concurrency: ci-${{ github.ref }}

env:
# string with name of libraries to be built
BUILD_LIBS: "SuiteSparse_config:AMD:COLAMD:SPEX"
BUILD_LIBS: "SuiteSparse_config:Mongoose:AMD:BTF:CAMD:CCOLAMD:COLAMD:CHOLMOD:CSparse:CXSparse:LDL:KLU:UMFPACK:ParU:RBio:SPQR:SPEX:GraphBLAS:LAGraph"
# string with name of libraries to be checked
CHECK_LIBS: "SuiteSparse_config:AMD:COLAMD:SPEX"
CHECK_LIBS: "SuiteSparse_config:Mongoose:AMD:BTF:CAMD:CCOLAMD:COLAMD:CHOLMOD:CSparse:CXSparse:LDL:KLU:UMFPACK:ParU:RBio:SPQR:SPEX:GraphBLAS:LAGraph"
# string with name of libraries that are installed
INSTALLED_LIBS: "SuiteSparse_config:AMD:COLAMD:SPEX"
INSTALLED_LIBS: "SuiteSparse_config:Mongoose:AMD:BTF:CAMD:CCOLAMD:COLAMD:CHOLMOD:CXSparse:LDL:KLU:UMFPACK:ParU:RBio:SPQR:SPEX:GraphBLAS:LAGraph"


jobs:
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
run: lscpu

- name: checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: install dependencies
env:
Expand All @@ -115,7 +115,7 @@ jobs:
- name: restore ccache
# setup the GitHub cache used to maintain the ccache from one job to the next
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: ~/.ccache
key: ${{ steps.ccache-prepare.outputs.key }}
Expand Down Expand Up @@ -192,7 +192,7 @@ jobs:
- name: save ccache
# Save the cache after we are done (successfully) building
# This helps to retain the ccache even if the subsequent steps are failing.
uses: actions/cache/save@v3
uses: actions/cache/save@v4
with:
path: ~/.ccache
key: ${{ steps.ccache-prepare.outputs.key }}
Expand All @@ -207,6 +207,33 @@ jobs:
echo "::endgroup::"
done
- name: build example using CMake
run: |
cd ${GITHUB_WORKSPACE}/Example/build
printf "::group::\033[0;32m==>\033[0m Configuring example\n"
cmake \
-DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/lib/cmake" \
-DBLA_VENDOR="OpenBLAS" \
${{ matrix.cuda-cmake-flags }} \
${{ matrix.link-cmake-flags }} \
..
echo "::endgroup::"
printf "::group::\033[0;32m==>\033[0m Building example\n"
cmake --build .
echo "::endgroup::"
printf "::group::\033[0;32m==>\033[0m Executing example\n"
if [ -f ./my_demo -a -f ./my_cxx_demo ]; then
printf "\033[1;35m C binary with shared libraries\033[0m\n"
./my_demo
printf "\033[1;35m C++ binary with shared libraries\033[0m\n"
./my_cxx_demo
fi
printf "\033[1;35m C binary with statically linked libraries\033[0m\n"
./my_demo_static
printf "\033[1;35m C++ binary with statically linked libraries\033[0m\n"
./my_cxx_demo_static
echo "::endgroup::"
- name: test Config
run: |
IFS=':' read -r -a libs <<< "${INSTALLED_LIBS}"
Expand All @@ -221,6 +248,42 @@ jobs:
echo "::endgroup::"
done
- name: build example using autotools
run: |
cd ${GITHUB_WORKSPACE}/Example
printf "::group::\033[0;32m==>\033[0m Configuring example\n"
autoreconf -fi
mkdir build-autotools
cd build-autotools
if [ "${{ matrix.link }}" = static ]; then
_extra_config_flags="--enable-static --disable-shared"
else
_extra_config_flags="--enable-shared --disable-static"
fi
PKG_CONFIG_PATH=${GITHUB_WORKSPACE}/lib/pkgconfig/ \
../configure ${_extra_config_flags}
echo "::endgroup::"
printf "::group::\033[0;32m==>\033[0m Building example\n"
make all
echo "::endgroup::"
printf "::group::\033[0;32m==>\033[0m Executing example\n"
printf "\033[1;35m C binary\033[0m\n"
LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/lib ./my_demo
printf "\033[1;35m C++ binary\033[0m\n"
LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/lib ./my_cxx_demo
echo "::endgroup::"
IFS=':' read -r -a libs <<< "${INSTALLED_LIBS}"
for lib in "${libs[@]}"; do
printf "::group:: \033[0;32m==>\033[0m Building test with library \033[0;32m${lib}\033[0m\n"
cd ${GITHUB_WORKSPACE}/TestConfig/${lib}
autoreconf -fi
mkdir build-autotools && cd build-autotools
PKG_CONFIG_PATH=${GITHUB_WORKSPACE}/lib/pkgconfig/ \
../configure ${_extra_config_flags}
make all
echo "::endgroup::"
done
mingw:
# For available GitHub-hosted runners, see:
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
Expand Down Expand Up @@ -285,7 +348,7 @@ jobs:
msystem: ${{ matrix.msystem }}

- name: checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: prepare ccache
# create key with human readable timestamp
Expand All @@ -297,7 +360,7 @@ jobs:
- name: restore ccache
# Setup the GitHub cache used to maintain the ccache from one job to the next
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: ${{ steps.ccache-prepare.outputs.ccachedir }}
key: ${{ steps.ccache-prepare.outputs.key }}
Expand Down Expand Up @@ -362,11 +425,39 @@ jobs:
- name: save ccache
# Save the cache after we are done (successfully) building
# This helps to retain the ccache even if the subsequent steps are failing.
uses: actions/cache/save@v3
uses: actions/cache/save@v4
with:
path: ${{ steps.ccache-prepare.outputs.ccachedir }}
key: ${{ steps.ccache-prepare.outputs.key }}

- name: build example using CMake
run: |
cd ${GITHUB_WORKSPACE}/Example/build
printf "::group::\033[0;32m==>\033[0m Configuring example\n"
cmake \
-DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/lib/cmake" \
..
echo "::endgroup::"
printf "::group::\033[0;32m==>\033[0m Building example\n"
cmake --build .
echo "::endgroup::"
printf "::group::\033[0;32m==>\033[0m Executing example\n"
printf "\033[1;35m C binary with shared libraries\033[0m\n"
PATH="${GITHUB_WORKSPACE}/bin:${PATH}" \
./my_demo
printf "\033[1;35m C++ binary with shared libraries\033[0m\n"
PATH="${GITHUB_WORKSPACE}/bin:${PATH}" \
./my_cxx_demo
# We don't build a static version of GraphBLAS in CI.
# So we need to prepare the environment also for the following tests.
printf "\033[1;35m C binary with statically linked libraries\033[0m\n"
PATH="${GITHUB_WORKSPACE}/bin:${PATH}" \
./my_demo_static
printf "\033[1;35m C++ binary with statically linked libraries\033[0m\n"
PATH="${GITHUB_WORKSPACE}/bin:${PATH}" \
./my_cxx_demo_static
echo "::endgroup::"
- name: test Config
run: |
IFS=':' read -r -a libs <<< "${INSTALLED_LIBS}"
Expand All @@ -381,3 +472,35 @@ jobs:
echo "::endgroup::"
done
- name: build example using autotools
run: |
cd ${GITHUB_WORKSPACE}/Example
printf "::group::\033[0;32m==>\033[0m Configuring example\n"
autoreconf -fi
mkdir build-autotools
cd build-autotools
PKG_CONFIG_PATH=${GITHUB_WORKSPACE}/lib/pkgconfig/ \
../configure --enable-shared --disable-static
echo "::endgroup::"
printf "::group::\033[0;32m==>\033[0m Building example\n"
make all
echo "::endgroup::"
printf "::group::\033[0;32m==>\033[0m Executing example\n"
printf "\033[1;35m C binary\033[0m\n"
PATH="${GITHUB_WORKSPACE}/bin:${PATH}" \
./my_demo
printf "\033[1;35m C++ binary\033[0m\n"
PATH="${GITHUB_WORKSPACE}/bin:${PATH}" \
./my_cxx_demo
echo "::endgroup::"
IFS=':' read -r -a libs <<< "${INSTALLED_LIBS}"
for lib in "${libs[@]}"; do
printf "::group:: \033[0;32m==>\033[0m Building test with library \033[0;32m${lib}\033[0m\n"
cd ${GITHUB_WORKSPACE}/TestConfig/${lib}
autoreconf -fi
mkdir build-autotools && cd build-autotools
PKG_CONFIG_PATH=${GITHUB_WORKSPACE}/lib/pkgconfig/ \
../configure --enable-shared --disable-static
make all
echo "::endgroup::"
done
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
# group: [other, graph]
include:
- group: other
build-libs: SuiteSparse_config:AMD:COLAMD:SPEX
build-libs: SuiteSparse_config:Mongoose:AMD:BTF:CAMD:CCOLAMD:COLAMD:CHOLMOD:CSparse:CXSparse:LDL:KLU:UMFPACK:ParU:RBio:SPQR:SPEX
# - group: graph
# build-libs: GraphBLAS:LAGraph

Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:
# group: [other, graph]
include:
- group: other
build-libs: SuiteSparse_config:AMD:COLAMD:SPEX
build-libs: SuiteSparse_config:Mongoose:AMD:BTF:CAMD:CCOLAMD:COLAMD:CHOLMOD:CSparse:CXSparse:LDL:KLU:UMFPACK:ParU:RBio:SPQR:SPEX
# - group: graph
# build-libs: GraphBLAS:LAGraph

Expand Down
Loading

0 comments on commit c28a5f1

Please sign in to comment.