Skip to content

Commit

Permalink
#43 prevent github actions top-level version override of VERSION file…
Browse files Browse the repository at this point in the history
…'s contents
  • Loading branch information
myselfhimself committed Oct 15, 2020
1 parent ea27ac4 commit 0efd9f8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cpythonmanylinuxbuildandreleaseontag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:
- uses: actions/checkout@v1
# Detect G'MIC target version from VERSION file
- name: Detect G'MIC target version
run: echo "::set-env name=GMIC_VERSION::$(cat VERSION)"
run: echo "::set-env name=GHA_GMIC_VERSION::$(bash build_tools.bash __get_py_package_version)"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: build, test packages on ${{ matrix.plat }} architecture and publish them to PyPI
- name: build, test packages on ${{ matrix.plat }} architecture and publish them to PyPI as version ${{ env.GHA_GMIC_VERSION }}
working-directory: ./
env:
TWINE_PASSWORD_GITHUB_SECRET: ${{ secrets.TWINE_PASSWORD_GITHUB_SECRET }} # For build_tools.bash 11_send_to_pypi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cpythonpythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ jobs:
if: env.HEAD_TAG != ''

- name: Detect G'MIC target version
run: echo "::set-env name=GMIC_VERSION::$(cat VERSION)"
run: echo "::set-env name=GHA_GMIC_VERSION::$(bash build_tools.bash __get_py_package_version)"

- name: Set up Python ${{ matrix.pythonversion }}
uses: actions/setup-python@v1
with:
pythonversion: ${{ matrix.pythonversion }}

- name: Compile and run tests on .so, .whl and source distribution of gmic-py ${{ env.GMIC_VERSION }}
- name: Compile and run tests on .so, .whl and source distribution of gmic-py ${{ env.GHA_GMIC_VERSION }}
working-directory: ./
env:
# TWINE_PASSWORD_GITHUB_SECRET: ${{ secrets.TWINE_PASSWORD_GITHUB_SECRET }} # For build_tools.bash 11_send_to_pypi
Expand Down
8 changes: 8 additions & 0 deletions build_tools.bash
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ echo "🐯 Targeting G'MIC $GMIC_VERSION (gmic.eu) as package $GMIC_PY_PACKAGE_V

export OMP_NUM_THREADS=16 # Fix for https://github.com/myselfhimself/gmic-py/issues/47

function __get_src_version () {
echo $GMIC_VERSION
}

function __get_py_package_version () {
echo $GMIC_PY_PACKAGE_VERSION
}

function 00_all_steps () {
# See related but defunct Dockerfile at https://github.com/myselfhimself/gmic-py/blob/fc12cb74f4b02fbfd83e9e9fba44ba7a4cee0d93/Dockerfile
21_check_c_style && 23_check_python_style && 1_clean_and_regrab_gmic_src && 2_compile && 3_test_compiled_so && 4_build_wheel && 5_test_wheel && 6_build_sdist && 7_test_sdist
Expand Down

0 comments on commit 0efd9f8

Please sign in to comment.