From f64a83459b19e0ef5efad2f25f0c64e6ce639923 Mon Sep 17 00:00:00 2001 From: Marc Lanctot Date: Thu, 5 Dec 2024 10:07:52 -0330 Subject: [PATCH 01/18] Update install.sh to fix Github Actions CI Previous command to check python version is failing --- open_spiel/scripts/install.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/open_spiel/scripts/install.sh b/open_spiel/scripts/install.sh index 24d72a1f91..6fbda281c4 100755 --- a/open_spiel/scripts/install.sh +++ b/open_spiel/scripts/install.sh @@ -33,6 +33,14 @@ ${PYBIN} --version MYDIR="$(dirname "$(realpath "$0")")" +function check_install_python() { + output=$(brew list --versions | grep "python ${OS_PYTHON_VERSION}") + if [[ "$output" = "" ]]; then + brew install "python@${OS_PYTHON_VERSION}" + fi + return 0 +} + # Calling this file from the project root is not allowed, # as all the paths here are hard-coded to be relative to it. # @@ -288,10 +296,7 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then # Mac OSX # On Github Actions, macOS comes with Python 3.9. # We want to test multiple Python versions determined by OS_PYTHON_VERSION. if [[ "$CI" ]]; then - # Only install the python version if it's not present. There are issues otherwise. - if [[ `brew list python@${OS_PYTHON_VERSION}; echo $?` == 0 ]]; then - brew install "python@${OS_PYTHON_VERSION}" - fi + check_install_python # Uninstall Python 3.9 if we need to. brew link --force --overwrite "python@${OS_PYTHON_VERSION}" fi From 54fba73ce919df854b8293fc63203a4c45d9bfc7 Mon Sep 17 00:00:00 2001 From: Marc Lanctot Date: Thu, 5 Dec 2024 10:16:43 -0330 Subject: [PATCH 02/18] Update install.sh --- open_spiel/scripts/install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/open_spiel/scripts/install.sh b/open_spiel/scripts/install.sh index 6fbda281c4..51e10d4858 100755 --- a/open_spiel/scripts/install.sh +++ b/open_spiel/scripts/install.sh @@ -34,7 +34,9 @@ ${PYBIN} --version MYDIR="$(dirname "$(realpath "$0")")" function check_install_python() { - output=$(brew list --versions | grep "python ${OS_PYTHON_VERSION}") + # Need the trap here to make sure the return value of grep being 1 doesn't cause set -e to fail + # https://stackoverflow.com/questions/77047127/bash-capture-stderr-of-a-function-while-using-trap + trap 'ret=0; output=$(brew list --versions | grep "python ${OS_PYTHON_VERSION}") || ret="$?"; trap - RETURN' RETURN if [[ "$output" = "" ]]; then brew install "python@${OS_PYTHON_VERSION}" fi From e0e4841fa1186a134fb6d267fc00521188e9a5e7 Mon Sep 17 00:00:00 2001 From: Marc Lanctot Date: Thu, 5 Dec 2024 10:20:51 -0330 Subject: [PATCH 03/18] Update install.sh --- open_spiel/scripts/install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/open_spiel/scripts/install.sh b/open_spiel/scripts/install.sh index 51e10d4858..d8ec2f8d73 100755 --- a/open_spiel/scripts/install.sh +++ b/open_spiel/scripts/install.sh @@ -36,6 +36,7 @@ MYDIR="$(dirname "$(realpath "$0")")" function check_install_python() { # Need the trap here to make sure the return value of grep being 1 doesn't cause set -e to fail # https://stackoverflow.com/questions/77047127/bash-capture-stderr-of-a-function-while-using-trap + rm -f /usr/local/bin/2to3-3.11 trap 'ret=0; output=$(brew list --versions | grep "python ${OS_PYTHON_VERSION}") || ret="$?"; trap - RETURN' RETURN if [[ "$output" = "" ]]; then brew install "python@${OS_PYTHON_VERSION}" From 65d7dfd15724cf67cf520d37f9471f720f975dc8 Mon Sep 17 00:00:00 2001 From: Marc Lanctot Date: Thu, 5 Dec 2024 10:23:49 -0330 Subject: [PATCH 04/18] Update install.sh --- open_spiel/scripts/install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/open_spiel/scripts/install.sh b/open_spiel/scripts/install.sh index d8ec2f8d73..52e3f02ec2 100755 --- a/open_spiel/scripts/install.sh +++ b/open_spiel/scripts/install.sh @@ -37,6 +37,7 @@ function check_install_python() { # Need the trap here to make sure the return value of grep being 1 doesn't cause set -e to fail # https://stackoverflow.com/questions/77047127/bash-capture-stderr-of-a-function-while-using-trap rm -f /usr/local/bin/2to3-3.11 + rm -f /usr/local/bin/idle3.11 trap 'ret=0; output=$(brew list --versions | grep "python ${OS_PYTHON_VERSION}") || ret="$?"; trap - RETURN' RETURN if [[ "$output" = "" ]]; then brew install "python@${OS_PYTHON_VERSION}" From 2b414934f8b8d22b387976b7c87a9f1e016e72b9 Mon Sep 17 00:00:00 2001 From: Marc Lanctot Date: Thu, 5 Dec 2024 10:30:34 -0330 Subject: [PATCH 05/18] Update install.sh --- open_spiel/scripts/install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/open_spiel/scripts/install.sh b/open_spiel/scripts/install.sh index 52e3f02ec2..70e794e72f 100755 --- a/open_spiel/scripts/install.sh +++ b/open_spiel/scripts/install.sh @@ -300,8 +300,7 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then # Mac OSX # On Github Actions, macOS comes with Python 3.9. # We want to test multiple Python versions determined by OS_PYTHON_VERSION. if [[ "$CI" ]]; then - check_install_python - # Uninstall Python 3.9 if we need to. + # Set brew to use the specific python version brew link --force --overwrite "python@${OS_PYTHON_VERSION}" fi `python3 -c "import tkinter" > /dev/null 2>&1` || brew install tcl-tk || echo "** Warning: failed 'brew install tcl-tk' -- continuing" From 2e60cd729ba4dc927ed44ae9b908ddd9c5eae18d Mon Sep 17 00:00:00 2001 From: Marc Lanctot Date: Thu, 5 Dec 2024 10:33:33 -0330 Subject: [PATCH 06/18] Update install.sh --- open_spiel/scripts/install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/open_spiel/scripts/install.sh b/open_spiel/scripts/install.sh index 70e794e72f..d1de3498dd 100755 --- a/open_spiel/scripts/install.sh +++ b/open_spiel/scripts/install.sh @@ -38,6 +38,7 @@ function check_install_python() { # https://stackoverflow.com/questions/77047127/bash-capture-stderr-of-a-function-while-using-trap rm -f /usr/local/bin/2to3-3.11 rm -f /usr/local/bin/idle3.11 + rm -f /usr/local/bin/pydoc3.11 trap 'ret=0; output=$(brew list --versions | grep "python ${OS_PYTHON_VERSION}") || ret="$?"; trap - RETURN' RETURN if [[ "$output" = "" ]]; then brew install "python@${OS_PYTHON_VERSION}" @@ -301,6 +302,7 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then # Mac OSX # We want to test multiple Python versions determined by OS_PYTHON_VERSION. if [[ "$CI" ]]; then # Set brew to use the specific python version + check_install_python brew link --force --overwrite "python@${OS_PYTHON_VERSION}" fi `python3 -c "import tkinter" > /dev/null 2>&1` || brew install tcl-tk || echo "** Warning: failed 'brew install tcl-tk' -- continuing" From 9cf7276e74da5cfb210889804e355597fa1e24b0 Mon Sep 17 00:00:00 2001 From: Marc Lanctot Date: Thu, 5 Dec 2024 10:35:34 -0330 Subject: [PATCH 07/18] Update install.sh --- open_spiel/scripts/install.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/open_spiel/scripts/install.sh b/open_spiel/scripts/install.sh index d1de3498dd..316df1af71 100755 --- a/open_spiel/scripts/install.sh +++ b/open_spiel/scripts/install.sh @@ -33,12 +33,14 @@ ${PYBIN} --version MYDIR="$(dirname "$(realpath "$0")")" +# This function is only run on Github Actions! function check_install_python() { # Need the trap here to make sure the return value of grep being 1 doesn't cause set -e to fail # https://stackoverflow.com/questions/77047127/bash-capture-stderr-of-a-function-while-using-trap - rm -f /usr/local/bin/2to3-3.11 - rm -f /usr/local/bin/idle3.11 - rm -f /usr/local/bin/pydoc3.11 + rm -f /usr/local/bin/2to3-${OS_PYTHON_VERSION} + rm -f /usr/local/bin/idle${OS_PYTHON_VERSION} + rm -f /usr/local/bin/pydoc${OS_PYTHON_VERSION} + rm -f /usr/local/bin/python${OS_PYTHON_VERSION} trap 'ret=0; output=$(brew list --versions | grep "python ${OS_PYTHON_VERSION}") || ret="$?"; trap - RETURN' RETURN if [[ "$output" = "" ]]; then brew install "python@${OS_PYTHON_VERSION}" From 3e9c68e680ca5892d0f3f15b20855fec2f6811dd Mon Sep 17 00:00:00 2001 From: Marc Lanctot Date: Thu, 5 Dec 2024 10:48:07 -0330 Subject: [PATCH 08/18] Update install.sh --- open_spiel/scripts/install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/open_spiel/scripts/install.sh b/open_spiel/scripts/install.sh index 316df1af71..f81866b0bc 100755 --- a/open_spiel/scripts/install.sh +++ b/open_spiel/scripts/install.sh @@ -41,6 +41,7 @@ function check_install_python() { rm -f /usr/local/bin/idle${OS_PYTHON_VERSION} rm -f /usr/local/bin/pydoc${OS_PYTHON_VERSION} rm -f /usr/local/bin/python${OS_PYTHON_VERSION} + rm -f /usr/local/bin/python${OS_PYTHON_VERSION}-config trap 'ret=0; output=$(brew list --versions | grep "python ${OS_PYTHON_VERSION}") || ret="$?"; trap - RETURN' RETURN if [[ "$output" = "" ]]; then brew install "python@${OS_PYTHON_VERSION}" From 426892ec0d3e1d787f083fbdd9cc1039b1ea73db Mon Sep 17 00:00:00 2001 From: Marc Lanctot Date: Thu, 5 Dec 2024 10:48:28 -0330 Subject: [PATCH 09/18] Update install.sh --- open_spiel/scripts/install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/open_spiel/scripts/install.sh b/open_spiel/scripts/install.sh index f81866b0bc..62ee8c6f56 100755 --- a/open_spiel/scripts/install.sh +++ b/open_spiel/scripts/install.sh @@ -40,8 +40,7 @@ function check_install_python() { rm -f /usr/local/bin/2to3-${OS_PYTHON_VERSION} rm -f /usr/local/bin/idle${OS_PYTHON_VERSION} rm -f /usr/local/bin/pydoc${OS_PYTHON_VERSION} - rm -f /usr/local/bin/python${OS_PYTHON_VERSION} - rm -f /usr/local/bin/python${OS_PYTHON_VERSION}-config + rm -f /usr/local/bin/python${OS_PYTHON_VERSION}* trap 'ret=0; output=$(brew list --versions | grep "python ${OS_PYTHON_VERSION}") || ret="$?"; trap - RETURN' RETURN if [[ "$output" = "" ]]; then brew install "python@${OS_PYTHON_VERSION}" From 7f0d66ccd7c3d7964b735dd94e63c117e92b1ae1 Mon Sep 17 00:00:00 2001 From: Marc Lanctot Date: Thu, 5 Dec 2024 10:51:05 -0330 Subject: [PATCH 10/18] Update install.sh --- open_spiel/scripts/install.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/open_spiel/scripts/install.sh b/open_spiel/scripts/install.sh index 62ee8c6f56..30de16d6d1 100755 --- a/open_spiel/scripts/install.sh +++ b/open_spiel/scripts/install.sh @@ -37,13 +37,11 @@ MYDIR="$(dirname "$(realpath "$0")")" function check_install_python() { # Need the trap here to make sure the return value of grep being 1 doesn't cause set -e to fail # https://stackoverflow.com/questions/77047127/bash-capture-stderr-of-a-function-while-using-trap - rm -f /usr/local/bin/2to3-${OS_PYTHON_VERSION} - rm -f /usr/local/bin/idle${OS_PYTHON_VERSION} - rm -f /usr/local/bin/pydoc${OS_PYTHON_VERSION} - rm -f /usr/local/bin/python${OS_PYTHON_VERSION}* trap 'ret=0; output=$(brew list --versions | grep "python ${OS_PYTHON_VERSION}") || ret="$?"; trap - RETURN' RETURN if [[ "$output" = "" ]]; then - brew install "python@${OS_PYTHON_VERSION}" + # The --force is needed because there seems to be a phantom installation in /usr/local/ + # and errors show up for files that already exist + brew install --force "python@${OS_PYTHON_VERSION}" fi return 0 } From e009219b02bd4a637f4cc429b5f6f70fa951e9e3 Mon Sep 17 00:00:00 2001 From: Marc Lanctot Date: Thu, 5 Dec 2024 10:56:19 -0330 Subject: [PATCH 11/18] Update install.sh --- open_spiel/scripts/install.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/open_spiel/scripts/install.sh b/open_spiel/scripts/install.sh index 30de16d6d1..599b9422e0 100755 --- a/open_spiel/scripts/install.sh +++ b/open_spiel/scripts/install.sh @@ -34,9 +34,19 @@ ${PYBIN} --version MYDIR="$(dirname "$(realpath "$0")")" # This function is only run on Github Actions! -function check_install_python() { +function ci_check_install_python() { + if [[ ! "$CI" ]]; then + echo "Only run this function on Github Actions!" + exit 1 + fi + # Need the trap here to make sure the return value of grep being 1 doesn't cause set -e to fail # https://stackoverflow.com/questions/77047127/bash-capture-stderr-of-a-function-while-using-trap + rm -f /usr/local/bin/2to3-${OS_PYTHON_VERSION} + rm -f /usr/local/bin/idle${OS_PYTHON_VERSION} + rm -f /usr/local/bin/pydoc${OS_PYTHON_VERSION} + rm -f /usr/local/bin/python${OS_PYTHON_VERSION} + rm -f /usr/local/bin/python${OS_PYTHON_VERSION}* trap 'ret=0; output=$(brew list --versions | grep "python ${OS_PYTHON_VERSION}") || ret="$?"; trap - RETURN' RETURN if [[ "$output" = "" ]]; then # The --force is needed because there seems to be a phantom installation in /usr/local/ @@ -302,7 +312,7 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then # Mac OSX # We want to test multiple Python versions determined by OS_PYTHON_VERSION. if [[ "$CI" ]]; then # Set brew to use the specific python version - check_install_python + ci_check_install_python brew link --force --overwrite "python@${OS_PYTHON_VERSION}" fi `python3 -c "import tkinter" > /dev/null 2>&1` || brew install tcl-tk || echo "** Warning: failed 'brew install tcl-tk' -- continuing" From 969b22bb1aff89942571b749ac574f4afa25cabf Mon Sep 17 00:00:00 2001 From: Marc Lanctot Date: Thu, 5 Dec 2024 10:57:13 -0330 Subject: [PATCH 12/18] Update install.sh --- open_spiel/scripts/install.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/open_spiel/scripts/install.sh b/open_spiel/scripts/install.sh index 599b9422e0..a287d2e008 100755 --- a/open_spiel/scripts/install.sh +++ b/open_spiel/scripts/install.sh @@ -41,12 +41,7 @@ function ci_check_install_python() { fi # Need the trap here to make sure the return value of grep being 1 doesn't cause set -e to fail - # https://stackoverflow.com/questions/77047127/bash-capture-stderr-of-a-function-while-using-trap - rm -f /usr/local/bin/2to3-${OS_PYTHON_VERSION} - rm -f /usr/local/bin/idle${OS_PYTHON_VERSION} - rm -f /usr/local/bin/pydoc${OS_PYTHON_VERSION} - rm -f /usr/local/bin/python${OS_PYTHON_VERSION} - rm -f /usr/local/bin/python${OS_PYTHON_VERSION}* + # https://stackoverflow.com/questions/77047127/bash-capture-stderr-of-a-function-while-using-trap trap 'ret=0; output=$(brew list --versions | grep "python ${OS_PYTHON_VERSION}") || ret="$?"; trap - RETURN' RETURN if [[ "$output" = "" ]]; then # The --force is needed because there seems to be a phantom installation in /usr/local/ From ff6d656274b785e46f405c9b1a1c7279d51b9cde Mon Sep 17 00:00:00 2001 From: Marc Lanctot Date: Thu, 5 Dec 2024 10:57:57 -0330 Subject: [PATCH 13/18] Update ci_script.sh --- open_spiel/scripts/ci_script.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/open_spiel/scripts/ci_script.sh b/open_spiel/scripts/ci_script.sh index fa33d68b3e..4f54b6c209 100755 --- a/open_spiel/scripts/ci_script.sh +++ b/open_spiel/scripts/ci_script.sh @@ -26,12 +26,8 @@ if [[ "$OS" = "Linux" && "$OS_PYTHON_VERSION" = "3.9" ]]; then sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1 # Still needed to support using venv on Ubuntu 20.04: sudo apt-get install python3.9-venv -elif [[ "$OS" = "Darwin" ]]; then - # Python is already intalled via brew in install.sh from actions.yml - brew link --force python@${OS_PYTHON_VERSION} fi - PYBIN=${PYBIN:-"python${OS_PYTHON_VERSION}"} PYBIN=${PYBIN:-"python"} PYBIN=${PYBIN:-"python3"} From d6af0595fbf072f19e58aeda7bb040ddb7efd3ac Mon Sep 17 00:00:00 2001 From: Marc Lanctot Date: Thu, 5 Dec 2024 11:00:43 -0330 Subject: [PATCH 14/18] Update ci_script.sh --- open_spiel/scripts/ci_script.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/open_spiel/scripts/ci_script.sh b/open_spiel/scripts/ci_script.sh index 4f54b6c209..7c8adfc7eb 100755 --- a/open_spiel/scripts/ci_script.sh +++ b/open_spiel/scripts/ci_script.sh @@ -26,6 +26,15 @@ if [[ "$OS" = "Linux" && "$OS_PYTHON_VERSION" = "3.9" ]]; then sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1 # Still needed to support using venv on Ubuntu 20.04: sudo apt-get install python3.9-venv +elif [[ "$OS" = "Darwin" ]]; then + # Python is already intalled via brew in install.sh from actions.yml + brew link --force python@${OS_PYTHON_VERSION} + # Need this for the brew install command to succeed later + rm -f /usr/local/bin/2to3-${OS_PYTHON_VERSION} + rm -f /usr/local/bin/idle${OS_PYTHON_VERSION} + rm -f /usr/local/bin/pydoc${OS_PYTHON_VERSION} + rm -f /usr/local/bin/python${OS_PYTHON_VERSION} + rm -f /usr/local/bin/python${OS_PYTHON_VERSION}* fi PYBIN=${PYBIN:-"python${OS_PYTHON_VERSION}"} From b733f342a5adb80c18b015002f2f92b0c46ed624 Mon Sep 17 00:00:00 2001 From: Marc Lanctot Date: Thu, 5 Dec 2024 11:01:47 -0330 Subject: [PATCH 15/18] Update ci_script.sh --- open_spiel/scripts/ci_script.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/open_spiel/scripts/ci_script.sh b/open_spiel/scripts/ci_script.sh index 7c8adfc7eb..c2faba8c63 100755 --- a/open_spiel/scripts/ci_script.sh +++ b/open_spiel/scripts/ci_script.sh @@ -29,12 +29,6 @@ if [[ "$OS" = "Linux" && "$OS_PYTHON_VERSION" = "3.9" ]]; then elif [[ "$OS" = "Darwin" ]]; then # Python is already intalled via brew in install.sh from actions.yml brew link --force python@${OS_PYTHON_VERSION} - # Need this for the brew install command to succeed later - rm -f /usr/local/bin/2to3-${OS_PYTHON_VERSION} - rm -f /usr/local/bin/idle${OS_PYTHON_VERSION} - rm -f /usr/local/bin/pydoc${OS_PYTHON_VERSION} - rm -f /usr/local/bin/python${OS_PYTHON_VERSION} - rm -f /usr/local/bin/python${OS_PYTHON_VERSION}* fi PYBIN=${PYBIN:-"python${OS_PYTHON_VERSION}"} From a76457fee0b831b64061b41a771947768780666d Mon Sep 17 00:00:00 2001 From: lanctot Date: Thu, 5 Dec 2024 14:41:26 +0000 Subject: [PATCH 16/18] Add a precheck required for Python on CI --- .github/workflows/actions.yml | 1 + open_spiel/scripts/ci_python_prechecks.sh | 26 +++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100755 open_spiel/scripts/ci_python_prechecks.sh diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 989cc17141..b8b23c1929 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -76,6 +76,7 @@ jobs: - name: Install run: | pwd + ./open_spiel/scripts/ci_python_prechecks.sh chmod +x install.sh ./install.sh - name: Build and test diff --git a/open_spiel/scripts/ci_python_prechecks.sh b/open_spiel/scripts/ci_python_prechecks.sh new file mode 100755 index 0000000000..42546e3f2c --- /dev/null +++ b/open_spiel/scripts/ci_python_prechecks.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# Copyright 2019 DeepMind Technologies Ltd. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +OS=`uname -a | awk '{print $1}'` +if [[ "$OS" = "Darwin" ]]; then + # This seems to be necessary to install python via brew in Github Actions + rm -f /usr/local/bin/2to3-${OS_PYTHON_VERSION} + rm -f /usr/local/bin/idle${OS_PYTHON_VERSION} + rm -f /usr/local/bin/pydoc${OS_PYTHON_VERSION} + rm -f /usr/local/bin/python${OS_PYTHON_VERSION} + rm -f /usr/local/bin/python${OS_PYTHON_VERSION}* +fi + From 52ad2d8fa902ad49cb76172f4abcd6641a38e12f Mon Sep 17 00:00:00 2001 From: lanctot Date: Thu, 5 Dec 2024 14:42:46 +0000 Subject: [PATCH 17/18] Add comment --- open_spiel/scripts/ci_python_prechecks.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/open_spiel/scripts/ci_python_prechecks.sh b/open_spiel/scripts/ci_python_prechecks.sh index 42546e3f2c..92cb43adfc 100755 --- a/open_spiel/scripts/ci_python_prechecks.sh +++ b/open_spiel/scripts/ci_python_prechecks.sh @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Only use for Github Actions CI! OS=`uname -a | awk '{print $1}'` if [[ "$OS" = "Darwin" ]]; then # This seems to be necessary to install python via brew in Github Actions From c3d38bbad9b6a1eb3b5c778a088fff3ce46c6043 Mon Sep 17 00:00:00 2001 From: lanctot Date: Thu, 5 Dec 2024 15:21:37 +0000 Subject: [PATCH 18/18] Upgrade MacOS 12 -> 13 for wheels CI --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index bb6d42dced..de88640c54 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -34,7 +34,7 @@ jobs: OS_PYTHON_VERSION: 3.10 CIBW_ENVIRONMENT: "CXX=$(which g++) OPEN_SPIEL_BUILDING_WHEEL='ON' OPEN_SPIEL_BUILD_WITH_ACPC='ON' OPEN_SPIEL_BUILD_WITH_HANABI='ON' OPEN_SPIEL_BUILD_WITH_ROSHAMBO='ON'" CIBW_BUILD: cp39-manylinux_x86_64 cp310-manylinux_x86_64 cp311-manylinux_x86_64 cp312-manylinux_x86_64 - - os: macOS-12 + - os: macOS-13 OS_TYPE: "Darwin" CI_PYBIN: python3.9 OS_PYTHON_VERSION: 3.9