Skip to content

Commit

Permalink
CI: Add musl+gcc to regression test workflow (#6)
Browse files Browse the repository at this point in the history
* CI: move regression test to a reuseable workflow

* checkout is required to access reuseable workflow

* change position of "uses"

* regression test as reuseable action

* specify shell in composite action

* show gcc and ldd versions in action

* add CI workflow for musl+gcc

* add bash

* install python in alpine

* move setup-python out of the reuseable action

* use Python venv

* try to set up Python environment in bash

* run pip with venv

* What happens when pip runs in a different step?

* use pipx

* remove upgrade of pip

* let pip break the system packages

* install git

* make sure ldd --version call always exists with exitcode 0

* parameterize artifact name

* parameterize artifact name without input

* revert back to using input

* fix string concatenation

* revert back to explicit artifact names
  • Loading branch information
flange-ipb authored Feb 13, 2024
1 parent baaffee commit 1ba86af
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 14 deletions.
37 changes: 37 additions & 0 deletions .github/actions/regression_tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Regression tests

inputs:
artifact-name:
description: 'Name of the uploaded artifact'
required: false
default: 'regression-test-results'

runs:
using: "composite"
steps:
- name: Install SDF-pipeline
run: |
python -m pip install --upgrade pip
python -m pip install git+https://github.com/TUCAN-nest/SDF-pipeline.git
shell: bash

- name: Show gcc version
run: |
gcc --version
shell: bash

- name: Show ldd version
run: |
ldd --version || true
shell: bash

- name: Run regression tests
run: python -m INCHI-1-TEST.run_regression_tests ci
shell: bash

- name: Upload regression test results
if: '!cancelled()'
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.artifact-name }}
path: ./INCHI-1-TEST/data/ci/*_regression_test.log
38 changes: 24 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
workflow_dispatch:

jobs:
test:
test_glibc_gcc:
runs-on: ubuntu-latest
container: gcc:latest

Expand All @@ -17,19 +17,29 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- uses: ./.github/actions/regression_tests
with:
artifact-name: regression-test-results_glibc_gcc

- name: Install SDF-pipeline
run: |
python -m pip install --upgrade pip
python -m pip install git+https://github.com/TUCAN-nest/SDF-pipeline.git
- name: Run regression tests
run: python -m INCHI-1-TEST.run_regression_tests ci
shell: bash
test_musl_gcc:
runs-on: ubuntu-latest
container: alpine:latest

- name: Upload regression test results
if: '!cancelled()'
uses: actions/upload-artifact@v3
steps:
- uses: actions/checkout@v3
- name: Install build and test environment
run: |
apk add bash git musl-dev gcc make python3 py-pip
- name: Show Python version
run: |
python --version
- name: Configure pip to break system packages
run: |
mkdir -p ~/.config/pip
cat <<EOT >> ~/.config/pip/pip.conf
[global]
break-system-packages = true
EOT
- uses: ./.github/actions/regression_tests
with:
name: regression-test-results
path: ./INCHI-1-TEST/data/ci/*_regression_test.log
artifact-name: regression-test-results_musl_gcc

0 comments on commit 1ba86af

Please sign in to comment.