Skip to content

Commit

Permalink
chore: allow to pick which licenses to run
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanBredehoft committed Apr 8, 2024
1 parent 6d7f3e6 commit 2ab67a1
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 7 deletions.
38 changes: 32 additions & 6 deletions .github/workflows/update_licenses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand All @@ -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:
Expand All @@ -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: |
Expand Down
4 changes: 3 additions & 1 deletion script/make_utils/fix_omp_issues_for_intel_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2ab67a1

Please sign in to comment.