Skip to content

Commit aca4b34

Browse files
authored
937 update CI actions (#938)
- updated CI actions to latest releases - container image for python wheels was updated - test epidata for min and max python version
1 parent 69a6b68 commit aca4b34

File tree

13 files changed

+160
-91
lines changed

13 files changed

+160
-91
lines changed

.github/actions/build-py/action.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,16 @@ runs:
3030
cp dist/*.whl wheelhouse
3131
fi
3232
cp -r wheelhouse ..
33-
- name: Upload Python Wheels
33+
- name: Upload Python Wheels Simulation # See Issue #939
3434
uses: actions/upload-artifact@v3
35+
if: inputs.package == 'simulation'
36+
with:
37+
name: python-wheels-${{ inputs.package }}
38+
path: pycode/wheelhouse
39+
- name: Upload Python Wheels
40+
uses: actions/upload-artifact@v4
41+
if: inputs.package != 'simulation'
3542
with:
3643
name: python-wheels-${{ inputs.package }}
3744
path: pycode/wheelhouse
45+

.github/actions/linux-benchmark/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ runs:
1414
sudo apt-get -qq -y install libhdf5-10* wget gnupg lcov
1515
sudo apt-get -qq update
1616
- name: Download built test directory
17-
uses: actions/download-artifact@v3
17+
uses: actions/download-artifact@v4
1818
with:
1919
name: ${{ inputs.build-artifact }}
2020
path: cpp
@@ -30,7 +30,7 @@ runs:
3030
sudo chmod a+x abm_benchmark
3131
./abm_benchmark --benchmark_out="abm_benchmark.json" --benchmark_repetitions=10
3232
- name: Upload benchmark result
33-
uses: actions/upload-artifact@v3
33+
uses: actions/upload-artifact@v4
3434
with:
3535
name: abm-benchmark-report
3636
path: cpp/build/bin/abm_benchmark.json

.github/actions/linux-build/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ runs:
9797
cd cpp
9898
tar -czf build.tar.gz build
9999
- name: Upload built directory
100-
uses: actions/upload-artifact@v3
100+
uses: actions/upload-artifact@v4
101101
with:
102102
#artifacts in one pipeline must have a different name, so options must add a suffix to the artifact name if different values are used in the same pipeline
103103
name: build-cpp-linux-${{ inputs.compiler }}-${{ inputs.version }}-${{ inputs.config }}${{ inputs.optional-dependencies == 'OFF' && '-nodep' || ''}}${{ inputs.openmp == 'ON' && '-omp' || ''}}

.github/actions/linux-run_examples/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ runs:
1414
sudo apt-get -qq -y install libhdf5-10* wget gnupg lcov
1515
sudo apt-get -qq update
1616
- name: Download examples directory
17-
uses: actions/download-artifact@v3
17+
uses: actions/download-artifact@v4
1818
with:
1919
name: ${{ inputs.build-artifact }}
2020
path: cpp

.github/actions/linux-test/action.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
11
name: "Linux Test"
22
description: "Run the C++ unit tests on linux."
33
inputs:
4-
build-artifact:
5-
description: "Name of the build artifact that contains the unit test binary."
4+
artifact-pattern:
5+
description: "Name of the build artifact that contains the unit test binary, and coverage artifacts that will be uploaded."
66
required: true
77
coverage:
88
description: "Create coverage report (ON or OFF)"
99
required: false
1010
default: "OFF"
11+
optional-deps:
12+
description: "Optional dependencies of unit test binary (ON or OFF, default ON). If OFF, adds `-nodep` to the artifact name."
13+
required: false
14+
default: "ON"
1115
num-repeat:
1216
description: "Repeat tests, e.g. to catch random failures like race conditions."
1317
required: false
1418
default: "1"
19+
openmp:
20+
description: "Enabled Multithreading with OpenMP (ON or OFF, default OFF). If ON, adds `-omp` to the name of the artifact."
21+
required: false
22+
default: "OFF"
1523
runs:
1624
using: "composite"
1725
steps:
@@ -22,9 +30,9 @@ runs:
2230
sudo apt-get -qq -y install libhdf5-10* wget gnupg lcov
2331
sudo apt-get -qq update
2432
- name: Download built test directory
25-
uses: actions/download-artifact@v3
33+
uses: actions/download-artifact@v4
2634
with:
27-
name: ${{ inputs.build-artifact }}
35+
name: build-cpp-linux-${{ inputs.artifact-pattern }}${{ inputs.optional-deps == 'OFF' && '-nodep' || ''}}${{ inputs.openmp == 'ON' && '-omp' || ''}}
2836
path: cpp
2937
- name: extract build archive
3038
shell: bash
@@ -48,16 +56,16 @@ runs:
4856
cmake --build . --target coverage/fast
4957
fi
5058
- name: Upload test report
51-
uses: actions/upload-artifact@v3
59+
uses: actions/upload-artifact@v4
5260
with:
53-
name: test-cpp-linux-report
61+
name: test-cpp-linux-report-${{ inputs.artifact-pattern }}${{ inputs.optional-deps == 'OFF' && '-nodep' || ''}}${{ inputs.openmp == 'ON' && '-omp' || ''}}
5462
path: cpp/build/bin/report.xml
5563
if-no-files-found: error
5664
retention-days: 1
5765
- name: Upload coverage reports
58-
uses: actions/upload-artifact@v3
66+
uses: actions/upload-artifact@v4
5967
with:
60-
name: test-cpp-coverage-reports
68+
name: test-cpp-coverage-reports-${{ inputs.artifact-pattern }}${{ inputs.optional-deps == 'OFF' && '-nodep' || ''}}${{ inputs.openmp == 'ON' && '-omp' || ''}}
6169
path: |
6270
cpp/build/coverage.info
6371
cpp/build/coverage

.github/actions/test-docs/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ runs:
1414
cd docs
1515
doxygen
1616
- name: Upload Documentation
17-
uses: actions/upload-artifact@v3
17+
uses: actions/upload-artifact@v4
1818
with:
1919
name: documentation
2020
path: docs/html

.github/actions/test-py/action.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,32 @@ runs:
2525
sudo apt-get -qq -y install python3-pip gnupg
2626
fi
2727
python -m pip install --upgrade pip
28-
- name: Download Python Wheels
28+
- name: Download Python Wheels Simulation
2929
uses: actions/download-artifact@v3
30+
if: inputs.package == 'simulation' #WORKAROUND! See Issue #939
31+
with:
32+
name: python-wheels-${{ inputs.package }}
33+
path: pycode/wheelhouse
34+
- name: Download Python Wheels
35+
uses: actions/download-artifact@v4
36+
if: inputs.package != 'simulation'
3037
with:
3138
name: python-wheels-${{ inputs.package }}
3239
path: pycode/wheelhouse
3340
- name: Download additional Python Wheels for plot package
34-
uses: actions/download-artifact@v3
41+
uses: actions/download-artifact@v4
3542
if: inputs.package == 'plot'
3643
with:
3744
name: python-wheels-epidata
3845
path: pycode/wheelhouse
3946
- name: Download Python Wheels for surrogatemodel
40-
uses: actions/download-artifact@v3
47+
uses: actions/download-artifact@v3 #WORKAROUND! Upgrade to v4 asap. See Issue #939
4148
if: inputs.package == 'surrogatemodel'
4249
with:
4350
name: python-wheels-simulation
4451
path: pycode/wheelhouse
4552
- name: Set up Python ${{ inputs.version }}
46-
uses: actions/setup-python@v4
53+
uses: actions/setup-python@v5
4754
with:
4855
python-version: ${{ inputs.version }}
4956
- name: Install Python Wheels
@@ -80,11 +87,11 @@ runs:
8087
gethospitalizationdata --help
8188
fi
8289
- name: Upload coverage reports
83-
uses: actions/upload-artifact@v3
90+
uses: actions/upload-artifact@v4
8491
with:
85-
name: test-py-coverage-reports-${{ inputs.package }}
92+
name: test-py-coverage-reports-${{ inputs.package }}-${{ inputs.version }}
8693
path: |
87-
pycode/memilio-${{ inputs.package }}/**/coverage_python.xml
94+
pycode/memilio-${{ inputs.package }}/**/coverage_python_${{ inputs.version }}.xml
8895
coverage_python
8996
retention-days: 7
9097
if-no-files-found: ${{ inputs.coverage == 'ON' && 'error' || 'ignore' }}

.github/actions/test-pylint/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ runs:
1414
sudo apt-get -qq -y install python3-pip gnupg
1515
python -m pip install --upgrade pip
1616
- name: Download Python Wheels
17-
uses: actions/download-artifact@v3
17+
uses: actions/download-artifact@v4
1818
with:
1919
name: python-wheels-${{ inputs.package }}
2020
- name: Install Python Wheels
@@ -31,7 +31,7 @@ runs:
3131
python setup.py pylint
3232
pylint-json2html -f jsonextended -o build_pylint/pylint.html < build_pylint/pylint_extended.json
3333
- name: Upload Pylint Report
34-
uses: actions/upload-artifact@v3
34+
uses: actions/upload-artifact@v4
3535
with:
3636
name: pylint-report-${{ inputs.package }}
3737
path: pycode/memilio-${{ inputs.package }}/build_pylint/pylint.html

.github/actions/windows-build/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ runs:
5151
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=${{ inputs.config }} -DMEMILIO_USE_BUNDLED_JSONCPP=${{ inputs.optional-dependencies }} -DHDF5_USE_STATIC_LIBRARIES=ON -DHDF5_DIR="${{github.workspace}}/hdf5/share/cmake/hdf5" ..
5252
cmake --build . -- -j 4
5353
- name: Upload built binary files
54-
uses: actions/upload-artifact@v3
54+
uses: actions/upload-artifact@v4
5555
with:
5656
#artifacts in one pipeline must have a different name, so options must add a suffix to the artifact name if different values are used in the same pipeline
5757
name: build-cpp-windows-msvc-${{ inputs.version }}-${{ inputs.config }}${{ inputs.optional-dependencies == 'OFF' && '-nodep' || ''}}

.github/actions/windows-run_examples/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ runs:
88
using: "composite"
99
steps:
1010
- name: Download built example directory
11-
uses: actions/download-artifact@v3
11+
uses: actions/download-artifact@v4
1212
with:
1313
name: ${{ inputs.build-artifact }}
1414
path: cpp/build-win/bin

0 commit comments

Comments
 (0)