-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
232 additions
and
186 deletions.
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,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 : |
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,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 : |
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,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 : |
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
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
Oops, something went wrong.