Skip to content

Commit

Permalink
Use macos-14 for M1
Browse files Browse the repository at this point in the history
3.9 is not available for M1
Remove x86 architecture force choice
  • Loading branch information
tbaudier committed Sep 5, 2024
1 parent efe5f3a commit a9705da
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-12, windows-latest]
python-version: [3.8, 3.9, '3.10', '3.11']
os: [ubuntu-latest, macos-12, macos-14, windows-latest]
python-version: [3.9, '3.10', '3.11']
exclude:
- os: macos-14
python-version: 3.9

env:
GEANT4_VERSION: 'v11.2.1'
Expand All @@ -33,7 +36,7 @@ jobs:
if [[ ${{ matrix.os }} == "ubuntu-latest" ]]; then
export GIT_SSL_NO_VERIFY=1
git submodule update --init --recursive
elif [[ ${{ matrix.os }} == "macos-12" ]]; then
elif [[ ${{ matrix.os }} == "macos-12" || ${{ matrix.os }} == "macos-14" ]]; then
export GIT_SSL_NO_VERIFY=1
git submodule update --init --recursive
else
Expand All @@ -44,7 +47,6 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
- name: Get OS version
id: get-os-version
shell: bash -l {0}
Expand All @@ -53,7 +55,7 @@ jobs:
varOS=`cat /etc/os-release | grep "VERSION=" | grep -oP '(?<=\").*?(?=\")'`
varOS=($varOS)
echo "release=${varOS[0]}" >> $GITHUB_OUTPUT
elif [[ ${{ matrix.os }} == "macos-12" ]]; then
elif [[ ${{ matrix.os }} == "macos-12" || ${{ matrix.os }} == "macos-14" ]]; then
varOS=`sw_vers | grep "ProductVersion:"`
varOS="${varOS#*:}"
echo "release=${varOS:1}" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -103,18 +105,18 @@ jobs:
mv dist_opengate/* dist/
fi
- uses: conda-incubator/setup-miniconda@v3
if: (matrix.os == 'macos-12') || (matrix.os == 'windows-latest')
if: (matrix.os == 'macos-12') || (matrix.os == 'macos-14') || (matrix.os == 'windows-latest')
with:
miniconda-version: "latest"
auto-update-conda: true
activate-environment: opengate_core
python-version: ${{ matrix.python-version }}
- name: Set up Homebrew
if: matrix.os == 'macos-12'
if: (matrix.os == 'macos-12') || (matrix.os == 'macos-14')
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Create opengate_core Wheel Mac
if: matrix.os == 'macos-12'
if: (matrix.os == 'macos-12') || (matrix.os == 'macos-14')
shell: bash -l {0}
run: |
brew install python@3.12 || true
Expand Down Expand Up @@ -312,7 +314,6 @@ jobs:
# uses: actions/setup-python@v5
# with:
# python-version: 3.9
# architecture: 'x64'
# - name: Get OS version
# id: get-os-version
# shell: bash -l {0}
Expand Down Expand Up @@ -348,8 +349,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-12, windows-latest]
python-version: [3.8, 3.9, '3.10', '3.11']
os: [ubuntu-latest, macos-12, macos-14, windows-latest]
python-version: [3.9, '3.10', '3.11']
exclude:
- os: macos-14
python-version: 3.9
steps:
- uses: actions/download-artifact@v4
with:
Expand All @@ -360,7 +364,6 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
- name: Run tests
shell: bash {0}
run: |
Expand All @@ -379,7 +382,7 @@ jobs:
export OSNAME="manylinux"
export PLATFORM="x86_"
pip install torch --extra-index-url https://download.pytorch.org/whl/cpu
elif [[ ${{ matrix.os }} == "macos-12" ]]; then
elif [[ ${{ matrix.os }} == "macos-12" || ${{ matrix.os }} == "macos-14"]]; then
export OSNAME="macosx"
export PLATFORM="x86_"
which python
Expand Down

0 comments on commit a9705da

Please sign in to comment.