Skip to content

Commit 33b134d

Browse files
authored
Merge pull request #137 from DARMA-tasking/136-use-standard-container-from-workflows-repo
#136: Integrate `bake` into vt-tv's CI
2 parents 0310fd4 + 36a166f commit 33b134d

21 files changed

+481
-404
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.git

.github/workflows/build-and-test-macos.yml

Lines changed: 13 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
name: Build and Test (macos)
22

3-
# Trigger the workflow on push or pull request
43
on:
54
push:
65
branches:
76
- master
87
pull_request:
9-
types: [opened, reopened, synchronize, converted_to_draft, ready_for_review]
108

119
jobs:
1210
build:
@@ -17,14 +15,12 @@ jobs:
1715
{
1816
base: macos-13,
1917
compiler: { cc: clang, cxx: clang++ },
20-
gcov: llvm-gcov,
2118
python: ['3.8', '3.9', '3.10', '3.11', '3.12'],
2219
vtk: '9.3.1'
2320
},
2421
{
2522
base: macos-14,
2623
compiler: { cc: clang, cxx: clang++ },
27-
gcov: llvm-gcov,
2824
python: ['3.8', '3.9', '3.10', '3.11', '3.12'],
2925
vtk: '9.3.1'
3026
}
@@ -34,17 +30,16 @@ jobs:
3430
env:
3531
VTK_SRC_DIR: /opt/src/vtk
3632
VTK_BUILD_DIR: /opt/build/vtk
33+
VTK_DIR: /opt/build/vtk
3734
CACHE_KEY: ${{ matrix.host.base }}-${{ matrix.host.compiler.cc }}-vtk-${{ matrix.host.vtk }}
38-
VT_TV_BUILD_DIR: /opt/build/vt-tv
39-
VT_TV_TESTS_ENABLED: "ON"
40-
VT_TV_COVERAGE_ENABLED: ${{ matrix.host.compiler.gcov == '' && 'OFF' || 'ON' }}
35+
VT_TV_BUILD_DIR: /opt/build
4136
VT_TV_OUTPUT_DIR: ${{ github.workspace }}/output
4237
VT_TV_TESTS_OUTPUT_DIR: ${{ github.workspace }}/output/tests
4338
VT_TV_ARTIFACTS_DIR: /tmp/artifacts
4439
CONDA_PATH: /opt/conda
45-
CC: ~
46-
CXX: ~
47-
GCOV: ~
40+
CC: ${{ matrix.host.compiler.cc }}
41+
CXX: ${{ matrix.host.compiler.cxx }}
42+
4843
steps:
4944
- uses: actions/checkout@v4
5045

@@ -53,20 +48,10 @@ jobs:
5348
sudo chown -R $(whoami) /opt
5449
mkdir -p ${{ env.VTK_SRC_DIR }} ${{ env.VT_TV_BUILD_DIR }}
5550
56-
- name: Set environment variables
57-
run: |
58-
echo "CC=$(which ${{ matrix.host.compiler.cc }})" >> $GITHUB_ENV
59-
echo "CXX=$(which ${{ matrix.host.compiler.cxx }})" >> $GITHUB_ENV
60-
echo "GCOV=$(which ${{ matrix.host.gcov }})" >> $GITHUB_ENV
61-
6251
- name: Install dependencies
6352
run: |
6453
brew update && brew install coreutils lcov xquartz
6554
66-
- name: Setup python requirements for JSON datafile validation
67-
run: |
68-
pip install PyYAML && pip install Brotli && pip install schema && pip install nanobind
69-
7055
- name: Load cache (VTK, Miniconda3)
7156
id: base-cache
7257
uses: actions/cache@v4
@@ -78,57 +63,34 @@ jobs:
7863
~/.zshrc
7964
~/.bash_profile
8065
key: ${{ env.CACHE_KEY }}
81-
save-always: true
8266

8367
- name: Setup Conda
8468
if: ${{steps.base-cache.outputs.cache-hit != 'true'}}
69+
env:
70+
CONDA_ROOT: ${{ env.CONDA_PATH }}
8571
run: |
86-
sudo CONDA_PATH=${{ env.CONDA_PATH }} bash ./ci/setup_conda.sh ${{ join(matrix.host.python) }}
87-
88-
- name: Reload shell variables
89-
run: |
90-
if [ -f ~/.zshrc ]; then . ~/.zshrc; fi
91-
if [ -f ~/.profile ]; then . ~/.profile; fi
92-
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
93-
which conda
94-
conda --version
95-
conda env list
72+
sudo bash ./ci/setup_conda.sh ${{ join(matrix.host.python) }}
9673
9774
- name: Setup VTK ${{ matrix.host.vtk }}
9875
if: ${{steps.base-cache.outputs.cache-hit != 'true'}}
9976
run: |
100-
VTK_DIR=${{ env.VTK_BUILD_DIR }} VTK_SRC_DIR=${{ env.VTK_SRC_DIR }} bash ./ci/setup_vtk.sh
77+
bash ./ci/setup_vtk.sh
10178
10279
- name: Build
10380
run: |
104-
mkdir -p ${{ env.VT_TV_BUILD_DIR }}
105-
106-
CC="${{ env.CC }}" \
107-
CXX="${{ env.CXX }}" \
108-
VTK_DIR="${{ env.VTK_BUILD_DIR }}" \
109-
VT_TV_BUILD_DIR="${{ env.VT_TV_BUILD_DIR }}" \
110-
VT_TV_CLEAN=OFF \
111-
VT_TV_TESTS_ENABLED=${{ env.VT_TV_TESTS_ENABLED }} \
112-
VT_TV_COVERAGE_ENABLED=${{ env.VT_TV_COVERAGE_ENABLED }} \
113-
GCOV="${{ env.GCOV }}" \
114-
VT_TV_PYTHON_BINDINGS_ENABLED=OFF \
115-
VT_TV_WERROR_ENABLED=ON \
116-
bash ./build.sh
81+
bash ./ci/build_cpp.sh ${{ github.workspace }} ${{ env.VT_TV_BUILD_DIR }}
11782
11883
- name: Test
11984
run: |
120-
VTK_DIR=${{ env.VTK_BUILD_DIR }} \
121-
VT_TV_COVERAGE_ENABLED=${{ env.VT_TV_COVERAGE_ENABLED }} \
122-
VT_TV_OUTPUT_DIR="${{ env.VT_TV_OUTPUT_DIR }}" \
123-
bash ./ci/test.sh
85+
bash ./ci/test_cpp.sh ${{ github.workspace }} ${{ env.VT_TV_BUILD_DIR }}
12486
12587
- name: Build Python package (${{ join(matrix.host.python, ', ') }})
12688
run: |
127-
VTK_DIR=${{ env.VTK_BUILD_DIR }} bash ./ci/python_build.sh
89+
bash ./ci/python_build.sh
12890
12991
- name: Test Python bindings (${{ join(matrix.host.python) }})
13092
run: |
131-
VTK_DIR=${{ env.VTK_BUILD_DIR }} bash ./ci/python_test.sh
93+
bash ./ci/python_test.sh
13294
13395
- name: Collect artifacts
13496
run: |
@@ -140,17 +102,6 @@ jobs:
140102
echo "> add junit test report artifact"
141103
cp "junit-report.xml" ${{ env.VT_TV_ARTIFACTS_DIR }}/ || true
142104
143-
if [[ "${{ env.VT_TV_COVERAGE_ENABLED }}" == "ON" ]]; then
144-
echo "> add `coverage --list` file artifact"
145-
lcov --list lcov_vt-tv_test_no_deps.info > ${{ env.VT_TV_ARTIFACTS_DIR }}/lcov-list-report.txt
146-
147-
echo "> add total lines coverage file artifact (percentage of lines covered)"
148-
# might be useful for generating later a badge in ci
149-
LCOV_SUMMARY=$(lcov --summary lcov_vt-tv_test_no_deps.info)
150-
LCOV_TOTAL_LINES_COV=$(echo $LCOV_SUMMARY | grep -E -o 'lines......: ([0-9.]+)*' | grep -o -E '[0-9]+.[0-9]+')
151-
echo $LCOV_TOTAL_LINES_COV > lcov-lines-total.txt
152-
cp lcov-lines-total.txt ${{ env.VT_TV_ARTIFACTS_DIR }}/
153-
fi
154105
popd
155106
156107
echo "> add tests output mesh files and png artifacts"
@@ -165,7 +116,6 @@ jobs:
165116
popd
166117
167118
- name: Unit tests
168-
if: ${{ env.VT_TV_TESTS_ENABLED == 'ON' }}
169119
uses: phoenix-actions/test-reporting@v15
170120
with:
171121
name: Tests report

.github/workflows/build-and-test-ubuntu.yml

Lines changed: 0 additions & 136 deletions
This file was deleted.

0 commit comments

Comments
 (0)