From 90461190376489c88013d4fcdf7121e0e1a50756 Mon Sep 17 00:00:00 2001 From: Alexander Blair Date: Tue, 20 Jan 2026 22:07:40 +0000 Subject: [PATCH 1/7] Remove unused directories --- include/base/CanaryApp.h | 24 ----------- scripts/install-format-hook.sh | 26 ------------ src/base/CanaryApp.C | 51 ---------------------- src/main.C | 18 -------- test/include/base/CanaryTestApp.h | 24 ----------- test/src/base/CanaryTestApp.C | 63 ---------------------------- unit/Makefile | 70 ------------------------------- unit/include/place_holder | 0 unit/run_tests | 18 -------- unit/src/SampleTest.C | 32 -------------- unit/src/main.C | 33 --------------- 11 files changed, 359 deletions(-) delete mode 100644 include/base/CanaryApp.h delete mode 100755 scripts/install-format-hook.sh delete mode 100644 src/base/CanaryApp.C delete mode 100644 src/main.C delete mode 100644 test/include/base/CanaryTestApp.h delete mode 100644 test/src/base/CanaryTestApp.C delete mode 100644 unit/Makefile delete mode 100644 unit/include/place_holder delete mode 100755 unit/run_tests delete mode 100644 unit/src/SampleTest.C delete mode 100644 unit/src/main.C diff --git a/include/base/CanaryApp.h b/include/base/CanaryApp.h deleted file mode 100644 index 1a45f77..0000000 --- a/include/base/CanaryApp.h +++ /dev/null @@ -1,24 +0,0 @@ -//* This file is part of the MOOSE framework -//* https://mooseframework.inl.gov -//* -//* All rights reserved, see COPYRIGHT for full restrictions -//* https://github.com/idaholab/moose/blob/master/COPYRIGHT -//* -//* Licensed under LGPL 2.1, please see LICENSE for details -//* https://www.gnu.org/licenses/lgpl-2.1.html - -#pragma once - -#include "MooseApp.h" - -class CanaryApp : public MooseApp -{ -public: - static InputParameters validParams(); - - CanaryApp(const InputParameters & parameters); - virtual ~CanaryApp(); - - static void registerApps(); - static void registerAll(Factory & f, ActionFactory & af, Syntax & s); -}; diff --git a/scripts/install-format-hook.sh b/scripts/install-format-hook.sh deleted file mode 100755 index 44a2037..0000000 --- a/scripts/install-format-hook.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/../" -hookfile="$REPO_DIR/.git/hooks/pre-commit" - -if [[ -f $hookfile ]]; then - echo "'$hookfile' already exists - aborting" 1>&2 - exit 1 -fi - -echo '#!/bin/bash -patch=$(git clang-format --diff -- $(git diff --staged --name-only -- src include tests unit)) -if [[ "$patch" =~ "no modified files to format" || "$patch" =~ "clang-format did not modify any files" ]]; then - echo "" > /dev/null -else - echo "" - echo "Your code is not properly formatted." >&2 - echo "Run 'git clang-format' to resolve the following issues:" >&2 - echo "" - echo "$patch" - exit 1 -fi -' > $hookfile - -chmod a+x $hookfile - diff --git a/src/base/CanaryApp.C b/src/base/CanaryApp.C deleted file mode 100644 index afd71bc..0000000 --- a/src/base/CanaryApp.C +++ /dev/null @@ -1,51 +0,0 @@ -#include "CanaryApp.h" -#include "Moose.h" -#include "AppFactory.h" -#include "ModulesApp.h" -#include "MooseSyntax.h" - -InputParameters -CanaryApp::validParams() -{ - InputParameters params = MooseApp::validParams(); - params.set("use_legacy_material_output") = false; - params.set("use_legacy_initial_residual_evaluation_behavior") = false; - return params; -} - -CanaryApp::CanaryApp(const InputParameters & parameters) : MooseApp(parameters) -{ - CanaryApp::registerAll(_factory, _action_factory, _syntax); -} - -CanaryApp::~CanaryApp() {} - -void -CanaryApp::registerAll(Factory & f, ActionFactory & af, Syntax & syntax) -{ - ModulesApp::registerAllObjects(f, af, syntax); - Registry::registerObjectsTo(f, {"CanaryApp"}); - Registry::registerActionsTo(af, {"CanaryApp"}); - - /* register custom execute flags, action syntax, etc. here */ -} - -void -CanaryApp::registerApps() -{ - registerApp(CanaryApp); -} - -/*************************************************************************************************** - *********************** Dynamic Library Entry Points - DO NOT MODIFY ****************************** - **************************************************************************************************/ -extern "C" void -CanaryApp__registerAll(Factory & f, ActionFactory & af, Syntax & s) -{ - CanaryApp::registerAll(f, af, s); -} -extern "C" void -CanaryApp__registerApps() -{ - CanaryApp::registerApps(); -} diff --git a/src/main.C b/src/main.C deleted file mode 100644 index 25ce11e..0000000 --- a/src/main.C +++ /dev/null @@ -1,18 +0,0 @@ -//* This file is part of the MOOSE framework -//* https://mooseframework.inl.gov -//* -//* All rights reserved, see COPYRIGHT for full restrictions -//* https://github.com/idaholab/moose/blob/master/COPYRIGHT -//* -//* Licensed under LGPL 2.1, please see LICENSE for details -//* https://www.gnu.org/licenses/lgpl-2.1.html - -#include "CanaryTestApp.h" -#include "MooseMain.h" - -// Begin the main program. -int -main(int argc, char * argv[]) -{ - return Moose::main(argc, argv); -} diff --git a/test/include/base/CanaryTestApp.h b/test/include/base/CanaryTestApp.h deleted file mode 100644 index eb7a31f..0000000 --- a/test/include/base/CanaryTestApp.h +++ /dev/null @@ -1,24 +0,0 @@ -//* This file is part of the MOOSE framework -//* https://mooseframework.inl.gov -//* -//* All rights reserved, see COPYRIGHT for full restrictions -//* https://github.com/idaholab/moose/blob/master/COPYRIGHT -//* -//* Licensed under LGPL 2.1, please see LICENSE for details -//* https://www.gnu.org/licenses/lgpl-2.1.html - -#pragma once - -#include "MooseApp.h" - -class CanaryTestApp : public MooseApp -{ -public: - static InputParameters validParams(); - - CanaryTestApp(const InputParameters & parameters); - virtual ~CanaryTestApp(); - - static void registerApps(); - static void registerAll(Factory & f, ActionFactory & af, Syntax & s, bool use_test_objs = false); -}; diff --git a/test/src/base/CanaryTestApp.C b/test/src/base/CanaryTestApp.C deleted file mode 100644 index e624748..0000000 --- a/test/src/base/CanaryTestApp.C +++ /dev/null @@ -1,63 +0,0 @@ -//* This file is part of the MOOSE framework -//* https://mooseframework.inl.gov -//* -//* All rights reserved, see COPYRIGHT for full restrictions -//* https://github.com/idaholab/moose/blob/master/COPYRIGHT -//* -//* Licensed under LGPL 2.1, please see LICENSE for details -//* https://www.gnu.org/licenses/lgpl-2.1.html -#include "CanaryTestApp.h" -#include "CanaryApp.h" -#include "Moose.h" -#include "AppFactory.h" -#include "MooseSyntax.h" - -InputParameters -CanaryTestApp::validParams() -{ - InputParameters params = CanaryApp::validParams(); - params.set("use_legacy_material_output") = false; - params.set("use_legacy_initial_residual_evaluation_behavior") = false; - return params; -} - -CanaryTestApp::CanaryTestApp(const InputParameters & parameters) : MooseApp(parameters) -{ - CanaryTestApp::registerAll( - _factory, _action_factory, _syntax, getParam("allow_test_objects")); -} - -CanaryTestApp::~CanaryTestApp() {} - -void -CanaryTestApp::registerAll(Factory & f, ActionFactory & af, Syntax & s, bool use_test_objs) -{ - CanaryApp::registerAll(f, af, s); - if (use_test_objs) - { - Registry::registerObjectsTo(f, {"CanaryTestApp"}); - Registry::registerActionsTo(af, {"CanaryTestApp"}); - } -} - -void -CanaryTestApp::registerApps() -{ - registerApp(CanaryApp); - registerApp(CanaryTestApp); -} - -/*************************************************************************************************** - *********************** Dynamic Library Entry Points - DO NOT MODIFY ****************************** - **************************************************************************************************/ -// External entry point for dynamic application loading -extern "C" void -CanaryTestApp__registerAll(Factory & f, ActionFactory & af, Syntax & s) -{ - CanaryTestApp::registerAll(f, af, s); -} -extern "C" void -CanaryTestApp__registerApps() -{ - CanaryTestApp::registerApps(); -} diff --git a/unit/Makefile b/unit/Makefile deleted file mode 100644 index 88d0141..0000000 --- a/unit/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -############################################################################### -################### MOOSE Application Standard Makefile ####################### -############################################################################### -# -# Required Environment variables (one of the following) -# PACKAGES_DIR - Location of the MOOSE redistributable package -# -# Optional Environment variables -# MOOSE_DIR - Root directory of the MOOSE project -# FRAMEWORK_DIR - Location of the MOOSE framework -# -############################################################################### -# Use the MOOSE submodule if it exists and MOOSE_DIR is not set -MOOSE_SUBMODULE := $(CURDIR)/../moose -ifneq ($(wildcard $(MOOSE_SUBMODULE)/framework/Makefile),) - MOOSE_DIR ?= $(MOOSE_SUBMODULE) -else - MOOSE_DIR ?= $(shell dirname `pwd`)/../moose -endif -FRAMEWORK_DIR ?= $(MOOSE_DIR)/framework -############################################################################### - -# framework -include $(FRAMEWORK_DIR)/build.mk -include $(FRAMEWORK_DIR)/moose.mk - -################################## MODULES #################################### -# set desired physics modules equal to 'yes' to enable them -CHEMICAL_REACTIONS := no -CONTACT := no -FLUID_PROPERTIES := no -FSI := no -HEAT_TRANSFER := no -MISC := no -NAVIER_STOKES := no -PHASE_FIELD := no -RDG := no -RICHARDS := no -STOCHASTIC_TOOLS := no -TENSOR_MECHANICS := no -XFEM := no -POROUS_FLOW := no -LEVEL_SET := no -include $(MOOSE_DIR)/modules/modules.mk -############################################################################### - -# Extra stuff for GTEST -ADDITIONAL_INCLUDES := -I$(FRAMEWORK_DIR)/contrib/gtest -ADDITIONAL_LIBS := $(FRAMEWORK_DIR)/contrib/gtest/libgtest.la - -# dep apps -CURRENT_DIR := $(shell pwd) -APPLICATION_DIR := $(CURRENT_DIR)/.. -APPLICATION_NAME := canary -include $(FRAMEWORK_DIR)/app.mk - -APPLICATION_DIR := $(CURRENT_DIR) -APPLICATION_NAME := canary-unit -BUILD_EXEC := yes - -DEP_APPS ?= $(shell $(FRAMEWORK_DIR)/scripts/find_dep_apps.py $(APPLICATION_NAME)) -include $(FRAMEWORK_DIR)/app.mk - -# Find all the Canary unit test source files and include their dependencies. -canary_unit_srcfiles := $(shell find $(CURRENT_DIR)/src -name "*.C") -canary_unit_deps := $(patsubst %.C, %.$(obj-suffix).d, $(canary_unit_srcfiles)) --include $(canary_unit_deps) - -############################################################################### -# Additional special case targets should be added here diff --git a/unit/include/place_holder b/unit/include/place_holder deleted file mode 100644 index e69de29..0000000 diff --git a/unit/run_tests b/unit/run_tests deleted file mode 100755 index 1611a44..0000000 --- a/unit/run_tests +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -APPLICATION_NAME=canary -# If $METHOD is not set, use opt -if [ -z $METHOD ]; then - export METHOD=opt -fi - -if [ -e ./unit/$APPLICATION_NAME-unit-$METHOD ] -then - ./unit/$APPLICATION_NAME-unit-$METHOD -elif [ -e ./$APPLICATION_NAME-unit-$METHOD ] -then - ./$APPLICATION_NAME-unit-$METHOD -else - echo "Executable missing!" - exit 1 -fi diff --git a/unit/src/SampleTest.C b/unit/src/SampleTest.C deleted file mode 100644 index 82701d3..0000000 --- a/unit/src/SampleTest.C +++ /dev/null @@ -1,32 +0,0 @@ -//* This file is part of the MOOSE framework -//* https://mooseframework.inl.gov -//* -//* All rights reserved, see COPYRIGHT for full restrictions -//* https://github.com/idaholab/moose/blob/master/COPYRIGHT -//* -//* Licensed under LGPL 2.1, please see LICENSE for details -//* https://www.gnu.org/licenses/lgpl-2.1.html - -#include "gtest/gtest.h" - -TEST(MySampleTests, descriptiveTestName) -{ - // compare equality - EXPECT_EQ(2, 1 + 1); - EXPECT_DOUBLE_EQ(2 * 3.5, 1.0 * 8 - 1); - - // compare equality and immediately terminate this test if it fails - // ASSERT_EQ(2, 1); - - // this won't run if you uncomment the above test because above assert will fail - ASSERT_NO_THROW(1 + 1); - - // for a complete list of assertions and for more unit testing documentation see: - // https://github.com/google/googletest/blob/master/googletest/docs/Primer.md -} - -TEST(MySampleTests, anotherTest) -{ - EXPECT_LE(1, 2); - // ... -} diff --git a/unit/src/main.C b/unit/src/main.C deleted file mode 100644 index 7b425df..0000000 --- a/unit/src/main.C +++ /dev/null @@ -1,33 +0,0 @@ -//* This file is part of the MOOSE framework -//* https://mooseframework.inl.gov -//* -//* All rights reserved, see COPYRIGHT for full restrictions -//* https://github.com/idaholab/moose/blob/master/COPYRIGHT -//* -//* Licensed under LGPL 2.1, please see LICENSE for details -//* https://www.gnu.org/licenses/lgpl-2.1.html - -#include "CanaryApp.h" -#include "gtest/gtest.h" - -// Moose includes -#include "Moose.h" -#include "MooseInit.h" -#include "AppFactory.h" - -#include -#include - -GTEST_API_ int -main(int argc, char ** argv) -{ - // gtest removes (only) its args from argc and argv - so this must be before moose init - testing::InitGoogleTest(&argc, argv); - - MooseInit init(argc, argv); - registerApp(CanaryApp); - Moose::_throw_on_error = true; - Moose::_throw_on_warning = true; - - return RUN_ALL_TESTS(); -} From 51c7c896b1d0cbdee5ad630e1611c34ca4a7dff8 Mon Sep 17 00:00:00 2001 From: Alexander Blair Date: Tue, 20 Jan 2026 22:15:00 +0000 Subject: [PATCH 2/7] Add linters --- .github/linters/.clang-format | 1 + .github/linters/.markdown-lint.yml | 1 + .github/linters/.yaml-lint.yml | 1 + .github/workflows/lint.yml | 49 +++++++++++++++++++++++ .markdownlint.yml | 35 ++++++++++++++++ .pre-commit-config.yaml | 64 ++++++++++++++++++++++++++++++ .yamllint.yml | 62 +++++++++++++++++++++++++++++ 7 files changed, 213 insertions(+) create mode 120000 .github/linters/.clang-format create mode 120000 .github/linters/.markdown-lint.yml create mode 120000 .github/linters/.yaml-lint.yml create mode 100644 .github/workflows/lint.yml create mode 100644 .markdownlint.yml create mode 100644 .pre-commit-config.yaml create mode 100644 .yamllint.yml diff --git a/.github/linters/.clang-format b/.github/linters/.clang-format new file mode 120000 index 0000000..2d11237 --- /dev/null +++ b/.github/linters/.clang-format @@ -0,0 +1 @@ +../../.clang-format \ No newline at end of file diff --git a/.github/linters/.markdown-lint.yml b/.github/linters/.markdown-lint.yml new file mode 120000 index 0000000..7e62b3d --- /dev/null +++ b/.github/linters/.markdown-lint.yml @@ -0,0 +1 @@ +../../.markdownlint.yml \ No newline at end of file diff --git a/.github/linters/.yaml-lint.yml b/.github/linters/.yaml-lint.yml new file mode 120000 index 0000000..54a3654 --- /dev/null +++ b/.github/linters/.yaml-lint.yml @@ -0,0 +1 @@ +../../.yamllint.yml \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..34d2dfc --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,49 @@ +--- +name: Lint + +on: + push: + branches: + - main + pull_request: + branches: + - main + +permissions: { } + +jobs: + build: + name: Lint + runs-on: ubuntu-latest + + permissions: + contents: read + packages: read + # To report GitHub Actions status checks + statuses: write + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + # super-linter needs the full git history to get the + # list of files that changed across commits + fetch-depth: 0 + + - name: Super-linter + uses: super-linter/super-linter/slim@v6.7.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # External doxygen style files, the MOOSE Doxygen header, and the CodeCov upload script + # do not meet Canary linting requirements; exclude them from lint checks: + FILTER_REGEX_EXCLUDE: ((^|/)doxygen-awesome|moose_doxy_header.html|doxygen.css|tabs.css|codecov.sh) + VALIDATE_ANSIBLE: false + VALIDATE_CHECKOV: false + VALIDATE_CPP: false + VALIDATE_JSCPD: false + VALIDATE_PYTHON_BLACK: false + VALIDATE_PYTHON_FLAKE8: false + VALIDATE_PYTHON_ISORT: false + VALIDATE_PYTHON_MYPY: false + VALIDATE_PYTHON_PYLINT: false + VALIDATE_PYTHON_RUFF: false diff --git a/.markdownlint.yml b/.markdownlint.yml new file mode 100644 index 0000000..1a774bd --- /dev/null +++ b/.markdownlint.yml @@ -0,0 +1,35 @@ +--- +########################### +########################### +## Markdown Linter rules ## +########################### +########################### + +# Linter rules doc: +# - https://github.com/DavidAnson/markdownlint +# +# Note: +# To comment out a single error: +# +# any violations you want +# +# + +############### +# Rules by id # +############### +MD004: false # Unordered list style +MD007: + indent: 2 # Unordered list indentation +MD013: + line_length: 130 # Line length 80 is far too short +MD026: + punctuation: ".,;:!。,;:" # List of not allowed +MD029: false # Ordered list item prefix +MD033: false # Allow inline HTML +MD041: false # Allow MOOSE configuration data before first heading + +################# +# Rules by tags # +################# +blank_lines: false # Error on blank lines diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..e0d6aa2 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,64 @@ +--- +repos: + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: v14.0.6 + hooks: + - id: clang-format + + # Not yet figured out how to configure this properly + # - repo: https://github.com/pocc/pre-commit-hooks + # rev: v1.3.5 + # hooks: + # - id: clang-tidy + # args: + # - "-p=./build" + # - "-config-file=./.clang-tidy" + # - "--warnings-as-errors=*" + # - "-extra-arg=-std=c++17" + # - "-extra-arg=-stdlib=libstdc++" + + - repo: https://github.com/editorconfig-checker/editorconfig-checker.python + rev: 2.7.3 + hooks: + - id: editorconfig-checker + alias: ec + + - repo: https://github.com/scop/pre-commit-shfmt + rev: v3.8.0-1 + hooks: + - id: shfmt + + - repo: https://github.com/shellcheck-py/shellcheck-py + rev: v0.10.0.1 + hooks: + - id: shellcheck + + # Hadolint isn't trivial to install + # - repo: https://github.com/hadolint/hadolint + # rev: v2.12.0 + # hooks: + # - id: hadolint + + # Note: needs node.js >= 18, which is more recent than version + # distributed with Ubuntu 22.4. The latest versions of node.js can + # be installed using the instructions at + # https://github.com/nodesource/distributions?tab=readme-ov-file#debian-and-ubuntu-based-distributions + - repo: https://github.com/igorshubovych/markdownlint-cli + rev: v0.41.0 + hooks: + - id: markdownlint-fix + + - repo: https://github.com/rhysd/actionlint + rev: v1.7.1 + hooks: + - id: actionlint + + - repo: https://github.com/adrienverge/yamllint + rev: v1.35.1 + hooks: + - id: yamllint + + - repo: https://github.com/gitleaks/gitleaks + rev: v8.16.1 + hooks: + - id: gitleaks diff --git a/.yamllint.yml b/.yamllint.yml new file mode 100644 index 0000000..4c44381 --- /dev/null +++ b/.yamllint.yml @@ -0,0 +1,62 @@ +--- +########################################### +# These are the rules used for # +# linting all the yaml files in the stack # +# NOTE: # +# You can disable line with: # +# # yamllint disable-line # +########################################### +rules: + braces: + level: warning + min-spaces-inside: 0 + max-spaces-inside: 0 + min-spaces-inside-empty: 1 + max-spaces-inside-empty: 5 + brackets: + level: warning + min-spaces-inside: 0 + max-spaces-inside: 0 + min-spaces-inside-empty: 1 + max-spaces-inside-empty: 5 + colons: + level: warning + max-spaces-before: 0 + max-spaces-after: 1 + commas: + level: warning + max-spaces-before: 0 + min-spaces-after: 1 + max-spaces-after: 1 + comments: disable + comments-indentation: disable + document-end: disable + document-start: + level: warning + present: true + empty-lines: + level: warning + max: 2 + max-start: 0 + max-end: 0 + hyphens: + level: warning + max-spaces-after: 1 + indentation: + level: warning + spaces: consistent + indent-sequences: true + check-multi-line-strings: false + key-duplicates: enable + line-length: + level: warning + max: 100 + allow-non-breakable-words: true + allow-non-breakable-inline-mappings: true + new-line-at-end-of-file: disable + new-lines: + type: unix + trailing-spaces: disable + +ignore: + - syntax.yaml From 9d4f34fc8e4e6215c8a90581599c47053ab3b1fb Mon Sep 17 00:00:00 2001 From: Alexander Blair Date: Wed, 21 Jan 2026 10:13:36 +0000 Subject: [PATCH 3/7] Update run_tests to use test executable found in MOOSE_DIR --- run_tests | 5 ++++- testroot | 4 ---- 2 files changed, 4 insertions(+), 5 deletions(-) delete mode 100644 testroot diff --git a/run_tests b/run_tests index e89645a..03de921 100755 --- a/run_tests +++ b/run_tests @@ -8,5 +8,8 @@ MOOSE_DIR = os.environ.get('MOOSE_DIR', MOOSE_DIR) sys.path.append(os.path.join(MOOSE_DIR, 'python')) +test_executable_path = os.path.join(MOOSE_DIR, 'test', 'moose_test') +print('Test executable path: ', test_executable_path) + from TestHarness import TestHarness -TestHarness.buildAndRun(sys.argv, 'canary', MOOSE_DIR) +TestHarness.buildAndRun(sys.argv, test_executable_path, MOOSE_DIR) diff --git a/testroot b/testroot deleted file mode 100644 index f422a77..0000000 --- a/testroot +++ /dev/null @@ -1,4 +0,0 @@ -app_name = canary -allow_warnings = false -allow_unused = false -allow_override = false From d0ca7ffcd82db2ea90f525a327798e6959ed4480 Mon Sep 17 00:00:00 2001 From: Alexander Blair Date: Wed, 21 Jan 2026 20:01:37 +0000 Subject: [PATCH 4/7] First attempt at Apptainer-based CI --- .github/workflows/main.yml | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..6a24aaf --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,40 @@ +--- +name: BuildTest +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + docker-build-test-ubuntu: + runs-on: ubuntu-latest + name: BuildTestUbuntu + env: + PRCOMMITSHA: ${{ github.event.pull_request.head.sha }} + PRREPOSITORY: ${{ github.event.pull_request.head.repo.full_name }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: PrintGithubContext + run: echo "${PRCOMMITSHA:-$GITHUB_SHA}" "${PRREPOSITORY:-$GITHUB_REPOSITORY}" + - name: Setup Apptainer + uses: eWaterCycle/setup-apptainer@v2 + with: + apptainer-version: 1.3.6 + - name: Pull MOOSE apptainer container + run: apptainer build moose-dev-openmpi.sif oras://ghcr.io/idaholab/apptainer/moose-dev-openmpi-x86_64:latest + - name: Create apptainer instance + run: apptainer instance start moose-dev-openmpi.sif moose_instance + - name: Checkout Canary + run: apptainer exec instance://moose_instance 'git clone https://github.com/aurora-multiphysics/canary.git && git checkout ${{ github.event.pull_request.head.sha }}' + - name: Checkout MOOSE + run: apptainer exec instance://moose_instance 'git clone https://github.com/idaholab/moose.git' + - name: Build MOOSE test executable + run: apptainer exec instance://moose_instance 'cd moose/test && make' + - name: Run Canary tests + run: apptainer exec instance://moose_instance 'export MOOSE_DIR=$PWD/moose && ./canary/run_tests' + - name: Close apptainer instance + run: apptainer instance stop moose_instance From df075f07fc52a98a9496db97ecca3d60e4bf58d9 Mon Sep 17 00:00:00 2001 From: Alexander Blair Date: Wed, 21 Jan 2026 20:11:22 +0000 Subject: [PATCH 5/7] Add missing cd into Canary directory --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6a24aaf..36a8619 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ on: jobs: docker-build-test-ubuntu: runs-on: ubuntu-latest - name: BuildTestUbuntu + name: RunCanaryTests env: PRCOMMITSHA: ${{ github.event.pull_request.head.sha }} PRREPOSITORY: ${{ github.event.pull_request.head.repo.full_name }} @@ -29,7 +29,7 @@ jobs: - name: Create apptainer instance run: apptainer instance start moose-dev-openmpi.sif moose_instance - name: Checkout Canary - run: apptainer exec instance://moose_instance 'git clone https://github.com/aurora-multiphysics/canary.git && git checkout ${{ github.event.pull_request.head.sha }}' + run: apptainer exec instance://moose_instance 'git clone https://github.com/aurora-multiphysics/canary.git && cd canary && git checkout ${{ github.event.pull_request.head.sha }}' - name: Checkout MOOSE run: apptainer exec instance://moose_instance 'git clone https://github.com/idaholab/moose.git' - name: Build MOOSE test executable From b69256b7404be2d3b3d3500496c817a214e2c074 Mon Sep 17 00:00:00 2001 From: Alexander Blair Date: Wed, 21 Jan 2026 20:58:30 +0000 Subject: [PATCH 6/7] Parallelise MOOSE build step --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 36a8619..6ef990a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,7 +33,7 @@ jobs: - name: Checkout MOOSE run: apptainer exec instance://moose_instance 'git clone https://github.com/idaholab/moose.git' - name: Build MOOSE test executable - run: apptainer exec instance://moose_instance 'cd moose/test && make' + run: apptainer exec instance://moose_instance 'cd moose && ./configure --with-mfem && export MOOSE_JOBS=4 && cd test && make -j4' - name: Run Canary tests run: apptainer exec instance://moose_instance 'export MOOSE_DIR=$PWD/moose && ./canary/run_tests' - name: Close apptainer instance From 079c8981422f0baff743444876030a1a03f02398 Mon Sep 17 00:00:00 2001 From: Alexander Blair Date: Wed, 21 Jan 2026 21:00:58 +0000 Subject: [PATCH 7/7] Use double quotes in .github/workflows/main.yml --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6ef990a..2b7d4ee 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,12 +29,12 @@ jobs: - name: Create apptainer instance run: apptainer instance start moose-dev-openmpi.sif moose_instance - name: Checkout Canary - run: apptainer exec instance://moose_instance 'git clone https://github.com/aurora-multiphysics/canary.git && cd canary && git checkout ${{ github.event.pull_request.head.sha }}' + run: apptainer exec instance://moose_instance "git clone https://github.com/aurora-multiphysics/canary.git && cd canary && git checkout ${{ github.event.pull_request.head.sha }}" - name: Checkout MOOSE - run: apptainer exec instance://moose_instance 'git clone https://github.com/idaholab/moose.git' + run: apptainer exec instance://moose_instance "git clone https://github.com/idaholab/moose.git" - name: Build MOOSE test executable - run: apptainer exec instance://moose_instance 'cd moose && ./configure --with-mfem && export MOOSE_JOBS=4 && cd test && make -j4' + run: apptainer exec instance://moose_instance "cd moose && ./configure --with-mfem && export MOOSE_JOBS=4 && cd test && make -j4" - name: Run Canary tests - run: apptainer exec instance://moose_instance 'export MOOSE_DIR=$PWD/moose && ./canary/run_tests' + run: apptainer exec instance://moose_instance "export MOOSE_DIR=$PWD/moose && ./canary/run_tests" - name: Close apptainer instance run: apptainer instance stop moose_instance