-
Notifications
You must be signed in to change notification settings - Fork 143
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
Cmake #487
Open
LecrisUT
wants to merge
8
commits into
wannier-developers:develop
Choose a base branch
from
LecrisUT:cmake
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Cmake #487
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
36d0ec4
CMake implementation
LecrisUT 46d2fd5
Reconfigure GH Actions
LecrisUT 63a7eba
[WIP] Fix demo.F90
LecrisUT 2371623
Fedora packaging convention
LecrisUT 07fd984
Fix python shebang
LecrisUT 15188ba
Fix executable suffix
LecrisUT 9e992d2
Fix MPI support
LecrisUT ef03aef
Make wannier90.pc more relocatable
LecrisUT File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: CI | ||
run-name: > | ||
CI (${{ github.event_name }}) | ||
${{ github.event_name == 'pull_request' && format('PR#{0}', github.event.number) || '' }} | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [ develop ] | ||
push: | ||
branches: [ develop ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
pre-commit: | ||
name: pre-commit | ||
uses: ./.github/workflows/step_pre-commit.yaml | ||
|
||
tests: | ||
name: test | ||
needs: [ pre-commit ] | ||
uses: ./.github/workflows/step_test.yaml | ||
with: | ||
mask-experimental: ${{ github.event_name == 'push' }} | ||
|
||
tests-makefile: | ||
name: test Makefile | ||
needs: [ pre-commit ] | ||
uses: ./.github/workflows/step_test-makefile.yaml | ||
|
||
docs: | ||
name: 📘 docs | ||
needs: [ pre-commit ] | ||
uses: ./.github/workflows/step_docs.yaml | ||
|
||
pass: | ||
name: ✅ Pass | ||
needs: [ pre-commit, tests, tests-makefile, docs ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check all CI jobs | ||
uses: re-actors/alls-green@release/v1 | ||
with: | ||
jobs: ${{ toJSON(needs) }} | ||
if: always() |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: 📘 test-docs | ||
|
||
on: | ||
workflow_call: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
docs: | ||
name: Validate mkdocs links | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
# use the latest stable version | ||
python-version: "3.x" | ||
cache: "pip" | ||
# `pybtex` uses `pkg_resources` which is deprecated. Use workaround until upstream `mkdocs_bibtext`decides on a solution | ||
# https://github.com/shyamd/mkdocs-bibtex/issues/228 | ||
# https://bitbucket.org/pybtex-devs/pybtex/issues/169/replace-pkg_resources-with | ||
- run: pip install -r docs/requirements.txt setuptools | ||
- run: mkdocs build --strict | ||
working-directory: ./docs | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ENABLE_MKDOCS_GIT_COMMITTERS: False |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: pre-commit | ||
|
||
on: | ||
workflow_call: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
pre-commit: | ||
name: Check pre-commit | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
- uses: pre-commit/[email protected] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,11 @@ | ||
name: CI | ||
name: test Makefile | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- develop | ||
workflow_call: | ||
|
||
permissions: | ||
contents: read | ||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- uses: pre-commit/[email protected] | ||
|
||
build: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
|
@@ -66,23 +58,3 @@ jobs: | |
path: | | ||
test-suite/tests/test*/test.err* | ||
test-suite/tests/test*/test.out* | ||
|
||
docs: | ||
name: Validate mkdocs links | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
# use the latest stable version | ||
python-version: "3.x" | ||
cache: "pip" | ||
# `pybtex` uses `pkg_resources` which is deprecated. Use workaround until upstream `mkdocs_bibtext`decides on a solution | ||
# https://github.com/shyamd/mkdocs-bibtex/issues/228 | ||
# https://bitbucket.org/pybtex-devs/pybtex/issues/169/replace-pkg_resources-with | ||
- run: pip install -r docs/requirements.txt setuptools | ||
- run: mkdocs build --strict | ||
working-directory: ./docs | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ENABLE_MKDOCS_GIT_COMMITTERS: False |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: test | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
mask-experimental: | ||
type: boolean | ||
default: true | ||
description: Always report experimental test as successful | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
tests: | ||
name: > | ||
🖥️ ${{ matrix.os || 'Fedora' }} | ||
${{ !matrix.os && format('🛠️ {0}', matrix.toolchain) || '' }} | ||
${{ matrix.mpi && format('🖧 {0}', matrix.mpi) || '' }} | ||
${{ matrix.experimental && '[🧪 Experimental]' || '' }} | ||
runs-on: ${{ matrix.os || 'ubuntu-latest' }} | ||
container: ${{ !matrix.os && 'ghcr.io/lecrisut/dev-env:main' || '' }} | ||
continue-on-error: ${{ matrix.experimental || false }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
toolchain: [ gcc, llvm, intel ] | ||
mpi: [false, openmpi, mpich, intel] | ||
include: | ||
# flang is missing features in 16.0.6 | ||
- toolchain: llvm | ||
experimental: true | ||
steps: | ||
- name: Install missing packages | ||
run: dnf install -y bzip2 python-unversioned-command which | ||
- name: Load mpi module ${{ matrix.mpi || '' }} | ||
run: | | ||
# Get interactive profile to be able to load modules | ||
source /etc/profile | ||
|
||
# Save the current environment since we only want the added difference | ||
printenv > orig_env | ||
|
||
# Load the relevant mpi module | ||
module load mpi/${{ matrix.mpi }} | ||
printenv > module_env | ||
|
||
diff orig_env module_env | sed -n 's/> //p' >> $GITHUB_ENV | ||
|
||
# Set MPI flag on | ||
echo "WITH_MPI=ON" >> $GITHUB_ENV | ||
if: matrix.mpi | ||
- name: Enable msvc toolchain on windows | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
if: contains(matrix.os, 'windows') | ||
- name: Activate Intel compilers | ||
# Not elegant, it will propagate all environment variable. | ||
# Intel does not provide a way to output the environment variables to a file | ||
# Note: PATH needs to be exported to GITHUB_PATH otherwise it can be overwritten | ||
run: | | ||
source /opt/intel/oneapi/setvars.sh | ||
printenv >> $GITHUB_ENV | ||
echo $PATH >> $GITHUB_PATH | ||
if: matrix.toolchain == 'intel' | ||
- uses: actions/checkout@v3 | ||
- uses: lukka/get-cmake@latest | ||
- name: Run CMake workflow ${{ matrix.toolchain }}-ci | ||
uses: lukka/[email protected] | ||
with: | ||
workflowPreset: "${{ matrix.toolchain }}-ci" | ||
continue-on-error: ${{ matrix.experimental && inputs.mask-experimental}} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,31 @@ | ||
wannier90.x | ||
postw90.x | ||
.DS_Store | ||
make.inc | ||
w90chk2chk.x | ||
w90spn2spn.x | ||
libwannier.a | ||
libwan2.a | ||
libwannier.so | ||
libwannier.dylib | ||
*~ | ||
*.x.dSYM | ||
### Build system | ||
cmake-build-*/ | ||
build/ | ||
CMakeLists.txt.user | ||
CMakeCache.txt | ||
CMakeFiles | ||
CMakeScripts | ||
Testing | ||
Makefile | ||
cmake_install.cmake | ||
install_manifest.txt | ||
compile_commands.json | ||
CTestTestfile.cmake | ||
_deps | ||
|
||
|
||
### Other | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
### IDE files | ||
.vscode | ||
/.idea | ||
|
||
### Project files | ||
/CMakeUserPresets.json |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no
macos
andwindows
here, because we need to discuss what compilers to use there and where to get them