Skip to content

Make komodo RHEL agnostic #754

Make komodo RHEL agnostic

Make komodo RHEL agnostic #754

Workflow file for this run

name: Testing
on: [pull_request]
jobs:
build:
env:
RELEASE: release-py3x.yml
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.10', '3.11']
target-python-bin: ['/usr/bin/python3.8']
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt update
sudo apt install csh
- name: Install Komodo
run: |
pip install .[dev]
- name: Unit tests
run: |
pytest tests
- name: Lint examples
run: |
python -m komodo.lint examples/stable.yml examples/repository.yml
- name: Full integration test
run: |
kmd ci/${RELEASE} ci/repository.yml --python ${{ matrix.target-python-bin }} --workspace ${{ runner.temp }}/kmd-ws --prefix ${{ runner.temp }}/prefix --release ci
- name: Build libkmd.so (a dummy C library) for testing
run: |
set -e
mkdir ${{ runner.temp }}/tmplib
echo 'char* foo() { return "bar"; }' > ${{ runner.temp }}/tmplib/lib.c
cc -shared -o${{ runner.temp }}/tmplib/libkmd.so -fPIC ${{ runner.temp }}/tmplib/lib.c
# Deploy directly into the above built komodo release
cp ${{ runner.temp }}/tmplib/libkmd.so ${{ runner.temp }}/prefix/ci/root/lib
source ${{ runner.temp }}/prefix/ci/enable
which python
python --version
python -c "import numpy;print(numpy.__file__)"
ci/test_import_lib.py
- name: Test enable script
run: |
source ${{ runner.temp }}/prefix/ci/enable
[[ "${{ matrix.target-python-bin }}" == "${{ runner.temp }}/prefix/ci/root/bin/python" ]]
- name: Test Python version
run: |
source ${{ runner.temp }}/prefix/ci/enable
pyver=$(${{ matrix.target-python-bin }} -c 'from sys import version_info as v;print(f"{v[0]}.{v[1]}")')
[[ "${pyver}" == "${{ matrix.python-version }}" ]]