Fix naming of Windows native module files

This commit is contained in:
Wilson Lin 2020-01-21 00:15:26 +11:00
parent fcaa7ba22b
commit 05547d82a4
2 changed files with 17 additions and 4 deletions

View File

@ -31,6 +31,13 @@ jobs:
id: version
shell: bash
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v}
- name: Get native module file name
id: native_file
shell: bash
env:
PYTHON_VERSION: ${{ matrix.python }}
# PowerShell doesn't support `${...}` syntax.
run: echo ::set-output name=NAME::${{ matrix.ARCH }}-${PYTHON_VERSION//./_}/hyperbuild.${{ matrix.PYEXT }}
- name: Set up Python
uses: actions/setup-python@v1
with:
@ -51,9 +58,8 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-west-2
PYTHON_VERSION: ${{ matrix.python }}
# Convert dots to underscores in Python version as Python uses dots to represent import hierarchy.
run: aws s3 cp ./python/target/release/${{ matrix.LIBFILE }} s3://${{ secrets.AWS_S3_BUCKET }}/hyperbuild/bin/python/${{ steps.version.outputs.VERSION }}/${{ matrix.ARCH }}-${PYTHON_VERSION//./_}/hyperbuild.${{ matrix.PYEXT }}
run: aws s3 cp ./python/target/release/${{ matrix.LIBFILE }} s3://${{ secrets.AWS_S3_BUCKET }}/hyperbuild/bin/python/${{ steps.version.outputs.VERSION }}/${{ steps.native_file.outputs.NAME }}
package:
runs-on: ubuntu-latest
needs: build
@ -70,6 +76,7 @@ jobs:
architecture: 'x64'
- name: Install Python dependencies
# chrislennon/action-aws-cli@v1.1 interferes with installed Python libraries.
# Installing using pip seems to be more reliable when done individually.
run: |
pip install --upgrade awscli
pip install --upgrade wheel

View File

@ -28,6 +28,13 @@ jobs:
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
EOF
- name: Get native module file name
id: native_file
shell: bash
env:
RUBY_VERSION: ${{ matrix.ruby }}
# PowerShell doesn't support `${...}` syntax.
run: echo ::set-output name=NAME::${{ matrix.ARCH }}-ruby${RUBY_VERSION%.*}
- name: Set up rbenv (macOS)
if: runner.os == 'macOS'
shell: bash -l {0}
@ -60,8 +67,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-west-2
RUBY_VERSION: ${{ matrix.ruby }}
run: aws s3 cp ./ruby/target/release/${{ matrix.FILE }} s3://${{ secrets.AWS_S3_BUCKET }}/hyperbuild/bin/ruby/${{ steps.version.outputs.VERSION }}/${{ matrix.ARCH }}-ruby${RUBY_VERSION%.*}
run: aws s3 cp ./ruby/target/release/${{ matrix.FILE }} s3://${{ secrets.AWS_S3_BUCKET }}/hyperbuild/bin/ruby/${{ steps.version.outputs.VERSION }}/${{ steps.native_file.outputs.NAME }}
package:
runs-on: ubuntu-latest
needs: build