From 05547d82a48de05f015dae22661e42c0684e81f2 Mon Sep 17 00:00:00 2001 From: Wilson Lin Date: Tue, 21 Jan 2020 00:15:26 +1100 Subject: [PATCH] Fix naming of Windows native module files --- .github/workflows/python.yml | 11 +++++++++-- .github/workflows/ruby.yml | 10 ++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 8a8c93f..2148e99 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -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 diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index d5508dd..ed014b7 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -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