From 2ab67a14cee18fe8945b4d8bc1b033e765ee8426 Mon Sep 17 00:00:00 2001 From: Roman Bredehoft Date: Fri, 5 Apr 2024 17:06:37 +0200 Subject: [PATCH] chore: allow to pick which licenses to run --- .github/workflows/update_licenses.yaml | 38 ++++++++++++++++--- .../fix_omp_issues_for_intel_mac.sh | 4 +- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/.github/workflows/update_licenses.yaml b/.github/workflows/update_licenses.yaml index 67dc8c7ad9..e91ac80996 100644 --- a/.github/workflows/update_licenses.yaml +++ b/.github/workflows/update_licenses.yaml @@ -2,6 +2,22 @@ name: Update licenses on: workflow_dispatch: + inputs: + linux: + description: "Update licenses for Ubuntu" + type: boolean + required: false + default: true + mac_silicon: + description: "Update licenses for macOS (silicon)" + type: boolean + required: false + default: true + mac_intel: + description: "Update licenses for macOS (intel)" + type: boolean + required: false + default: true concurrency: group: "${{ github.ref }}-${{ github.event_name }}-${{ github.workflow }}" @@ -13,10 +29,17 @@ jobs: strategy: matrix: config: - - {os_name: linux, os: ubuntu-20.04} - - {os_name: mac_intel, os: macos-latest-large} - - {os_name: mac_silicon, os: macos-latest-xlarge} - + - os_name: linux + os: ubuntu-latest + if: ${{ inputs.linux }} + - os_name: mac_silicon + os: macos-latest-xlarge + if: ${{ inputs.mac_silicon }} + - os_name: mac_intel + os: macos-latest-large + if: ${{ inputs.mac_intel }} + fail-fast: false + runs-on: ${{ matrix.config.os }} defaults: run: @@ -38,10 +61,13 @@ jobs: with: token: ${{ secrets.BOT_TOKEN }} - - name: Set up Python 3.8 + # Set up python 3.10 because Github does not seem to provide support for python 3.8 on arm64 + # List of available versions and architectures : + # https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json + - name: Set up Python 3.10 uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d with: - python-version: '3.8' + python-version: '3.10' - name: Install dependencies run: | diff --git a/script/make_utils/fix_omp_issues_for_intel_mac.sh b/script/make_utils/fix_omp_issues_for_intel_mac.sh index 8b8de64e68..c65069af6e 100755 --- a/script/make_utils/fix_omp_issues_for_intel_mac.sh +++ b/script/make_utils/fix_omp_issues_for_intel_mac.sh @@ -7,8 +7,10 @@ set -ex UNAME=$(uname) MACHINE=$(uname -m) +PYTHON_VERSION=$(python --version | cut -d' ' -f2 | cut -d'.' -f1,2) -if [ "$UNAME" == "Darwin" ] && [ "$MACHINE" != "arm64" ] +# The error does not seem to happen on python 3.10 (on MacOS 13.6.6) +if [ "$UNAME" == "Darwin" ] && [ "$MACHINE" != "arm64" ] && [ "$PYTHON_VERSION" != "3.10"] then # We need to source the venv here, since it's not done in the CI