Update install.sh to fix Github Actions CI #1660
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build_and_test | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-24.04 | |
OS_PYTHON_VERSION: "3.12" | |
DEFAULT_OPTIONAL_DEPENDENCY: "OFF" | |
BUILD_SHARED_LIB: "OFF" | |
OPEN_SPIEL_BUILD_WITH_ORTOOLS: "OFF" | |
OPEN_SPIEL_BUILD_WITH_ORTOOLS_DOWNLOAD_URL: "" | |
- os: macos-14 | |
OS_PYTHON_VERSION: "3.12" | |
DEFAULT_OPTIONAL_DEPENDENCY: "OFF" | |
BUILD_SHARED_LIB: "OFF" | |
OPEN_SPIEL_BUILD_WITH_ORTOOLS: "OFF" | |
OPEN_SPIEL_BUILD_WITH_ORTOOLS_DOWNLOAD_URL: "" | |
- os: ubuntu-22.04 | |
OS_PYTHON_VERSION: "3.11" | |
DEFAULT_OPTIONAL_DEPENDENCY: "ON" | |
BUILD_SHARED_LIB: "OFF" | |
OPEN_SPIEL_BUILD_WITH_ORTOOLS: "OFF" | |
OPEN_SPIEL_BUILD_WITH_ORTOOLS_DOWNLOAD_URL: "" | |
# Standard (most current) platforms and versions. | |
- os: ubuntu-22.04 | |
OS_PYTHON_VERSION: "3.10" | |
DEFAULT_OPTIONAL_DEPENDENCY: "ON" | |
BUILD_SHARED_LIB: "OFF" | |
OPEN_SPIEL_BUILD_WITH_ORTOOLS: "ON" | |
OPEN_SPIEL_BUILD_WITH_ORTOOLS_DOWNLOAD_URL: "https://github.com/google/or-tools/releases/download/v9.6/or-tools_amd64_ubuntu-22.04_cpp_v9.6.2534.tar.gz" | |
- os: ubuntu-22.04 | |
OS_PYTHON_VERSION: "3.10" | |
DEFAULT_OPTIONAL_DEPENDENCY: "OFF" | |
BUILD_SHARED_LIB: "OFF" | |
OPEN_SPIEL_BUILD_WITH_ORTOOLS: "OFF" | |
OPEN_SPIEL_BUILD_WITH_ORTOOLS_DOWNLOAD_URL: "" | |
- os: macos-13 | |
OS_PYTHON_VERSION: "3.11" | |
TRAVIS_USE_NOX: 0 | |
DEFAULT_OPTIONAL_DEPENDENCY: "OFF" | |
BUILD_SHARED_LIB: "OFF" | |
OPEN_SPIEL_BUILD_WITH_ORTOOLS: "OFF" | |
OPEN_SPIEL_BUILD_WITH_ORTOOLS_DOWNLOAD_URL: "" | |
runs-on: ${{ matrix.os }} | |
env: | |
OPEN_SPIEL_ENABLE_JAX: ON | |
OPEN_SPIEL_ENABLE_PYTORCH: ON | |
OPEN_SPIEL_ENABLE_TENSORFLOW: ON | |
OPEN_SPIEL_ENABLE_PYTHON_MISC: ON | |
OS_PYTHON_VERSION: ${{ matrix.OS_PYTHON_VERSION }} | |
DEFAULT_OPTIONAL_DEPENDENCY: ${{ matrix.DEFAULT_OPTIONAL_DEPENDENCY }} | |
OPEN_SPIEL_BUILD_WITH_JULIA: ${{ matrix.OPEN_SPIEL_BUILD_WITH_JULIA }} | |
BUILD_SHARED_LIB: ${{ matrix.BUILD_SHARED_LIB }} | |
OPEN_SPIEL_BUILD_WITH_ORTOOLS: ${{ matrix.OPEN_SPIEL_BUILD_WITH_ORTOOLS }} | |
OPEN_SPIEL_BUILD_WITH_ORTOOLS_DOWNLOAD_URL: ${{ matrix.OPEN_SPIEL_BUILD_WITH_ORTOOLS_DOWNLOAD_URL }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: julia-actions/setup-julia@v2 | |
with: | |
version: 1.8 | |
- name: Ad-hoc fix | |
if: ${{ matrix.DEFAULT_OPTIONAL_DEPENDENCY == 'ON' }} | |
run: | | |
# workaround for https://github.com/deepmind/open_spiel/issues/606 | |
sudo cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 $(julia --startup-file=no -e 'using Libdl;print(abspath(joinpath(Libdl.dlpath("libjulia"), "..", "julia")))') | |
- name: Install | |
run: | | |
pwd | |
chmod +x install.sh | |
./install.sh | |
- name: Build and test | |
run: | | |
python3 --version | |
./open_spiel/scripts/ci_script.sh |