Skip to content

trigger CI

trigger CI #427

Workflow file for this run

name: basictest
on:
push:
pull_request:
schedule:
- cron: '30 22 * * 0' # 22:30 every Sunday
# Workflow which pip installs the source code and checks that both bundles build
# and runs tests in both release and debug mode. For simplicity, a lot of
# optional externals (including Geant4!) will be missing, so this test is not
# very comprehensive.
# Syntax:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
# Lint:
# https://github.com/rhysd/actionlint
jobs:
build:
strategy:
matrix:
include:
- { os: ubuntu-20.04, CC: gcc-10, CXX: g++-10, python: '3.8' }
- { os: ubuntu-22.04, CC: gcc, CXX: g++, python: '3.9' }
- { os: ubuntu-latest, CC: gcc, CXX: g++, python: '3.10' }
- { os: ubuntu-latest, CC: clang, CXX: clang++, python: '3.11' }
- { os: ubuntu-latest, CC: gcc-12, CXX: g++-12, python: '3.11' }
# - { os: macos-11, CC: clang, CXX: clang++, python: "3.10" }
- { os: macos-12, CC: clang, CXX: clang++, python: "3.11" }
- { os: macos-13, CC: clang, CXX: clang++, python: "3.12" }
name: ${{ matrix.os }}.${{ matrix.CC }}.python-${{ matrix.python }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -eux {0}
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: src
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Lint python
run: |
python3 -m pip install ruff
./src/devel/ruff.x
- name: Pip install cmake and pybind11
run: |
python3 -m pip install pybind11
python3 -m pip install cmake
which python3
python3 --version
python3 -mpybind11 --version
which cmake
cmake --version
- name: Install
run: |
#For dev work do these two lines instead:
# python3 -m pip install git+https://github.com/mctools/simplebuild@tk_volatile
# python3 -m pip install --no-deps ./src
python3 -m pip install ./src
echo "sb --version:"
sb --version
- name: Build-and-test-minimal
run: |
set -x
mkdir test1
cd test1
sb --init dgcode_val
sb -t --testexcerpts=100
sbenv sb_core_extdeps --require-disabled NCrystal Numpy matplotlib Geant4
sbenv sb_core_extdeps --require ZLib
- name: Install-more-deps
run: |
python3 -m pip install numpy ncrystal matplotlib
nctool --test
- name: Build-and-test-release
run: |
set -x
mkdir test2
cd test2
sb --init dgcode_val COMPACT
sb --pkgi DGCodeRecommendedNoGUI
sb -t --testexcerpts=100
sbenv sb_core_extdeps --require-disabled Geant4
sbenv sb_core_extdeps --require NCrystal Numpy matplotlib ZLib
- name: Build-and-test-debug
run: |
set -x
mkdir test3
cd test3
sb --init dgcode_val DEBUG
sb -t --testexcerpts=100
sbenv sb_core_extdeps --require-disabled Geant4
sbenv sb_core_extdeps --require NCrystal Numpy matplotlib ZLib