Skip to content

Template

Template #2

Workflow file for this run

# Copyright 2023 NWChemEx-Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: Pull Request Workflow
on:
pull_request:
branches:
- master
jobs:
Test-Cookiecutter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install cookecutter
run: |
pip install cookiecutter
shell: bash
- name: Zip current state
run: |
# From the Cookiecutter docs
(SOURCE_DIR=$(basename $PWD) ZIP=cookiecutter.zip &&
pushd .. &&
zip -r $ZIP $SOURCE_DIR --exclude $SOURCE_DIR/$ZIP --quiet &&
mv $ZIP $SOURCE_DIR/$ZIP &&
popd &&
echo "Cookiecutter full path: $PWD/$ZIP")
shell: bash
- name: Test current state
run: |
# Generate the template
cookiecutter ./cookiecutter.zip --no-input
cd new_plugin
# Configure, build, and test
cmake -Bbuild -H. \
-DCMAKE_TOOLCHAIN_FILE=./default_toolchain.cmake \
-DCMAKE_INSTALL_PREFIX=./install
cmake --build build --parallel
cd build
ctest -VV
shell: bash