Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
69cccd8
update actions
patricklnz Feb 15, 2024
08fb60b
use pre-commit 3.0.1
patricklnz Feb 15, 2024
6a4e839
use manylinux_2_28
patricklnz Feb 15, 2024
ecf09a4
test python packages for min and max version
patricklnz Feb 15, 2024
0d0c69b
change artifact path to prevent duplicates
patricklnz Feb 15, 2024
f55c275
dont allow duplicate artifacts
patricklnz Feb 19, 2024
abd06de
Merge branch 'main' into 937-update-CI-actions
patricklnz Feb 19, 2024
381fd68
adjust to main
patricklnz Feb 19, 2024
2be2b6d
bug fxing of duplicate artifact names
patricklnz Feb 19, 2024
d06103b
seperate merging of artifacts
patricklnz Feb 19, 2024
a55d136
syntax error
patricklnz Feb 19, 2024
26bc0dd
typo
patricklnz Feb 19, 2024
57fa02d
use old container image for build py simulation
patricklnz Feb 19, 2024
930ceca
fix cpp gcc openmp test
patricklnz Feb 19, 2024
49695d5
change upload version of buildpysim
patricklnz Feb 19, 2024
e9682e7
fix
patricklnz Feb 19, 2024
11765c7
try if yml works
patricklnz Feb 19, 2024
a1909f2
windows test fail
patricklnz Feb 19, 2024
0e8d06f
yml syntax
patricklnz Feb 19, 2024
84c1d2d
using eq and ne
patricklnz Feb 19, 2024
1f20855
typo
patricklnz Feb 19, 2024
ddd04df
use if else
patricklnz Feb 19, 2024
844cc13
seperate jobs for simulation wheels
patricklnz Feb 19, 2024
b36efbe
test no 314
patricklnz Feb 19, 2024
0db2b83
fix mscv
patricklnz Feb 19, 2024
7c601ec
use download v3 for simulation package
patricklnz Feb 19, 2024
f59b2bc
typo
patricklnz Feb 19, 2024
dcdfae4
fixsurrogate
patricklnz Feb 19, 2024
1f224e8
codecov and pages depend on merging of artifacts
patricklnz Feb 19, 2024
a1eebeb
version of openmp
patricklnz Feb 19, 2024
91aa047
avoid duplicates in testpysurrogate
patricklnz Feb 19, 2024
846a3b6
comments
patricklnz Feb 19, 2024
60bfe8f
merge surrogate test artifacts
patricklnz Feb 19, 2024
7229e26
cpp win msvc
patricklnz Feb 19, 2024
40b7be7
typo
patricklnz Mar 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/actions/build-py/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,16 @@ runs:
cp dist/*.whl wheelhouse
fi
cp -r wheelhouse ..
- name: Upload Python Wheels
- name: Upload Python Wheels Simulation # See Issue #939
uses: actions/upload-artifact@v3
if: inputs.package == 'simulation'
with:
name: python-wheels-${{ inputs.package }}
path: pycode/wheelhouse
- name: Upload Python Wheels
uses: actions/upload-artifact@v4
if: inputs.package != 'simulation'
with:
name: python-wheels-${{ inputs.package }}
path: pycode/wheelhouse

4 changes: 2 additions & 2 deletions .github/actions/linux-benchmark/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ runs:
sudo apt-get -qq -y install libhdf5-10* wget gnupg lcov
sudo apt-get -qq update
- name: Download built test directory
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ inputs.build-artifact }}
path: cpp
Expand All @@ -30,7 +30,7 @@ runs:
sudo chmod a+x abm_benchmark
./abm_benchmark --benchmark_out="abm_benchmark.json" --benchmark_repetitions=10
- name: Upload benchmark result
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: abm-benchmark-report
path: cpp/build/bin/abm_benchmark.json
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/linux-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ runs:
cd cpp
tar -czf build.tar.gz build
- name: Upload built directory
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
#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
name: build-cpp-linux-${{ inputs.compiler }}-${{ inputs.version }}-${{ inputs.config }}${{ inputs.optional-dependencies == 'OFF' && '-nodep' || ''}}${{ inputs.openmp == 'ON' && '-omp' || ''}}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/linux-run_examples/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ runs:
sudo apt-get -qq -y install libhdf5-10* wget gnupg lcov
sudo apt-get -qq update
- name: Download examples directory
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ inputs.build-artifact }}
path: cpp
Expand Down
24 changes: 16 additions & 8 deletions .github/actions/linux-test/action.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
name: "Linux Test"
description: "Run the C++ unit tests on linux."
inputs:
build-artifact:
description: "Name of the build artifact that contains the unit test binary."
artifact-pattern:
description: "Name of the build artifact that contains the unit test binary, and coverage artifacts that will be uploaded."
required: true
coverage:
description: "Create coverage report (ON or OFF)"
required: false
default: "OFF"
optional-deps:
description: "Optional dependencies of unit test binary (ON or OFF, default ON). If OFF, adds `-nodep` to the artifact name."
required: false
default: "ON"
num-repeat:
description: "Repeat tests, e.g. to catch random failures like race conditions."
required: false
default: "1"
openmp:
description: "Enabled Multithreading with OpenMP (ON or OFF, default OFF). If ON, adds `-omp` to the name of the artifact."
required: false
default: "OFF"
runs:
using: "composite"
steps:
Expand All @@ -22,9 +30,9 @@ runs:
sudo apt-get -qq -y install libhdf5-10* wget gnupg lcov
sudo apt-get -qq update
- name: Download built test directory
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ inputs.build-artifact }}
name: build-cpp-linux-${{ inputs.artifact-pattern }}${{ inputs.optional-deps == 'OFF' && '-nodep' || ''}}${{ inputs.openmp == 'ON' && '-omp' || ''}}
path: cpp
- name: extract build archive
shell: bash
Expand All @@ -48,16 +56,16 @@ runs:
cmake --build . --target coverage/fast
fi
- name: Upload test report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: test-cpp-linux-report
name: test-cpp-linux-report-${{ inputs.artifact-pattern }}${{ inputs.optional-deps == 'OFF' && '-nodep' || ''}}${{ inputs.openmp == 'ON' && '-omp' || ''}}
path: cpp/build/bin/report.xml
if-no-files-found: error
retention-days: 1
- name: Upload coverage reports
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: test-cpp-coverage-reports
name: test-cpp-coverage-reports-${{ inputs.artifact-pattern }}${{ inputs.optional-deps == 'OFF' && '-nodep' || ''}}${{ inputs.openmp == 'ON' && '-omp' || ''}}
path: |
cpp/build/coverage.info
cpp/build/coverage
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/test-docs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ runs:
cd docs
doxygen
- name: Upload Documentation
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: documentation
path: docs/html
Expand Down
21 changes: 14 additions & 7 deletions .github/actions/test-py/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,32 @@ runs:
sudo apt-get -qq -y install python3-pip gnupg
fi
python -m pip install --upgrade pip
- name: Download Python Wheels
- name: Download Python Wheels Simulation
uses: actions/download-artifact@v3
if: inputs.package == 'simulation' #WORKAROUND! See Issue #939
with:
name: python-wheels-${{ inputs.package }}
path: pycode/wheelhouse
- name: Download Python Wheels
uses: actions/download-artifact@v4
if: inputs.package != 'simulation'
with:
name: python-wheels-${{ inputs.package }}
path: pycode/wheelhouse
- name: Download additional Python Wheels for plot package
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
if: inputs.package == 'plot'
with:
name: python-wheels-epidata
path: pycode/wheelhouse
- name: Download Python Wheels for surrogatemodel
uses: actions/download-artifact@v3
uses: actions/download-artifact@v3 #WORKAROUND! Upgrade to v4 asap. See Issue #939
if: inputs.package == 'surrogatemodel'
with:
name: python-wheels-simulation
path: pycode/wheelhouse
- name: Set up Python ${{ inputs.version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.version }}
- name: Install Python Wheels
Expand Down Expand Up @@ -80,11 +87,11 @@ runs:
gethospitalizationdata --help
fi
- name: Upload coverage reports
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: test-py-coverage-reports-${{ inputs.package }}
name: test-py-coverage-reports-${{ inputs.package }}-${{ inputs.version }}
path: |
pycode/memilio-${{ inputs.package }}/**/coverage_python.xml
pycode/memilio-${{ inputs.package }}/**/coverage_python_${{ inputs.version }}.xml
coverage_python
retention-days: 7
if-no-files-found: ${{ inputs.coverage == 'ON' && 'error' || 'ignore' }}
4 changes: 2 additions & 2 deletions .github/actions/test-pylint/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ runs:
sudo apt-get -qq -y install python3-pip gnupg
python -m pip install --upgrade pip
- name: Download Python Wheels
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: python-wheels-${{ inputs.package }}
- name: Install Python Wheels
Expand All @@ -31,7 +31,7 @@ runs:
python setup.py pylint
pylint-json2html -f jsonextended -o build_pylint/pylint.html < build_pylint/pylint_extended.json
- name: Upload Pylint Report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pylint-report-${{ inputs.package }}
path: pycode/memilio-${{ inputs.package }}/build_pylint/pylint.html
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/windows-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ runs:
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" ..
cmake --build . -- -j 4
- name: Upload built binary files
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
#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
name: build-cpp-windows-msvc-${{ inputs.version }}-${{ inputs.config }}${{ inputs.optional-dependencies == 'OFF' && '-nodep' || ''}}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/windows-run_examples/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ runs:
using: "composite"
steps:
- name: Download built example directory
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ inputs.build-artifact }}
path: cpp/build-win/bin
Expand Down
16 changes: 10 additions & 6 deletions .github/actions/windows-test/action.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
name: "Windows Test"
description: "Run the C++ unit tests on Windows"
inputs:
build-artifact:
description: "Name of the build artifact that contains the unit test binary."
artifact-pattern:
description: "Name of the build artifact that contains the unit test binary, will also be used for upload artifacts."
required: true
optional-deps:
description: "Optional dependencies of unit test binary (ON or OFF, default ON). If OFF, adds `-nodep` to the artifact name."
required: false
default: "ON"
runs:
using: "composite"
steps:
- name: Download built test directory
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ inputs.build-artifact }}
name: build-cpp-windows-${{ inputs.artifact-pattern }}${{ inputs.optional-deps == 'OFF' && '-nodep' || ''}}
path: cpp/build-win/bin
- name: Run unit tests
shell: pwsh
run: |
cd cpp/build-win/bin
.\memilio-test.exe --gtest_output="xml:report.xml"
- name: Upload report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: test-cpp-win-report
name: test-cpp-win-report-${{ inputs.artifact-pattern }}${{ inputs.optional-deps == 'OFF' && '-nodep' || ''}}
path: |
cpp/build-win/bin/report.xml
retention-days: 1
50 changes: 33 additions & 17 deletions .github/workflows/epidata_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,40 +22,42 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11
- uses: pre-commit/action@v3.0.0
- uses: pre-commit/action@v3.0.1

build-py-epidata:
runs-on: ubuntu-latest
container:
image: quay.io/pypa/manylinux2014_x86_64
container: quay.io/pypa/manylinux_2_28_x86_64
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/build-py
with:
package: epidata

build-py-plot:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
container:
image: quay.io/pypa/manylinux2014_x86_64
container: quay.io/pypa/manylinux_2_28_x86_64
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/build-py
with:
package: plot

test-py-epidata:
needs: build-py-epidata
strategy:
matrix:
version: ["3.8", "3.11"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/test-py
with:
version: ${{ matrix.version }}
package: epidata
coverage: ON

Expand All @@ -67,17 +69,31 @@ jobs:
version: ["3.8", "3.11"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/test-py
with:
version: ${{ matrix.version }}
package: plot
coverage: ON

merge-artifacts:
runs-on: ubuntu-latest
strategy:
matrix:
packages: [epidata, plot]
needs: [test-py-plot, test-py-epidata]
steps:
- name: merge epidata reports
uses: actions/upload-artifact/merge@v4
with:
name: test-py-coverage-reports-${{ matrix.packages }}
pattern: test-py-coverage-reports-${{ matrix.packages }}-*

test-pylint-epidata:
needs: build-py-epidata
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/test-pylint
with:
package: epidata
Expand All @@ -86,7 +102,7 @@ jobs:
needs: build-py-plot
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/test-pylint
with:
package: plot
Expand All @@ -96,19 +112,19 @@ jobs:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get -qq update
sudo apt-get -qq -y install python3-pip gnupg
python -m pip install --upgrade pip
- name: Download Python Wheels
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: python-wheels-epidata
path: pycode/wheelhouse
- name: Set up Python 3.11
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install Python Wheels
Expand All @@ -126,7 +142,7 @@ jobs:
getvaccinationdata -o data_dl --no-progress-indicators
gethospitalizationdata -o data_dl --no-progress-indicators
- name: Upload Data
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: data
path: |
Expand Down
Loading