Skip to content

Commit

Permalink
Merge pull request #52 from lanl/jmm/citests
Browse files Browse the repository at this point in the history
add CI tests and add catch v3 to spackage
  • Loading branch information
Yurlungur authored Aug 29, 2024
2 parents b22d992 + 6ac0b79 commit daee8bf
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/tests-minimal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Tests minimal

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
tests:
name: Minimal test suite
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: recursive
- name: Set system to non-interactive mode
run: export DEBIAN_FRONTEND=noninteractive
- name: install dependencies
run: |
sudo apt-get install -y --force-yes -qq build-essential
- name: build and install
run: |
mkdir -p build
cd build
cmake -DPORTS_OF_CALL_BUILD_TESTING=ON ..
make -j
make test
6 changes: 5 additions & 1 deletion spack-repo/packages/ports-of-call/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,15 @@ class PortsOfCall(CMakePackage):
default="None",
when="@:1.2.0",
)
variant("test", default=False, description="Build tests")

depends_on("cmake@3.12:")
depends_on("catch2@3.0.1:", when"+test")

def cmake_args(self):
args = []
args = [
self.define_from_variant("PORTS_OF_CALL_BUILD_TESTING", "test"),
]
if self.spec.satisfies("@:1.2.0"):
args.append(self.define_from_variant("PORTABILITY_STRATEGY", "portability_strategy"))
return args

0 comments on commit daee8bf

Please sign in to comment.