Skip to content

Commit

Permalink
travis: use travis CI only for coverity builds
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-iob committed Dec 7, 2023
1 parent 14ec694 commit a51eebd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 95 deletions.
55 changes: 11 additions & 44 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ jobs:
runs-on: ubuntu
name: Setup
steps:
- uses: actions/checkout@v3
- name: Checkout build environment information
uses: actions/checkout@v3
with:
path: bitpit
sparse-checkout: |
environments
- name: Build environment
shell: bash
run: |
Expand All @@ -25,25 +30,10 @@ jobs:
--cache-to type=local,dest=/home/bob/products/bitpit/ubuntu-cache \
--rm \
--target bitpit-environment \
-f environments/ubuntu/Dockerfile .
- name: Remove temporary docker images and containers
shell: bash
-f bitpit/environments/ubuntu/Dockerfile .
- name: Cleanup build environment information
run: |
for CONTAINER in $(docker ps -a -q)
do
LABEL=$(docker inspect --format '{{ index .Config.Labels "stage"}}' ${CONTAINER})
if [[ ${LABEL} == "bitpit-"* && ${LABEL} != "bitpit-environment" ]]; then
[ -z "$(docker ps --format '{{.ID}}' | grep "${CONTAINER}" -w)" ] || docker stop ${CONTAINER}
docker rm ${CONTAINER}
fi
done
for IMAGE in $(docker images -q --filter dangling=true)
do
LABEL=$(docker inspect --format '{{ index .Config.Labels "stage"}}' ${IMAGE})
if [[ ${LABEL} == "bitpit-"* && ${LABEL} != "bitpit-environment" ]]; then
docker rmi ${IMAGE}
fi
done
rm -rf bitpit
tests:
runs-on: ubuntu
needs: setup
Expand All @@ -68,7 +58,8 @@ jobs:
mpi: ON
debug: OFF
steps:
- uses: actions/checkout@v3
- name: Checkout bitpit
uses: actions/checkout@v3
- name: Build bitpit
shell: bash
run: |
Expand All @@ -93,27 +84,3 @@ jobs:
--build-arg DEBUG=${{ matrix.debug }} \
--target bitpit-test \
-f environments/ubuntu/Dockerfile .
cleanup:
runs-on: ubuntu
needs: tests
name: Cleanup
if: always()
steps:
- name: Remove docker images and containers
shell: bash
run: |
for CONTAINER in $(docker ps -a -q)
do
LABEL=$(docker inspect --format '{{ index .Config.Labels "stage"}}' ${CONTAINER})
if [[ ${LABEL} == "bitpit-"* ]]; then
[ -z "$(docker ps --format '{{.ID}}' | grep "${CONTAINER}" -w)" ] || docker stop ${CONTAINER}
docker rm ${CONTAINER}
fi
done
for IMAGE in $(docker images -q --filter dangling=true)
do
LABEL=$(docker inspect --format '{{ index .Config.Labels "stage"}}' ${IMAGE})
if [[ ${LABEL} == "bitpit-"* ]]; then
docker rmi ${IMAGE}
fi
done
46 changes: 0 additions & 46 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,52 +30,6 @@ env:

jobs:
include:
- if: branch != coverity
os: linux
env:
- BUILD_TYPE="Release" BITPIT_ENABLE_MPI="True"

- if: branch != coverity
os: linux
env:
- BUILD_TYPE="Release" BITPIT_ENABLE_MPI="False"

- if: branch != coverity
os: linux
env:
- BUILD_TYPE="Debug" BITPIT_ENABLE_MPI="True"

- if: branch != coverity
os: linux
env:
- BUILD_TYPE="Debug" BITPIT_ENABLE_MPI="False"

- if: branch != coverity
os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- clang
- g++-7
- gfortran-7
- cmake
- libblas-dev
- liblapack-dev
- liblapacke-dev
- openmpi-bin
- libboost-all-dev
- libopenmpi-dev
- libpetsc3.6
- libpetsc3.6.2-dev

env:
- C_COMPILER="clang"
- CXX_COMPILER="clang++"
- Fortran_COMPILER="gfortran-7"
- BUILD_TYPE="Release" BITPIT_ENABLE_MPI="True"

- if: branch = coverity
os: linux
addons:
Expand Down
6 changes: 1 addition & 5 deletions environments/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
ARG MPI=ON
ARG DEBUG=OFF

FROM ubuntu:20.04 AS bitpit-ubuntu-base
LABEL stage=bitpit-ubuntu-base
ENV DEBIAN_FRONTEND noninteractive
Expand Down Expand Up @@ -111,8 +108,7 @@ RUN cd /opt/bitpit && \
-DBITPIT_ENABLE_INTEGRATION_TESTS=ON \
-DBITPIT_ENABLE_MPI=${MPI} \
-DBITPIT_ENABLE_UNIT_TESTS=ON \
-DBITPIT_BUILD_EXAMPLES=ON \
-DBITPIT_VERBOSE_MAKE=ON \
-DBUILD_TESTING=ON \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DCMAKE_C_COMPILER=${C_COMPILER} \
-DCMAKE_CXX_COMPILER=${CXX_COMPILER} \
Expand Down

0 comments on commit a51eebd

Please sign in to comment.