Skip to content

Commit

Permalink
GH-Actions: Changes after review
Browse files Browse the repository at this point in the history
- removed superfluous openmp line
- added fortran build on ubuntu
- added rocked to deploy step
- more consisten naming of steps
  • Loading branch information
Moritz committed Aug 12, 2021
1 parent 4400f46 commit 4c0e8ce
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/ci.yml
Expand Up @@ -12,7 +12,6 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
build-type: [Release, Debug]
openmp: [false]
name-suffix: [""]
include:
- build-type: Debug
Expand All @@ -34,7 +33,12 @@ jobs:
- name: ⚙ Configure
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CMAKE_FLAGS
run: |
if [ "${{ matrix.os }}" == "ubuntu-latest" ]
then
export CMAKE_FLAGS=$CMAKE_FLAGS -DOVF_BUILD_FORTRAN_BINDINGS=ON
fi
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CMAKE_FLAGS
- name: 🛠 Build
shell: bash
Expand All @@ -58,15 +62,15 @@ jobs:
with:
python-version: '3.x'

- name: Create build folder
- name: 📁 Create build folder
run: cmake -E make_directory ${{runner.workspace}}/build

- name: configure
- name: ⚙ Configure
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CMAKE_FLAGS

- name: build
- name: 🛠 Build
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config Release -j 2
Expand All @@ -78,7 +82,7 @@ jobs:
sudo apt update
sudo apt install lcov
- name: generate C++ coverage
- name: Generate C++ coverage
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
Expand All @@ -87,7 +91,8 @@ jobs:
lcov -c --no-external --directory . --base-directory $GITHUB_WORKSPACE -o after_test.info
lcov -a baseline.info -a after_test.info -o total_test.info
lcov -r total_test.info \*thirdparty\* \*/test/\* \*Collection\* \*DLL_\* -o coverage.info
- name: upload C++ coverage
- name: Upload C++ coverage
uses: codecov/codecov-action@v1
with:
files: ${{runner.workspace}}/build/coverage.info
Expand Down Expand Up @@ -130,12 +135,12 @@ jobs:
- name: Create build folder
run: cmake -E make_directory ${{runner.workspace}}/build

- name: configure
- name: ⚙ Configure
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CMAKE_FLAGS

- name: build
- name: 🛠 Build
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config $BUILD_TYPE -j 2
Expand All @@ -145,23 +150,23 @@ jobs:
python -m pip install --upgrade pip
python -m pip install numpy setuptools wheel twine
- name: build Python package
- name: Build python package
shell: bash
working-directory: ./python
run: |
echo "Python package build"
echo "Add suffix to ovf version tag for python package $OVF_ADD_VERSION_SUFFIX"
python setup.py sdist bdist_wheel
- name: Deploy to TestPyPI
- name: 🚀 Deploy to TestPyPI
working-directory: ./python
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
if: github.ref != 'refs/heads/master'
run: twine upload --skip-existing --repository testpypi dist/*

- name: Deploy to PyPI
- name: 🚀 Deploy to PyPI
working-directory: ./python
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
Expand Down

0 comments on commit 4c0e8ce

Please sign in to comment.