Skip to content

Commit

Permalink
Merge branch 'develop' into pcu-object
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobmerson authored Apr 29, 2024
2 parents 2f23fb1 + b32204c commit 03eb93d
Show file tree
Hide file tree
Showing 19 changed files with 2,624 additions and 50 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/comment_on_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: comment_on_pr

# read-write repo token
# access to secrets
on:
workflow_run:
workflows: ["simmetrx_enabled_pr_comment_trigger_self_hosted"]
types:
- completed

jobs:
upload:
permissions:
actions: read
issues: write
pull-requests: write
runs-on: ubuntu-latest
if: |
github.event.workflow_run.conclusion == 'success' ||
github.event.workflow_run.conclusion == 'failure'
steps:
- name: 'Download artifact'
uses: actions/download-artifact@v4
with:
name: pr
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ github.token }}

- name: 'Comment on PR'
uses: actions/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
var fs = require('fs');
var issue_number = Number(fs.readFileSync('./issueNumber'));
var message = String(fs.readFileSync('./message'));
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: message
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: simmetrx_enabled_pr_comment_trigger_self_hosted

# Controls when the workflow will run
on:
issue_comment:
types: [created]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build_and_test:
permissions:
contents: read
# The type of runner that the job will run on
runs-on: self-hosted

if: |
github.event.issue.pull_request &&
contains(github.event.comment.body, '/runtests') &&
(github.event.comment.user.login == 'cwsmith')
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.issue.number }}/head
submodules: recursive
path: 'core_${{ github.event.issue.number }}'

- name: build
id: build
shell: bash
run: |
set +e #avoid exiting when lua modules return non-zero on 'warning' messages
module use /opt/scorec/spack/rhel9/v0201_4/lmod/linux-rhel9-x86_64/Core/
module load gcc/12.3.0-iil3lno
module load mpich/4.1.1-xpoyz4t
module load simmetrix-simmodsuite/2024.0-240119dev-7abimo4
module load zoltan/3.83-hap4ggo
module load cmake/3.26.3-2duxfcd
set -e
cmake -S core_${{ github.event.issue.number }} \
-B ${RUNNER_TEMP}/build \
-DCMAKE_CXX_COMPILER=mpicxx \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DENABLE_ZOLTAN=ON \
-DENABLE_SIMMETRIX=ON \
-DSIM_MPI=mpich4.1.1 \
-DSIM_PARASOLID=ON \
-DSIM_ACIS=ON \
-DSKIP_SIMMETRIX_VERSION_CHECK=ON \
-DMESHES=${{github.workspace}}/core_${{ github.event.issue.number }}/pumi-meshes \
-DIS_TESTING=ON \
-DSCOREC_CXX_WARNINGS=ON \
-DCMAKE_BUILD_TYPE=Release
cmake --build ${RUNNER_TEMP}/build -j 4
ctest --test-dir ${RUNNER_TEMP}/build --output-on-failure
- name: Save Result Link
if: ${{ !cancelled() }} #prepare report unless the job was cancelled
run: |
mkdir -p ./pr
echo "${{ github.event.issue.number }}" > ./pr/issueNumber
echo -n "Test Result: ${{ steps.build.outcome }} " > ./pr/message
echo "[(details)](https://github.com/${{github.repository}}/actions/runs/${{ github.run_id }})" >> ./pr/message
- name: Upload result
if: ${{ !cancelled() }} #upload unless the job was cancelled
uses: actions/upload-artifact@v4
with:
name: pr
path: pr/
19 changes: 9 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,15 @@ add_custom_target(doc
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile_internal.in
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile_internal @ONLY
)
add_custom_target(docInternal
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile_internal
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating Internal API documentation with Doxygen" VERBATIM
)
endif()

set(Trilinos_PREFIX "" CACHE STRING "Trilinos installation directory")
Expand Down Expand Up @@ -190,16 +199,6 @@ else()
endif()
scorec_export_library(core)

#check for mallinfo2
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
include(CheckCXXSymbolExists)
check_cxx_symbol_exists(mallinfo2 "malloc.h" PUMI_HAS_MALLINFO2)
if(PUMI_HAS_MALLINFO2)
target_compile_definitions(core INTERFACE -DPUMI_HAS_MALLINFO2)
target_compile_definitions(pcu PRIVATE -DPUMI_HAS_MALLINFO2)
endif()
endif()

if(BUILD_EXES)
add_subdirectory(test)
add_subdirectory(capstone_clis)
Expand Down
Loading

0 comments on commit 03eb93d

Please sign in to comment.