Skip to content

Commit

Permalink
Merge branch 'release-2.1.0-rc10'
Browse files Browse the repository at this point in the history
  • Loading branch information
alazzaro committed Mar 10, 2020
2 parents b6a1916 + 4d1af1a commit ec43e67
Show file tree
Hide file tree
Showing 10 changed files with 232 additions and 186 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/doc-generation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
name: Generating documentation
on:
push:
branches:
- 'develop'
tags:
- 'v*'

jobs:
build-and-deploy:
runs-on: ubuntu-latest
container:
image: dbcsr/build-env-ubuntu-19.10:latest

steps:
- uses: actions/checkout@v2

- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Configure
run: |
mkdir -p build
cd build
cmake -G Ninja \
-DUSE_MPI=ON \
-DUSE_OPENMP=ON \
-DUSE_SMM=libxsmm \
-DMPI_EXECUTABLE_SUFFIX=.mpich \
..
- name: Build
run: |
cmake --build build -- doc
touch build/doc/.nojekyll
- name: Setup SSH agent 🔑
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_DEPLOY_KEY }}

# workaround for https://github.com/webfactory/ssh-agent/issues/20
- name: Add Github host keys to the SSH configuration inside the container
run: |
mkdir -p /root/.ssh
ssh-keyscan -t rsa github.com >> /root/.ssh/known_hosts
- name: Deploy Development Documentation
if: github.repository == 'cp2k/dbcsr' && github.ref == 'refs/heads/develop'
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
SSH: true
BRANCH: gh-pages
FOLDER: build/doc
TARGET_FOLDER: develop
CLEAN: true
CLEAN_EXCLUDE: '["releases"]'

- name: Get the release version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
shell: bash

- name: Deploy Release Documentation
if: github.repository == 'cp2k/dbcsr' && contains(github.ref, 'tags')
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
SSH: true
ACCESS_TOKEN: ${{ secrets.GHPAGES_ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: build/doc
TARGET_FOLDER: 'releases/v${{ steps.get_version.outputs.VERSION }}'

# vim: set ts=2 sw=2 tw=0 :
64 changes: 64 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
name: Create release
on:
push:
tags:
- 'v*'

jobs:
build-and-upload:
runs-on: ubuntu-latest
container:
image: dbcsr/build-env-ubuntu-19.10:latest

steps:
- uses: actions/checkout@v2

- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Configure
run: |
mkdir -p build
cd build
cmake -G Ninja \
-DUSE_MPI=ON \
-DUSE_OPENMP=ON \
-DUSE_SMM=libxsmm \
-DMPI_EXECUTABLE_SUFFIX=.mpich \
..
- name: Build Release Asset
run: cmake --build build -- dist

- name: Get the release version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
shell: bash

- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
prerelease: true

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/dist/dbcsr-${{ steps.get_version.outputs.VERSION }}.tar.gz
asset_name: dbcsr-${{ steps.get_version.outputs.VERSION }}.tar.gz
asset_content_type: application/gzip

# vim: set ts=2 sw=2 tw=0 :
78 changes: 78 additions & 0 deletions .github/workflows/testing-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
name: Testing on Linux
on:
push:
branches:
- 'develop'
pull_request:

jobs:
pre-commit:
runs-on: ubuntu-latest
container:
image: dbcsr/build-env-ubuntu-19.10:latest
steps:
- uses: actions/checkout@v2
- name: Run pre-commit
run:
pre-commit run --all-files || ( git status --short ; git diff ; exit 1 )

build-and-test:
runs-on: ubuntu-latest
container:
image: dbcsr/build-env-ubuntu-19.10:latest

strategy:
matrix:
use_mpi: [MPI=ON, MPI=OFF]
use_openmp: [OPENMP=ON, OPENMP=OFF]
use_smm: [SMM=blas, SMM=libxsmm]
mpi_suffix: [openmpi, mpich]
exclude:
- use_mpi: MPI=OFF
mpi_suffix: mpich

steps:
- uses: actions/checkout@v2

- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Configure
run: |
mkdir -p build
cd build
cmake -G Ninja \
-DCMAKE_BUILD_TYPE=Coverage \
-DUSE_${{ matrix.use_mpi }} \
-DUSE_${{ matrix.use_openmp }} \
-DUSE_${{ matrix.use_smm }} \
-DMPI_EXECUTABLE_SUFFIX=.${{ matrix.mpi_suffix }} \
-DMPIEXEC_PREFLAGS="$([ "${{ matrix.mpi_suffix }}" = "openmpi" ] && echo "-mca btl ^openib --allow-run-as-root")" \
..
- name: Build
run: cmake --build build -- --verbose

- name: Test
run: |
cd build
ctest --output-on-failure
- name: Generate coverage info
run: |
cmake --build build -- cov-info
- name: Upload coverage info to codecov
if: github.repository == 'cp2k/dbcsr'
uses: codecov/codecov-action@v1
with:
file: build/coverage.info
yml: .codecov.yml
fail_ci_if_error: true

# vim: set ts=2 sw=2 tw=0 :
17 changes: 5 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
default_language_version:
python: python3.6
python: python3

exclude: '^tools/(prettify/fprettify|build_utils/fypp)'
fail_fast: false
Expand All @@ -8,29 +8,22 @@ repos:
rev: stable
hooks:
- id: black
language_version: "python3"
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
rev: v2.5.0
hooks:
- id: check-ast
stages: [manual]
language_version: "python2"
exclude: '^src/acc/libsmm_acc/(notebooks|predict|tune)/'
- id: flake8
language_version: "python3"
- id: check-ast
stages: [manual]
language_version: "python3"
- id: check-yaml
- repo: local
hooks:
- id: check-header
name: check file headers
entry: ./.pre-commit/check_header.py --verbose
language: script
types: [text]
exclude: '^tools/'
exclude: '^(tools|.cp2k)/'
- id: check-doxygen-tags
name: no doxygen tags present
entry: '^!>'
entry: '^\s*!>'
language: pygrep
types: [text]
4 changes: 2 additions & 2 deletions .pre-commit/check_header.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
####################################################################################################
# Copyright (C) by the DBCSR developers group - All rights reserved #
Expand All @@ -17,7 +17,7 @@
from contextlib import contextmanager

TYPES = {
"c_cpp": [".c", "h", ".cc", ".hh", ".cxx", ".hpp", ".cu"],
"c_cpp": [".c", "h", ".cc", ".hh", ".cxx", ".cpp", ".hpp", ".cu"],
"python": [".py"],
"fortran": [".F", ".f", ".f90", ".f03"],
}
Expand Down
Loading

0 comments on commit ec43e67

Please sign in to comment.