-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
separating build into docker and gcc (#54)
* separating build into docker and gcc * fixing pages build * run tests in serial * not running tests in parallel for focker * making sure memcheck happens
- Loading branch information
Showing
12 changed files
with
123 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Docker | ||
|
||
on: [push, pull_request] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
docker-build-and-test: | ||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | ||
name: Build and Test - ${{ matrix.dockerfile }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
dockerfile: | ||
- Dockerfile | ||
- Dockerfile.coverage | ||
- Dockerfile.memcheck | ||
- Dockerfile.mpi | ||
- Dockerfile.mpi.memcheck | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Build Docker image | ||
run: docker build -t tuvx -f docker/${{ matrix.dockerfile }} . | ||
|
||
- name: Run tests in container | ||
if: matrix.dockerfile != 'Dockerfile.coverage' | ||
run: docker run --name test-container -t tuvx bash -c 'make test ARGS="--rerun-failed --output-on-failure"' | ||
|
||
- name: Run coverage tests in container | ||
if: matrix.dockerfile == 'Dockerfile.coverage' | ||
run: docker run --name test-container -t tuvx bash -c 'make coverage ARGS="--rerun-failed --output-on-failure"' | ||
|
||
- name: Copy coverage from container | ||
if: matrix.dockerfile == 'Dockerfile.coverage' | ||
run: docker cp test-container:build/coverage.info . | ||
|
||
- name: Upload coverage report | ||
if: matrix.dockerfile == 'Dockerfile.coverage' | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: coverage.info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Ubuntu | ||
|
||
on: [ push, pull_request ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
gcc: | ||
runs-on: ubuntu-latest | ||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | ||
strategy: | ||
matrix: | ||
gcc_version: [11, 12, 13] | ||
env: | ||
FC: gfortran-${{ matrix.gcc_version }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libnetcdf-dev netcdf-bin libnetcdff-dev | ||
- name: Install python dependencies | ||
run: pip install numpy scipy | ||
- name: Run Cmake | ||
run: cmake -S . -B build | ||
- name: Build | ||
run: cmake --build build --parallel | ||
- name: Run tests | ||
run: | | ||
cd build | ||
ctest --rerun-failed --output-on-failure . --verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM fedora:37 | ||
|
||
RUN dnf -y update \ | ||
&& dnf -y install \ | ||
gcc-fortran \ | ||
gcc-c++ \ | ||
gcc \ | ||
gdb \ | ||
git \ | ||
netcdf-fortran-devel \ | ||
cmake \ | ||
make \ | ||
lcov \ | ||
valgrind \ | ||
python3 \ | ||
python3-pip \ | ||
lapack-devel \ | ||
yaml-cpp-devel \ | ||
&& dnf clean all | ||
|
||
RUN pip3 install numpy scipy | ||
|
||
# build the tuv-x tool | ||
COPY . /tuv-x/ | ||
RUN mkdir /build \ | ||
&& cd /build \ | ||
&& cmake \ | ||
-DENABLE_MEMCHECK:BOOL=TRUE \ | ||
/tuv-x \ | ||
&& make -j 8 | ||
|
||
WORKDIR /build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.