Skip to content

Commit

Permalink
Update build_plugin_template.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmrichard authored Nov 8, 2024
1 parent 61e649b commit 95aaebd
Showing 1 changed file with 51 additions and 51 deletions.
102 changes: 51 additions & 51 deletions .github/workflows/build_plugin_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,60 +13,60 @@ on:
secrets:
CONTAINER_REPO_TOKEN:
required: true
jobs:
Test-Cookiecutter:
runs-on: ubuntu-latest
container:
image: ghcr.io/nwchemex/nwx_buildenv:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.CONTAINER_REPO_TOKEN }}
steps:
- uses: actions/checkout@v2

Test-Cookiecutter:
runs-on: ubuntu-latest
container:
image: ghcr.io/nwchemex/nwx_buildenv:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.CONTAINER_REPO_TOKEN }}
steps:
- uses: actions/checkout@v2

- name: Install cookecutter
run: |
pip install cookiecutter
shell: bash
- name: Install cookecutter
run: |
pip install cookiecutter
shell: bash

- name: Install Zip
run: |
apt-get update && apt-get install -y zip
shell: bash
- name: Install Zip
run: |
apt-get update && apt-get install -y zip
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: 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: Write configure.yaml
run: |
echo "default_context:" > configure.yaml
echo " project_name: ${PROJECT_NAME}" >> configure.yaml
shell: bash
env:
PROJECT_NAME: ${{ inputs.project_name }}
PROJECT_SLUG: ${{ inputs.project_slug }}
- name: Write configure.yaml
run: |
echo "default_context:" > configure.yaml
echo " project_name: ${PROJECT_NAME}" >> configure.yaml
shell: bash
env:
PROJECT_NAME: ${{ inputs.project_name }}
PROJECT_SLUG: ${{ inputs.project_slug }}

- name: Test current state
run: |
# Generate the template
cookiecutter ./cookiecutter.zip --no-input --config-file configure.yaml
cd ${PROJECT_SLUG}
- name: Test current state
run: |
# Generate the template
cookiecutter ./cookiecutter.zip --no-input --config-file configure.yaml
cd ${PROJECT_SLUG}
# 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
env:
PROJECT_SLUG: ${{ inputs.project_slug }}
# 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
env:
PROJECT_SLUG: ${{ inputs.project_slug }}

0 comments on commit 95aaebd

Please sign in to comment.