Skip to content

CI work

CI work #6

Workflow file for this run

name: condatest
on:
push:
pull_request:
schedule:
- cron: '30 18 * * 0' # 18:30 every Sunday
workflow_dispatch:
inputs:
manual-debugging:
type: boolean
description: Launch manual debugging tmate session on failure
default: false
# Workflow which pip installs and tests the source code in a conda environment
jobs:
build:
strategy:
#fail-fast: false
matrix:
include:
# - { os: ubuntu-20.04 }
# - { os: ubuntu-22.04 }
- { os: ubuntu-latest }
# - { os: macos-11 }
# - { os: macos-12 }
# - { os: macos-13 }
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -exl {0}
env:
CONDA_SOLVER: libmamba
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: ./src_co
- name: Enable conda
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: ncrystaltestenv
environment-file: ./src_co/.github/resources/conda_ncrystaltestenv.yml
auto-activate-base: false
- name: Inspect environment
run: |
conda info
conda list
cmake --version
#Ensure our environment did not get NCrystal installed by accident:
( python3 -c 'import NCrystal'; if [ $? == 0 ]; then exit 1; else exit 0; fi )
( which nctool >/dev/null; if [ $? == 0 ]; then exit 1; else exit 0; fi )
( which ncrystal-config >/dev/null; if [ $? == 0 ]; then exit 1; else exit 0; fi )
- name: Install NCrystal
run: |
python3 -m pip install ncrystal
#FIXME: Actually use current source: python3 -m pip install ./src_co --no-deps -vv
- name: Basic NCrystal tests
run: |
ncrystal-config --summary
nctool --test
python3 -c 'import NCrystal'
#Final step, so tmate step can check if we got this far.
- name: Final
id: final-step
run: |
echo "All steps fine"
true
- name: Setup tmate session for manual debugging
uses: mxschmitt/action-tmate@v3
if: always() && inputs.manual-debugging == true && (steps.final-step != 'success')
with:
limit-access-to-actor: true