summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2021-04-22 09:35:17 +0200
committerGitHub <noreply@github.com>2021-04-22 09:35:17 +0200
commit46088aa5daa379d6e88859d5de2322b400e6b3e7 (patch)
tree0e65ff80cc1e3cc3526f74108e93fc0adf0ba107 /.github/workflows
parent7322a9e3bea876946080432ee3fafb28b9ba5ecb (diff)
downloadspack-46088aa5daa379d6e88859d5de2322b400e6b3e7.tar.gz
spack-46088aa5daa379d6e88859d5de2322b400e6b3e7.tar.bz2
spack-46088aa5daa379d6e88859d5de2322b400e6b3e7.tar.xz
spack-46088aa5daa379d6e88859d5de2322b400e6b3e7.zip
qa: install clingo-cffi from pip (#23163)
Clingo has been released on PyPI, so there are no more concerns on our CI depending on pypy.test for installing the wheel. Apparently we have parts of Spack which are not compatible with kcov > 3.4
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/unit_tests.yaml77
1 files changed, 54 insertions, 23 deletions
diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml
index 385e3a1e46..e45e1aad1b 100644
--- a/.github/workflows/unit_tests.yaml
+++ b/.github/workflows/unit_tests.yaml
@@ -293,30 +293,61 @@ jobs:
clingo-cffi:
needs: [ validate, style, documentation, changes ]
runs-on: ubuntu-latest
- container: spack/github-actions:clingo-cffi
steps:
- - name: Run unit tests
- run: |
- whoami && echo PWD=$PWD && echo HOME=$HOME && echo SPACK_TEST_SOLVER=$SPACK_TEST_SOLVER
- python3 -c "import clingo; print(hasattr(clingo.Symbol, '_rep'), clingo.__version__)"
- git clone https://github.com/spack/spack.git && cd spack
- git fetch origin ${{ github.ref }}:test-branch
- git checkout test-branch
- . share/spack/setup-env.sh
- spack compiler find
- spack solve mpileaks%gcc
- if [ "${{ needs.changes.outputs.with_coverage }}" == "true" ]
- then
- coverage run $(which spack) unit-test -v -x
- coverage combine
- coverage xml
- else
- $(which spack) unit-test -m "not maybeslow" -k "package_sanity"
- fi
- - uses: codecov/codecov-action@v1
- if: ${{ needs.changes.outputs.with_coverage == 'true' }}
- with:
- flags: unittests,linux,clingo
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+ - uses: actions/setup-python@v2
+ with:
+ python-version: 3.9
+ - name: Install System packages
+ run: |
+ sudo apt-get -y update
+ # Needed for unit tests
+ sudo apt-get install -y coreutils gfortran graphviz gnupg2 mercurial
+ sudo apt-get install -y ninja-build patchelf
+ # Needed for kcov
+ sudo apt-get -y install cmake binutils-dev libcurl4-openssl-dev
+ sudo apt-get -y install zlib1g-dev libdw-dev libiberty-dev
+ - name: Install kcov for bash script coverage
+ if: ${{ needs.changes.outputs.with_coverage == 'true' }}
+ env:
+ KCOV_VERSION: 34
+ run: |
+ KCOV_ROOT=$(mktemp -d)
+ wget --output-document=${KCOV_ROOT}/${KCOV_VERSION}.tar.gz https://github.com/SimonKagstrom/kcov/archive/v${KCOV_VERSION}.tar.gz
+ tar -C ${KCOV_ROOT} -xzvf ${KCOV_ROOT}/${KCOV_VERSION}.tar.gz
+ mkdir -p ${KCOV_ROOT}/build
+ cd ${KCOV_ROOT}/build && cmake -Wno-dev ${KCOV_ROOT}/kcov-${KCOV_VERSION} && cd -
+ make -C ${KCOV_ROOT}/build && sudo make -C ${KCOV_ROOT}/build install
+ - name: Install Python packages
+ run: |
+ pip install --upgrade pip six setuptools codecov coverage clingo
+ - name: Setup git configuration
+ run: |
+ # Need this for the git tests to succeed.
+ git --version
+ . .github/workflows/setup_git.sh
+ - name: Run unit tests (full suite with coverage)
+ if: ${{ needs.changes.outputs.with_coverage == 'true' }}
+ env:
+ COVERAGE: true
+ SPACK_TEST_SOLVER: clingo
+ run: |
+ share/spack/qa/run-unit-tests
+ coverage combine
+ coverage xml
+ - name: Run unit tests (reduced suite without coverage)
+ if: ${{ needs.changes.outputs.with_coverage == 'false' }}
+ env:
+ ONLY_PACKAGES: true
+ SPACK_TEST_SOLVER: clingo
+ run: |
+ share/spack/qa/run-unit-tests
+ - uses: codecov/codecov-action@v1
+ if: ${{ needs.changes.outputs.with_coverage == 'true' }}
+ with:
+ flags: unittests,linux,clingo
# Run unit tests on MacOS
build:
needs: [ validate, style, documentation, changes ]