forked from google-deepmind/open_spiel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI testing using Github Actions.
As Travis-CI is migrating, and will remove some options for OSS projects to get free workflows, we add github actions (we can remove travis CI afterwards). It will look like this: https://github.com/jblespiau/open_spiel-1/actions/runs/554623616 We only have a more recent version of MacOS, with Python 3.9. The current Travis do not specify the Python 3 version, while I explicitly pin it to be Python 3.7 here. I kept the versions the same as in .travis.yml otherwise (we have a Python 3.6, for Nox testing, we should likely upgrade it to be 3.7, but I would prefer this to be an orthogonal change. I just have a failure for the test with Julia: https://github.com/jblespiau/open_spiel-1/runs/1595264912?check_suite_focus=true It should be easy to fix this using in the install script: ``` # This is needed on Ubuntu 19.10 and above, see: # google-deepmind#201 if [[ "$JULIA_HOME" != "$HOME/packages/julias/julia-1.3.1" ]]; then if [[ -f /usr/lib/x86_64-linux-gnu/libstdc++.so.6 ]]; then echo "Julia not in $HOME. Copy libstdc++.so.6 (requires sudo)" sudo cp -f /usr/lib/x86_64-linux-gnu/libstdc++.so.6 $JULIA_HOME/lib/julia ``` but I simply disabled the test in this PR, and we can follow-up with that. PiperOrigin-RevId: 356724390 Change-Id: I69141b172c73333daaefd60534376e38dc36fdea
- Loading branch information
Showing
3 changed files
with
102 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
name: build_and_test | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
include: | ||
# Build and run tests without all optional dependencies (default behavior) | ||
# Ubuntu 18.04.2 LTS released on 26 April 2018 | ||
- os: ubuntu-18.04 | ||
OS_PYTHON_VERSION: 3.6 | ||
TRAVIS_USE_NOX: 0 | ||
DEFAULT_OPTIONAL_DEPENDENCY: "OFF" | ||
BUILD_SHARED_LIB: "OFF" | ||
BUILD_WITH_ORTOOLS: "OFF" | ||
BUILD_WITH_ORTOOLS_DOWNLOAD_URL: "" | ||
- os: "ubuntu-20.04" | ||
OS_PYTHON_VERSION: 3.8 | ||
TRAVIS_USE_NOX: 0 | ||
DEFAULT_OPTIONAL_DEPENDENCY: "OFF" | ||
BUILD_SHARED_LIB: "OFF" | ||
BUILD_WITH_ORTOOLS: "OFF" | ||
BUILD_WITH_ORTOOLS_DOWNLOAD_URL: "" | ||
# Build and run tests with all optional dependencies, including building a | ||
# shared library with linkable third party dependencies in place. | ||
- os: ubuntu-20.04 | ||
DEFAULT_OPTIONAL_DEPENDENCY: "ON" | ||
BUILD_WITH_JULIA: "OFF" | ||
TRAVIS_USE_NOX: 0 | ||
BUILD_SHARED_LIB: "ON" | ||
BUILD_WITH_ORTOOLS: "ON" | ||
BUILD_WITH_ORTOOLS_DOWNLOAD_URL: "https://github.com/google/or-tools/releases/download/v8.0/or-tools_ubuntu-20.04_v8.0.8283.tar.gz" | ||
# macOS Catalina 10.15 | ||
- os: macos-10.15 | ||
OS_PYTHON_VERSION: 3.7 | ||
TRAVIS_USE_NOX: 0 | ||
DEFAULT_OPTIONAL_DEPENDENCY: "OFF" | ||
BUILD_SHARED_LIB: "OFF" | ||
BUILD_WITH_ORTOOLS: "OFF" | ||
BUILD_WITH_ORTOOLS_DOWNLOAD_URL: "" | ||
## Tests using PIP | ||
# Build and run tests without all optional dependencies (default behavior) and | ||
# use nox | ||
- os: ubuntu-20.04 | ||
OS_PYTHON_VERSION: 3.8 | ||
TRAVIS_USE_NOX: 1 | ||
DEFAULT_OPTIONAL_DEPENDENCY: "OFF" | ||
BUILD_SHARED_LIB: "OFF" | ||
BUILD_WITH_ORTOOLS: "OFF" | ||
BUILD_WITH_ORTOOLS_DOWNLOAD_URL: "" | ||
- os: ubuntu-18.04 | ||
OS_PYTHON_VERSION: 3.6 | ||
TRAVIS_USE_NOX: 1 | ||
DEFAULT_OPTIONAL_DEPENDENCY: "OFF" | ||
BUILD_SHARED_LIB: "OFF" | ||
BUILD_WITH_ORTOOLS: "OFF" | ||
BUILD_WITH_ORTOOLS_DOWNLOAD_URL: "" | ||
- os: "macos-10.15" | ||
OS_PYTHON_VERSION: 3.7 | ||
TRAVIS_USE_NOX: 1 | ||
DEFAULT_OPTIONAL_DEPENDENCY: "OFF" | ||
BUILD_SHARED_LIB: "OFF" | ||
BUILD_WITH_ORTOOLS: "OFF" | ||
BUILD_WITH_ORTOOLS_DOWNLOAD_URL: "" | ||
|
||
runs-on: ${{ matrix.os }} | ||
env: | ||
OS_PYTHON_VERSION: ${{ matrix.OS_PYTHON_VERSION }} | ||
TRAVIS_USE_NOX: ${{ matrix.TRAVIS_USE_NOX }} | ||
DEFAULT_OPTIONAL_DEPENDENCY: ${{ matrix.DEFAULT_OPTIONAL_DEPENDENCY }} | ||
BUILD_WITH_JULIA: ${{ matrix.BUILD_WITH_JULIA }} | ||
BUILD_SHARED_LIB: ${{ matrix.BUILD_SHARED_LIB }} | ||
BUILD_WITH_ORTOOLS: ${{ matrix.BUILD_WITH_ORTOOLS }} | ||
BUILD_WITH_ORTOOLS_DOWNLOAD_URL: ${{ matrix.BUILD_WITH_ORTOOLS_DOWNLOAD_URL }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install | ||
run: | | ||
pwd | ||
chmod +x install.sh | ||
./install.sh | ||
- name: Build and test | ||
run: | | ||
python3 --version | ||
./open_spiel/scripts/travis_script.sh |
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
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