Skip to content

Commit

Permalink
Workflow for testing installation in different conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
sbaldu committed Jul 13, 2024
1 parent fc4adfc commit 2b9f5f1
Showing 1 changed file with 96 additions and 0 deletions.
96 changes: 96 additions & 0 deletions .github/workflows/installation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Test installation of the library

# The workflow gets triggered by pushes and pull requests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- name: Test installation inside docker containers (serial)
working-directory: ${{github.workspace}}/docker/serial
run: |
docker build -t serial .
echo "Testing installation from PyPi"
docker run -t serial /bin/bash -c \
"pip install CLUEstering; python3 -c 'import CLUEstering' || exit 1"
echo "Testing installation from git repository"
docker run -t serial /bin/bash -c \
"git clone https://github.com/cms-patatrack/CLUEstering;
cd CLUEstering;
pip install . ;
python3 -c 'import CLUEstering' || exit 1"
- name: Test installation inside docker containers (serial without boost)
working-directory: ${{github.workspace}}/docker/no_boost
run: |
docker build -t noboost .
echo "Testing installation from PyPi"
docker run -t noboost /bin/bash -c \
"pip install CLUEstering; python3 -c 'import CLUEstering' || exit 1"
echo "Testing installation from git repository"
docker run -t noboost /bin/bash -c \
"git clone https://github.com/cms-patatrack/CLUEstering;
cd CLUEstering;
pip install . ;
python3 -c 'import CLUEstering' || exit 1"
- name: Test installation inside docker containers (tbb)
working-directory: ${{github.workspace}}/docker/tbb
run: |
docker build -t tbb .
echo "Testing installation from PyPi"
docker run -t tbb /bin/bash -c \
"pip install CLUEstering; python3 -c 'import CLUEstering' || exit 1"
echo "Testing installation from git repository"
docker run -t tbb /bin/bash -c \
"git clone https://github.com/cms-patatrack/CLUEstering;
cd CLUEstering;
pip install . ;
python3 -c 'import CLUEstering' || exit 1"
- name: Test installation inside docker containers (without gcc)
working-directory: ${{github.workspace}}/docker/no_gcc
run: |
docker build -t nogcc .
echo "Testing installation from PyPi"
docker run -t nogcc /bin/bash -c \
"pip install CLUEstering; python3 -c 'import CLUEstering' && exit 1"
echo "Testing installation from git repository"
docker run -t nogcc /bin/bash -c \
"git clone https://github.com/cms-patatrack/CLUEstering;
cd CLUEstering;
pip install . ;
python3 -c 'import CLUEstering' && exit 1"
- name: Test installation inside docker containers (without cmake)
working-directory: ${{github.workspace}}/docker/no_cmake
run: |
docker build -t nocmake .
echo "Testing installation from PyPi"
docker run -t nocmake /bin/bash -c \
"pip install CLUEstering; python3 -c 'import CLUEstering' && exit 1"
echo "Testing installation from git repository"
docker run -t nocmake /bin/bash -c \
"git clone https://github.com/cms-patatrack/CLUEstering;
cd CLUEstering;
pip install . ;
python3 -c 'import CLUEstering' && exit 1"

0 comments on commit 2b9f5f1

Please sign in to comment.