2019-12-17 17:33:33 -08:00
|
|
|
name: CI
|
|
|
|
|
2019-12-31 20:48:08 -08:00
|
|
|
on: [push, pull_request]
|
2019-12-17 17:33:33 -08:00
|
|
|
|
2020-05-05 10:47:49 -07:00
|
|
|
env:
|
|
|
|
# Git GITHUB_... variables are useful for translating Travis environment variables
|
|
|
|
GITHUB_BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
|
|
|
GITHUB_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
|
|
|
GITHUB_PULL_REQUEST: ${{ github.event.number }}
|
|
|
|
|
2019-12-17 17:33:33 -08:00
|
|
|
jobs:
|
2020-03-30 16:29:54 -07:00
|
|
|
build:
|
2020-02-07 16:19:46 -08:00
|
|
|
name: ${{ matrix.name }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2020-03-30 16:29:54 -07:00
|
|
|
# Useful info: https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
2020-02-07 16:19:46 -08:00
|
|
|
include:
|
2020-04-15 08:10:22 -07:00
|
|
|
- name: ubuntu
|
2020-03-30 16:29:54 -07:00
|
|
|
os: ubuntu-16.04
|
2020-04-15 08:10:22 -07:00
|
|
|
- name: windows
|
2020-03-30 16:29:54 -07:00
|
|
|
os: windows-2019
|
2020-04-15 08:10:22 -07:00
|
|
|
- name: macos
|
2020-03-30 16:29:54 -07:00
|
|
|
os: macos-10.15
|
2020-04-15 08:10:22 -07:00
|
|
|
env:
|
|
|
|
PYTHON: 3.6
|
2020-04-29 21:19:02 -07:00
|
|
|
TRAVIS_BUILD_DIR: ${{ github.workspace }}
|
|
|
|
TRAVIS_COMMIT: ${{ github.sha }}
|
|
|
|
#TRAVIS_PULL_REQUEST is defined in the scripts to account for "false"
|
2020-02-07 16:19:46 -08:00
|
|
|
steps:
|
2020-04-15 08:10:22 -07:00
|
|
|
- name: Pre-checkout system configuration
|
2020-03-30 16:29:54 -07:00
|
|
|
# We add -l to process .bashrc, but need -e -o pipefail for consistency with GitHub Actions's default behavior.
|
|
|
|
shell: bash -e -o pipefail -l {0}
|
|
|
|
run: |
|
2020-04-15 08:10:22 -07:00
|
|
|
# Note: only configure settings here that are required _before_ the repository is cloned (such as Git settings).
|
|
|
|
if [ ! -f ~/.profile ] && [ ! -f ~/.bash_profile ]; then # missing on some machines, but needed for ~/.bashrc
|
|
|
|
echo 'if [ -n "${BASH_VERSION}" ] && [ -f ~/.bashrc ]; then . ~/.bashrc; fi' >> ~/.profile
|
|
|
|
fi
|
2020-03-30 16:29:54 -07:00
|
|
|
git config --global core.symlinks true && git config --global core.autocrlf false
|
|
|
|
if command -v dpkg > /dev/null; then sudo dpkg-reconfigure debconf -f noninteractive -p high; fi
|
2020-02-07 16:19:46 -08:00
|
|
|
- name: Checkout repository
|
2020-03-01 14:04:06 -08:00
|
|
|
uses: actions/checkout@v2
|
2020-02-07 16:19:46 -08:00
|
|
|
with:
|
2020-04-15 08:10:22 -07:00
|
|
|
# we need full history to diff against the original for linting etc.
|
|
|
|
fetch-depth: 0
|
2020-05-01 14:08:57 -07:00
|
|
|
- name: Configure AWS Credentials
|
|
|
|
continue-on-error: true
|
|
|
|
uses: aws-actions/configure-aws-credentials@v1
|
|
|
|
with:
|
|
|
|
aws-access-key-id: ${{ secrets.GHA_AWS_ACCESS_KEY_ID }}
|
|
|
|
aws-secret-access-key: ${{ secrets.GHA_AWS_SECRET_ACCESS_KEY }}
|
|
|
|
aws-region: us-west-2
|
2020-04-15 08:10:22 -07:00
|
|
|
- name: Run CI script
|
2020-03-30 16:29:54 -07:00
|
|
|
shell: bash -e -o pipefail -l {0}
|
2019-12-31 20:48:08 -08:00
|
|
|
env:
|
|
|
|
BAZEL_CACHE_CREDENTIAL_B64: ${{ secrets.BAZEL_CACHE_CREDENTIAL_B64 }}
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2020-04-29 21:19:02 -07:00
|
|
|
#LINUX_WHEELS: 1
|
|
|
|
LINT: 1
|
|
|
|
#MAC_WHEELS: 1
|
|
|
|
RAY_DEFAULT_BUILD: 1
|
|
|
|
WINDOWS_WHEELS: 1
|
2019-12-17 17:33:33 -08:00
|
|
|
run: |
|
2020-04-15 08:10:22 -07:00
|
|
|
. ./ci/travis/ci.sh init
|
2020-04-29 21:19:02 -07:00
|
|
|
. ./ci/travis/ci.sh lint
|
2020-04-15 08:10:22 -07:00
|
|
|
. ./ci/travis/ci.sh build
|
2020-05-01 14:08:57 -07:00
|
|
|
. ./ci/travis/ci.sh upload_wheels || true
|
2020-04-29 21:19:02 -07:00
|
|
|
. ./ci/travis/ci.sh test_python
|
|
|
|
. ./ci/travis/ci.sh test_wheels
|
2020-03-30 16:29:54 -07:00
|
|
|
- name: Run Clang Include-What-You-Use
|
|
|
|
continue-on-error: true
|
|
|
|
if: runner.os == 'Linux'
|
|
|
|
shell: bash -e -o pipefail -l {0}
|
|
|
|
run: |
|
|
|
|
sudo apt-get install -qq -o=Dpkg::Use-Pty=0 iwyu
|
|
|
|
bazel build \
|
|
|
|
--keep_going \
|
|
|
|
--config=iwyu \
|
|
|
|
"//:*"
|