1
0
mirror of https://github.com/TREX-CoE/qmckl.git synced 2024-12-22 20:36:01 +01:00
qmckl/.github/workflows/test-build.yml
2024-11-04 17:10:26 +01:00

195 lines
4.2 KiB
YAML

name: test-build
on:
push:
pull_request:
permissions:
contents: read
jobs:
standard:
runs-on: ubuntu-latest
name: Standard
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt-get install emacs autoconf libhdf5-dev
- name: Install the latest TREXIO from the GitHub clone
run: |
git clone https://github.com/TREX-CoE/trexio.git
cd trexio
./autogen.sh
./configure --prefix=/usr
make -j 4
sudo make install
- name: Build QMCkl
run: |
./autogen.sh
mkdir _build
cd _build
../configure --enable-silent-rules --enable-python
make -j 4
sudo make install
- name: Run test
run: make -j 4 check
working-directory: _build
- name: Archive test log file
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-report-ubuntu
path: test-suite.log
- name: Dist test
run: make distcheck
working-directory: _build
- name: Setup the virtual environment
run: |
python3 -m venv --clear pyqmckl
source pyqmckl/bin/activate
- name: Install the Python requirements
run: pip install -r requirements.txt
working-directory: python
- name: Install the Python API
run: make python-install
working-directory: _build
- name: Test the Python API
run: make python-test
working-directory: _build
debug:
runs-on: ubuntu-latest
name: Debug
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt-get install emacs autoconf libhdf5-dev
- name: Install the latest TREXIO from the GitHub clone
run: |
git clone https://github.com/TREX-CoE/trexio.git
cd trexio
./autogen.sh
./configure --prefix=/usr
make -j 4
sudo make install
- name: Build QMCkl in debug mode
run: |
./autogen.sh
mkdir _build_debug
cd _build_debug
../configure --enable-debug --enable-silent-rules
make -j2
- name: Run test
run: make -j2 check
working-directory: _build_debug
- name: Archive test log file
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-report-ubuntu-debug
path: _build_debug/test-suite.log
hpc:
runs-on: ubuntu-latest
name: HPC
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt-get install emacs autoconf libhdf5-dev
- name: Install the latest TREXIO from the GitHub clone
run: |
git clone https://github.com/TREX-CoE/trexio.git
cd trexio
./autogen.sh
./configure --prefix=/usr
make -j 4
sudo make install
- name: Compile QMCkl in HPC mode
run: |
./autogen.sh
mkdir _build_hpc
cd _build_hpc
../configure --enable-hpc
make -j2
- name: Run test
run: make -j2 check
working-directory: _build_hpc
- name: Archive test log file
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-report-ubuntu-debug
path: _build_hpc/test-suite.log
macos:
runs-on: macos-13
name: x86 MacOS 13
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
brew install emacs
brew install automake
brew install hdf5
brew install gcc
brew install gfortran
brew --prefix hdf5
- name: Install the latest TREXIO from the GitHub clone
run: |
git clone https://github.com/TREX-CoE/trexio.git
cd trexio
./autogen.sh
./configure FC=gfortran-12 --enable-silent-rules
make -j 4
sudo make install
- name: Compile QMCkl in HPC mode
run: |
./autogen.sh
mkdir _build_hpc
cd _build_hpc
../configure --enable-hpc FC=gfortran-12 CC=gcc-12
make -j2
- name: Run test
run: make -j2 check
working-directory: _build_hpc
- name: Archive test log file
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-report-macos-x86
path: _build_hpc/test-suite.log