You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/09/13 15:34:31 UTC

[GitHub] [beam] dannymartinm commented on a diff in pull request #23136: [GitHub Actions] - Updates in Build Wheels to runs-on Self-hosted runners

dannymartinm commented on code in PR #23136:
URL: https://github.com/apache/beam/pull/23136#discussion_r969785896


##########
.github/workflows/build_wheels.yml:
##########
@@ -249,8 +254,8 @@ jobs:
         CIBW_BEFORE_BUILD: pip install cython && pip install --upgrade setuptools
       run: cibuildwheel --print-build-identifiers && cibuildwheel --output-dir wheelhouse
       shell: bash
-    - name: install sha512sum on MacOS
-      if: startsWith(matrix.os_python.os, 'macos')
+    - name: Install sha512sum on MacOS
+      if: contains(matrix.os_python.os, 'macos-latest')

Review Comment:
   As we have different operating systems and tags in the self-hosted runners, we added an array for pointing to the required runner `[[self-hosted, ubuntu-20.04], macos-latest, [self-hosted, windows-server-2019]]` instead of using strings. That's why we needed to change from `startsWith` to `contains`. 
   
   According to the [documentation](https://docs.github.com/en/actions/learn-github-actions/expressions#contains), `contains` only works
   
   > If search is an array, this function returns true if the item is an element in the array. 
   
   Forcing us to use the full word in the comparison in order to return `true`. 
   
   In the following, you can find some tests that we did yesterday using `macos-latest` and `macos`. 
   * [macos-latest](https://github.com/sre-apache-beam-dev/beam/actions/runs/3041599478/workflow#L258)
   * [macos](https://github.com/sre-apache-beam-dev/beam/actions/runs/3041505275/workflow#L258)
   
   Please let us know your comments.
   
   Thank you!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org