add some docs #1314
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Test | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build_qlat_ubuntu: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Show info | |
run: | | |
whoami | |
pwd | |
type python3 | |
type pip3 | |
qcore/bin/organize-env-path.py | |
qcore/bin/show-env.py | |
- name: Install Ubuntu packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y git bzip2 autoconf unzip | |
sudo apt-get install -y python3-full python3-dev | |
sudo apt-get install -y libopenmpi-dev ninja-build patchelf libeigen3-dev libgsl-dev zlib1g-dev libssl-dev libmpfr-dev | |
sudo apt-get install -y libfftw3-dev | |
# sudo apt-get install -y gnuplot texlive-metapost poppler-utils | |
# | |
sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra tex-gyre | |
- name: Build default | |
run: | | |
export num_proc=2 | |
export prefix=~/qlat-build/default | |
./build.sh | |
- name: Show python venv | |
run: | | |
source ~/qlat-build/default/setenv.sh | |
pip3 install Sphinx myst-parser linkify-it-py | |
python3 -c "import sys; print(sys.version)" | |
python3 -c "import sys; print(sys.path)" | |
python3 -c "import numpy as np ; np.show_config()" | |
python3 -c 'import sys ; from mesonbuild import mesonmain; sys.exit(mesonmain.main())' --version | |
type ninja | |
ninja --version | |
- name: Build qlat-docs | |
run: | | |
export num_proc=2 | |
export prefix=~/qlat-build/default | |
./scripts/qlat-docs.sh | |
[ -f /home/runner/qlat-build/default/qlat-docs/share/doc/qlat/html/index.html ] | |
- name: Testing pylib qlat | |
run: | | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-py.sh | |
- name: Testing qlat | |
run: | | |
export num_proc=2 | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-cpp.sh | |
- name: Check log diff | |
run: | | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-diff-new-logs.sh | |
- name: Update log | |
run: | | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-update-logs.sh | |
- name: Check error | |
run: | | |
! git diff | grep '^[+-]CHECK: ' | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: qlat-docs | |
path: /home/runner/qlat-build/default/qlat-docs/share/doc | |
- uses: actions/configure-pages@v4 | |
- uses: actions/upload-pages-artifact@v3 | |
with: | |
path: /home/runner/qlat-build/default/qlat-docs/share/doc/qlat/html | |
deploy_docs: | |
# Add a dependency to the build job | |
needs: build_qlat_ubuntu | |
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
# Deploy to the github-pages environment | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
# Specify runner + deployment step | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |
build_qlat_gpt_ubuntu: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Show info | |
run: | | |
whoami | |
pwd | |
type python3 | |
type pip3 | |
qcore/bin/organize-env-path.py | |
qcore/bin/show-env.py | |
- name: Install Ubuntu packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y git bzip2 autoconf unzip | |
sudo apt-get install -y python3-full python3-dev | |
sudo apt-get install -y libopenmpi-dev ninja-build patchelf libeigen3-dev libgsl-dev zlib1g-dev libssl-dev libmpfr-dev | |
sudo apt-get install -y libfftw3-dev | |
sudo apt-get install -y clang libomp-dev | |
# sudo apt-get install -y gnuplot texlive-metapost poppler-utils | |
- name: Download dependencies | |
run: | | |
./scripts/download-core.sh | |
- name: Show versions for dependencies | |
run: | | |
./scripts/update-sources.sh | |
- name: Build default-gpt | |
run: | | |
export num_proc=2 | |
export prefix=~/qlat-build/default | |
./build.sh default-gpt | |
- name: Show python venv | |
run: | | |
source ~/qlat-build/default/setenv.sh | |
python3 -c "import sys; print(sys.version)" | |
python3 -c "import sys; print(sys.path)" | |
python3 -c "import numpy as np ; np.show_config()" | |
python3 -c 'import sys ; from mesonbuild import mesonmain; sys.exit(mesonmain.main())' --version | |
type ninja | |
ninja --version | |
- name: Testing pylib qlat | |
run: | | |
export num_proc=2 | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-py.sh | |
- name: Testing pylib qlat cps | |
run: | | |
export num_proc=2 | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-py-cps.sh | |
- name: Testing pylib qlat gpt | |
run: | | |
export num_proc=2 | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-py-gpt.sh | |
- name: Testing qlat | |
run: | | |
export num_proc=2 | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-cpp.sh | |
- name: Testing qlat grid | |
run: | | |
export num_proc=2 | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-cpp-grid.sh | |
- name: Check log diff | |
run: | | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-diff-new-logs.sh | |
- name: Update log | |
run: | | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-update-logs.sh | |
- name: Check error | |
run: | | |
! git diff | grep '^[+-]CHECK: ' # || echo "Check failed!" | |
- name: Build more packages Grid | |
run: | | |
source ~/qlat-build/default/setenv.sh | |
export num_proc=2 | |
export prefix=~/qlat-build/hadrons | |
./scripts/setenv.default.sh | |
USE_COMPILER=clang ./scripts/grid.avx2.sh | |
- name: Build more packages Hadrons | |
run: | | |
source ~/qlat-build/default/setenv.sh | |
export num_proc=2 | |
export prefix=~/qlat-build/hadrons | |
USE_COMPILER=clang ./scripts/hadrons.sh | |
- name: Build more packages Grid-tblum | |
run: | | |
source ~/qlat-build/default/setenv.sh | |
export num_proc=2 | |
export prefix=~/qlat-build/tblum | |
./scripts/setenv.default.sh | |
USE_COMPILER=clang ./scripts/grid-tblum.avx2.sh | |
- name: Build more packages Hadrons-tblum | |
run: | | |
source ~/qlat-build/default/setenv.sh | |
export num_proc=2 | |
export prefix=~/qlat-build/tblum | |
USE_COMPILER=clang ./scripts/hadrons-tblum.sh | |
- name: Check error for Build more packages | |
run: | | |
for path in $HOME/qlat-build/{default/gpt/lib/python3/dist-packages/{cgpt.so,gpt/__init__.py},{default/Grid-clehner,hadrons/Grid,tblum/Grid-tblum}/{lib/libGrid.a,bin/{grid-config,Mobius2p1fEOFA,Benchmark_dwf,Benchmark_dwf_fp32}},{hadrons/Hadrons,tblum/Hadrons-tblum}/{lib/libHadrons.a,bin/{hadrons-config,HadronsXmlRun,HadronsContractor}}} ; do if [ -e "$path" ] ; then echo "Build '$path' successfully." ; else echo "Failed to build '$path'." ; fi ; done | |
build_pip_ubuntu: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Show info | |
run: | | |
whoami | |
pwd | |
type python3 | |
type pip3 | |
qcore/bin/organize-env-path.py | |
qcore/bin/show-env.py | |
- name: Install Ubuntu packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y git bzip2 autoconf unzip | |
sudo apt-get install -y python3-full python3-dev | |
sudo apt-get install -y libopenmpi-dev ninja-build patchelf libeigen3-dev libgsl-dev zlib1g-dev libssl-dev libmpfr-dev | |
sudo apt-get install -y libfftw3-dev | |
# sudo apt-get install -y gnuplot texlive-metapost poppler-utils | |
- name: Download dependencies | |
run: | | |
./scripts/download-core.sh | |
- name: Show versions for dependencies | |
run: | | |
./scripts/update-sources.sh | |
- name: Build dependencies | |
run: | | |
export num_proc=2 | |
export prefix=~/qlat-build/default | |
./scripts/setenv.default.sh | |
./scripts/qcore.sh | |
./scripts/python-venv.sh | |
./scripts/python-pip-install.sh | |
./scripts/cuba.sh | |
./scripts/eigen.sh | |
./scripts/c-lime.sh | |
./scripts/hdf5.sh | |
- name: Show python venv | |
run: | | |
source ~/qlat-build/default/setenv.sh | |
pip3 install -vU pip build meson-python wheel | |
python3 -c "import sys; print(sys.version)" | |
python3 -c "import sys; print(sys.path)" | |
python3 -c "import numpy as np ; np.show_config()" | |
python3 -c 'import sys ; from mesonbuild import mesonmain; sys.exit(mesonmain.main())' --version | |
type ninja | |
ninja --version | |
- name: Build CPS | |
run: | | |
export num_proc=2 | |
export prefix=~/qlat-build/default | |
./scripts/qmp.sh | |
./scripts/qio.sh | |
./scripts/cps.sh | |
- name: Build Grid-clehner | |
run: | | |
export num_proc=2 | |
export prefix=~/qlat-build/default | |
./scripts/grid-clehner.avx2.sh | |
- name: Build GPT | |
run: | | |
export num_proc=2 | |
export prefix=~/qlat-build/default | |
./scripts/gpt.sh | |
- name: Install Qlattice | |
run: | | |
export num_proc=2 | |
export prefix=~/qlat-build/default | |
./scripts/qlat-packages.sh | |
- name: Testing pylib qlat | |
run: | | |
export num_proc=2 | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-py.sh | |
- name: Testing pylib qlat cps | |
run: | | |
export num_proc=2 | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-py-cps.sh | |
- name: Testing qlat | |
run: | | |
export num_proc=2 | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-cpp.sh | |
- name: Testing qlat grid | |
run: | | |
export num_proc=2 | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-cpp-grid.sh | |
- name: Testing pylib qlat gpt | |
run: | | |
export num_proc=2 | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-py-gpt.sh | |
- name: Check log diff | |
run: | | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-diff-new-logs.sh | |
- name: Update log | |
run: | | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-update-logs.sh | |
- name: Check error | |
run: | | |
! git diff | grep '^[+-]CHECK: ' # || echo "Check failed!" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: qlat-packages | |
path: /home/runner/qlat-build/default/qlat-packages/packages/*.tar.gz | |
build_qlat_mac: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Show info | |
run: | | |
whoami | |
pwd | |
type python3 | |
type pip3 | |
qcore/bin/organize-env-path.py | |
qcore/bin/show-env.py | |
- name: Install Brew packages | |
run: | | |
# brew update | |
brew install llvm autoconf automake coreutils flock findutils pkg-config | |
brew install open-mpi ninja patchelf eigen gsl zlib openssl@3 mpfr | |
brew install fftw | |
# brew upgrade | |
- name: Build default | |
run: | | |
export num_proc=3 | |
export prefix=~/qlat-build/default | |
./build.sh | |
- name: Show python venv | |
run: | | |
source ~/qlat-build/default/setenv.sh | |
python3 -c "import sys; print(sys.version)" | |
python3 -c "import sys; print(sys.path)" | |
python3 -c "import numpy as np ; np.show_config()" | |
python3 -c 'import sys ; from mesonbuild import mesonmain; sys.exit(mesonmain.main())' --version | |
type ninja | |
ninja --version | |
- name: Testing pylib qlat | |
run: | | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-py.sh | |
- name: Testing qlat | |
run: | | |
export num_proc=3 | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-cpp.sh | |
- name: Check log diff | |
run: | | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-diff-new-logs.sh | |
- name: Update log | |
run: | | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-update-logs.sh | |
- name: Check error | |
run: | | |
! git diff | grep '^[+-]CHECK: ' | |
build_qlat_gpt_mac: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Show info | |
run: | | |
whoami | |
pwd | |
type python3 | |
type pip3 | |
qcore/bin/organize-env-path.py | |
qcore/bin/show-env.py | |
- name: Install Brew packages | |
run: | | |
# brew update | |
brew install llvm autoconf automake coreutils flock findutils pkg-config | |
brew install open-mpi ninja patchelf eigen gsl zlib openssl@3 mpfr | |
brew install fftw | |
# brew upgrade | |
- name: Download dependencies | |
run: | | |
./scripts/download-core.sh | |
- name: Show versions for dependencies | |
run: | | |
./scripts/update-sources.sh | |
- name: Build default-gpt | |
run: | | |
export num_proc=3 | |
export prefix=~/qlat-build/default | |
./build.sh default-gpt | |
- name: Show python venv | |
run: | | |
source ~/qlat-build/default/setenv.sh | |
python3 -c "import sys; print(sys.version)" | |
python3 -c "import sys; print(sys.path)" | |
python3 -c "import numpy as np ; np.show_config()" | |
python3 -c 'import sys ; from mesonbuild import mesonmain; sys.exit(mesonmain.main())' --version | |
type ninja | |
ninja --version | |
- name: Testing pylib qlat | |
run: | | |
export num_proc=3 | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-py.sh | |
- name: Testing pylib qlat cps | |
run: | | |
export num_proc=3 | |
export prefix=~/qlat-build/default | |
# ./scripts/qlat-examples-py-cps.sh # CPS not working on Mac yet | |
- name: Testing pylib qlat gpt | |
run: | | |
export num_proc=3 | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-py-gpt.sh | |
- name: Testing qlat | |
run: | | |
export num_proc=3 | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-cpp.sh | |
- name: Testing qlat grid | |
run: | | |
export num_proc=3 | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-cpp-grid.sh | |
- name: Check log diff | |
run: | | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-diff-new-logs.sh | |
- name: Update log | |
run: | | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-update-logs.sh | |
- name: Check error | |
run: | | |
! git diff | grep '^[+-]CHECK: ' # || echo "Check failed!" | |
- name: Build more packages Grid | |
run: | | |
source ~/qlat-build/default/setenv.sh | |
export num_proc=3 | |
export prefix=~/qlat-build/hadrons | |
./scripts/setenv.default.sh | |
USE_COMPILER=clang ./scripts/grid.gen16.sh | |
- name: Build more packages Hadrons | |
run: | | |
source ~/qlat-build/default/setenv.sh | |
export num_proc=3 | |
export prefix=~/qlat-build/hadrons | |
USE_COMPILER=clang ./scripts/hadrons.sh | |
- name: Build more packages Grid-tblum | |
run: | | |
source ~/qlat-build/default/setenv.sh | |
export num_proc=3 | |
export prefix=~/qlat-build/tblum | |
./scripts/setenv.default.sh | |
USE_COMPILER=clang ./scripts/grid-tblum.gen16.sh | |
- name: Build more packages Hadrons-tblum | |
run: | | |
source ~/qlat-build/default/setenv.sh | |
export num_proc=3 | |
export prefix=~/qlat-build/tblum | |
USE_COMPILER=clang ./scripts/hadrons-tblum.sh | |
- name: Check error for Build more packages | |
run: | | |
for path in $HOME/qlat-build/{default/gpt/lib/python3/dist-packages/{cgpt.so,gpt/__init__.py},{default/Grid-clehner,hadrons/Grid,tblum/Grid-tblum}/{lib/libGrid.a,bin/{grid-config,Mobius2p1fEOFA,Benchmark_dwf,Benchmark_dwf_fp32}},{hadrons/Hadrons,tblum/Hadrons-tblum}/{lib/libHadrons.a,bin/{hadrons-config,HadronsXmlRun,HadronsContractor}}} ; do if [ -e "$path" ] ; then echo "Build '$path' successfully." ; else echo "Failed to build '$path'." ; fi ; done | |
build_pip_mac: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Show info | |
run: | | |
whoami | |
pwd | |
type python3 | |
type pip3 | |
qcore/bin/organize-env-path.py | |
qcore/bin/show-env.py | |
- name: Install Brew packages | |
run: | | |
# brew update | |
brew install llvm autoconf automake coreutils flock findutils pkg-config | |
brew install open-mpi ninja patchelf eigen gsl zlib openssl@3 mpfr | |
brew install fftw | |
# brew upgrade | |
- name: Download dependencies | |
run: | | |
export prefix=~/qlat-build/default | |
./scripts/download-core.sh | |
- name: Show versions for dependencies | |
run: | | |
export prefix=~/qlat-build/default | |
./scripts/update-sources.sh | |
- name: Build dependencies | |
run: | | |
export num_proc=3 | |
export prefix=~/qlat-build/default | |
./scripts/setenv.default.sh | |
./scripts/qcore.sh | |
./scripts/python-venv.sh | |
./scripts/python-pip-install.sh | |
./scripts/cuba.sh | |
./scripts/eigen.sh | |
./scripts/c-lime.sh | |
./scripts/hdf5.sh | |
- name: Show python venv | |
run: | | |
source ~/qlat-build/default/setenv.sh | |
pip3 install -vU pip build meson-python wheel | |
python3 -c "import sys; print(sys.version)" | |
python3 -c "import sys; print(sys.path)" | |
python3 -c "import numpy as np ; np.show_config()" | |
python3 -c 'import sys ; from mesonbuild import mesonmain; sys.exit(mesonmain.main())' --version | |
type ninja | |
ninja --version | |
- name: Build CPS | |
run: | | |
export num_proc=2 | |
export prefix=~/qlat-build/default | |
./scripts/qmp.sh | |
./scripts/qio.sh | |
./scripts/cps.sh | |
- name: Build Grid-clehner | |
run: | | |
export num_proc=3 | |
export prefix=~/qlat-build/default | |
./scripts/grid-clehner.gen16.sh | |
- name: Build GPT | |
run: | | |
export num_proc=3 | |
export prefix=~/qlat-build/default | |
./scripts/gpt.sh | |
- name: Install Qlattice | |
run: | | |
export num_proc=3 | |
export prefix=~/qlat-build/default | |
./scripts/qlat-packages.sh | |
- name: Testing pylib qlat | |
run: | | |
export num_proc=3 | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-py.sh | |
- name: Testing pylib qlat cps | |
run: | | |
export num_proc=3 | |
export prefix=~/qlat-build/default | |
# ./scripts/qlat-examples-py-cps.sh | |
- name: Testing qlat | |
run: | | |
export num_proc=3 | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-cpp.sh | |
- name: Testing qlat grid | |
run: | | |
export num_proc=3 | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-cpp-grid.sh | |
- name: Testing pylib qlat gpt | |
run: | | |
export num_proc=3 | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-py-gpt.sh | |
- name: Check log diff | |
run: | | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-diff-new-logs.sh | |
- name: Update log | |
run: | | |
export prefix=~/qlat-build/default | |
./scripts/qlat-examples-update-logs.sh | |
- name: Check error | |
run: | | |
! git diff | grep '^[+-]CHECK: ' # || echo "Check failed!" |