Skip to content

Commit

Permalink
Merge pull request #1 from UCBoulder/maint/enable-github-actions
Browse files Browse the repository at this point in the history
Maint/enable GitHub actions
  • Loading branch information
NateAM authored Jan 24, 2024
2 parents ba6bf8f + b31077e commit 27e4e60
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 7 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/github-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Tests on pull request
run-name: ${{ github.actor }} is testing a pull request
on:
pull_request:
types:
- opened
- edited
- synchronize
branches:
- dev
- main
jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
fail-fast: false
matrix:
os: [ubuntu-latest]
build_type: [Release]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: MiniConda setup
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
channels: conda-forge,defaults
channel-priority: true
auto-activate-base: false
activate-environment: "test-environment"
- name: check solution
run: |
conda env export
- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
echo "environment-file=${{ github.workspace }}/reduced_environment.txt" >> "$GITHUB_OUTPUT"
echo "moose-dir=${{ github.workspace }}/moose-dir" >> "$GITHUB_OUTPUT"
- name: Conda environment
shell: bash -el {0}
run: |
mamba install --file ${{ steps.strings.outputs.environment-file }} --yes --channel conda-forge
- name: Build
shell: bash -el {0}
run: |
mkdir build
cd build
cmake .. -DTARDIGRADE_MICROMORPHIC_ELEMENT_BUILD_PYTHON_BINDINGS=OFF
make
- name: Test
shell: bash -el {0}
# working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: |
conda activate test-environment
cd build
ctest
22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Reference: https://github.com/softprops/action-gh-release
name: Release on new tags

on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
lfs: 'true'
fetch-depth: 0
- name: Release
uses: softprops/action-gh-release@v1
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ include(FetchContent)
set(upstream_packages "tardigrade_error_tools" "tardigrade_vector_tools" "tardigrade_micromorphic_tools" ${USER_SUBROUTINES})
foreach(package ${upstream_packages})
string(TOUPPER "${package}" package_upper)
set(${package_upper}_BUILD_PYTHON_BINDINGS ${TARDIGRADE_MICROMORPHIC_ELEMENT_BUILD_PYTHON_BINDINGS})
set(${package_upper}_BUILD_PYTHON_BINDINGS ${TARDIGRADE_MICROMORPHIC_ELEMENT_BUILD_PYTHON_BINDINGS} CACHE INTERNAL "Setting ${package}'s python binding flag to the global value")
find_package(${package} ${upstream_required} CONFIG)
if(${package}_FOUND)
message(STATUS "Found ${package}: ${${package}_DIR}")
Expand All @@ -106,7 +106,7 @@ foreach(package ${upstream_packages})
# TODO: Decide how to handle main/dev build differences. bash env variables for GIT TAG?
FetchContent_Declare(
${package}
GIT_REPOSITORY ssh://git@re-git.lanl.gov:10022/aea/material-models/${package}.git
GIT_REPOSITORY http://github.com/UCBoulder/${package}.git
GIT_TAG origin/dev
)
FetchContent_MakeAvailable(${package})
Expand Down
8 changes: 4 additions & 4 deletions docs/sphinx/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
.. _tardigrade_micromorphic_element_source:

tardigrade_micromorphic_element.cpp
============
===================================

.. doxygenfile:: tardigrade_micromorphic_element.cpp

tardigrade_micromorphic_element.h
==========
=================================

.. doxygenfile:: tardigrade_micromorphic_element.h

Expand All @@ -28,11 +28,11 @@ Abaqus interface
****************

tardigrade_micromorphic_element_umat.cpp
=================
========================================

.. doxygenfile:: tardigrade_micromorphic_element_umat.cpp

tardigrade_micromorphic_element_umat.h
===============
======================================

.. doxygenfile:: tardigrade_micromorphic_element_umat.h
14 changes: 13 additions & 1 deletion docs/sphinx/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,21 @@ Changelog
#########

******************
1.4.2 (unreleased)
1.4.3 (unreleased)
******************

Internal Changes
================
- Enabled github actions (:pull:`1`). By `Nathan Miller`_.

******************
1.4.2 (2023-09-29)
******************

Release
=======
- Released version 1.4.2

Internal Changes
================
- Removing tardigrade_vector_tools from balance_equations.h. It isn't needed (:merge:`18`). By `Nathan Miller`_.
Expand Down
11 changes: 11 additions & 0 deletions reduced_environment.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
boost>=1.59
breathe>=4.30.0
cmake>=3.18
compilers
doxygen>=1.9
eigen>=3.3.7
python
setuptools_scm>=6.2
sphinx>=3.0.4
sphinx_rtd_theme>=0.4.3
sphinxcontrib-bibtex

0 comments on commit 27e4e60

Please sign in to comment.