Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: add linting and pre-commit #40

Merged
merged 16 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ docker-compose*
Dockerfile*

# git files
.git/objects/pack
.git/objects/pack
2 changes: 1 addition & 1 deletion .git_archival.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$
ref-names: $Format:%D$
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Auto detect text files and perform LF normalization
* text=auto

.git_archival.txt export-subst
.git_archival.txt export-subst
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#global ownrs
* @thenoursehorse
* @thenoursehorse
186 changes: 91 additions & 95 deletions .github/actions/setup-triqs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,109 +24,105 @@ runs:
using: "composite"

steps:
- name: Setup Python ${{ inputs.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
allow-prereleases: true

- name: Install updates
shell: bash
run: |
sudo apt-get update &&
sudo apt-get install -y lsb-release wget software-properties-common

- name: Install clang
shell: bash
if: ${{ contains(inputs.cc, 'clang') }}
run:
wget -O /tmp/llvm.sh https://apt.llvm.org/llvm.sh &&
sudo chmod +x /tmp/llvm.sh &&
sudo /tmp/llvm.sh ${{ inputs.llvm }} &&
sudo apt-get install -y
- name: Setup Python ${{ inputs.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
allow-prereleases: true

- name: Install updates
shell: bash
run: |
sudo apt-get update &&
sudo apt-get install -y lsb-release wget software-properties-common

- name: Install clang
shell: bash
if: ${{ contains(inputs.cc, 'clang') }}
run: wget -O /tmp/llvm.sh https://apt.llvm.org/llvm.sh &&
sudo chmod +x /tmp/llvm.sh &&
sudo /tmp/llvm.sh ${{ inputs.llvm }} &&
sudo apt-get install -y
clang-${{ inputs.llvm }}
lldb-${{ inputs.llvm }}
libclang-${{ inputs.llvm }}-dev
libc++-${{ inputs.llvm }}-dev
libc++abi-${{ inputs.llvm }}-dev
libclang-${{ inputs.llvm }}-dev
libc++-${{ inputs.llvm }}-dev
libc++abi-${{ inputs.llvm }}-dev
libomp-${{ inputs.llvm }}-dev &&
echo "CXXFLAGS=-stdlib=libc++" >> $GITHUB_ENV

- name: Install gcc
shell: bash
if: ${{ contains(inputs.cc, 'gcc') }}
run:
sudo apt-get install -y
echo "CXXFLAGS=-stdlib=libc++" >> $GITHUB_ENV

- name: Install gcc
shell: bash
if: ${{ contains(inputs.cc, 'gcc') }}
run: sudo apt-get install -y
g++-${{ inputs.gcc-version }}

- name: Install ubuntu dependencies
shell: bash
run:
sudo apt-get install -y
cmake
gfortran
git
hdf5-tools
libfftw3-dev
libgfortran5
libgmp-dev
libhdf5-dev
libblas-dev
liblapack-dev
libboost-dev
libopenmpi-dev
openmpi-bin
openmpi-common
- name: Install ubuntu dependencies
shell: bash
run: sudo apt-get install -y
cmake
gfortran
git
hdf5-tools
libfftw3-dev
libgfortran5
libgmp-dev
libhdf5-dev
libblas-dev
liblapack-dev
libboost-dev
libopenmpi-dev
openmpi-bin
openmpi-common
python3-dev

- name: Install python dependencies
shell: bash
run:
python -m pip install
mako
mpi4py
h5py
numpy
scipy
clang

- name: Setup clang environment
shell: bash
if: ${{ contains(inputs.cc, 'clang') }}
run: |
echo "CC=${{ inputs.cc }}-${{ inputs.llvm }}" >> $GITHUB_ENV
echo "CXX=${{ inputs.cxx }}-${{ inputs.llvm }}" >> $GITHUB_ENV

- name: Setup gcc environment
shell: bash
if: ${{ contains(inputs.cc, 'gcc') }}
run: |
echo "CC=${{ inputs.cc }}-${{ inputs.gcc-version }}" >> $GITHUB_ENV
echo "CXX=${{ inputs.cxx }}-${{ inputs.gcc-version }}" >> $GITHUB_ENV

- name: Cache build TRIQS
id: build-triqs
uses: actions/cache@v4
with:
path: triqs
key: triqs-${{ inputs.os }}-${{ inputs.python-version }} ${{ inputs.cc }}-${{ inputs.llvm }}-${{ inputs.gcc-version }}
- name: Install python dependencies
shell: bash
run: python -m pip install
mako
mpi4py
h5py
numpy
scipy
clang

- name: Setup clang environment
shell: bash
if: ${{ contains(inputs.cc, 'clang') }}
run: |
echo "CC=${{ inputs.cc }}-${{ inputs.llvm }}" >> $GITHUB_ENV
echo "CXX=${{ inputs.cxx }}-${{ inputs.llvm }}" >> $GITHUB_ENV

- name: Setup gcc environment
shell: bash
if: ${{ contains(inputs.cc, 'gcc') }}
run: |
echo "CC=${{ inputs.cc }}-${{ inputs.gcc-version }}" >> $GITHUB_ENV
echo "CXX=${{ inputs.cxx }}-${{ inputs.gcc-version }}" >> $GITHUB_ENV

- name: Cache build TRIQS
id: build-triqs
uses: actions/cache@v4
with:
path: triqs
key: triqs-${{ inputs.os }}-${{ inputs.python-version }} ${{ inputs.cc }}-${{ inputs.llvm }}-${{ inputs.gcc-version }}

- name: Build TRIQS
shell: bash
if: steps.build-triqs.outputs.cache-hit != 'true'
run: |
git clone https://github.com/TRIQS/triqs
mkdir triqs/build && cd triqs/build
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/triqs_install -DBuild_Documentation=OFF -DBuild_Tests=OFF
make -j1 VERBOSE=1
cd ../../

- name: Build TRIQS
shell: bash
if: steps.build-triqs.outputs.cache-hit != 'true'
run: |
git clone https://github.com/TRIQS/triqs
mkdir triqs/build && cd triqs/build
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/triqs_install -DBuild_Documentation=OFF -DBuild_Tests=OFF
make -j1 VERBOSE=1
cd ../../

- name: Install TRIQS
shell: bash
run: |
cd triqs/build && make install && cd ../../
echo "TRIQS_INSTALL=$HOME/triqs_install" >> $GITHUB_ENV
- name: Install TRIQS
shell: bash
run: |
cd triqs/build && make install && cd ../../
echo "TRIQS_INSTALL=$HOME/triqs_install" >> $GITHUB_ENV

branding:
icon: "package"
color: "purple"
color: "purple"
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ updates:
groups:
actions:
patterns:
- "*"
- "*"
Loading