name: CI on: [push, pull_request] 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 }} jobs: build: name: ${{ matrix.name }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: # Useful info: https://help.github.com/en/articles/workflow-syntax-for-github-actions include: - name: ubuntu os: ubuntu-16.04 python-version: 3.6 - name: windows os: windows-2019 python-version: 3.8 - name: macos os: macos-10.15 python-version: 3.6 - name: ubuntu-jenkins-tune os: ubuntu-latest jenkins-test: RUN_TUNE_TESTS - name: ubuntu-jenkins-doc os: ubuntu-latest jenkins-test: RUN_DOC_TESTS - name: ubuntu-jenkins-sgd os: ubuntu-latest jenkins-test: RUN_SGD_TESTS env: PYTHON: ${{ matrix.python-version }} TRAVIS_COMMIT: ${{ github.sha }} #TRAVIS_PULL_REQUEST is defined in the scripts to account for "false" steps: - name: Pre-checkout system configuration # 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: | # Note: only configure settings here that are required _before_ the repository is cloned (such as Git settings). # Put a path with spaces (and use common words like 'src') to verify correct builds export GITHUB_WORKSPACE="${GITHUB_WORKSPACE%/*} src/${GITHUB_WORKSPACE##*/}" 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 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 - name: Checkout repository uses: actions/checkout@v2 with: # we need full history to diff against the original for linting etc. fetch-depth: 0 - 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 - name: Run Jenkins tests shell: bash -e -o pipefail -l {0} if: matrix.jenkins-test != '' env: SIGOPT_KEY: ${{ secrets.TUNE_SIGOPT_KEY }} TEST_CASE: ${{ matrix.jenkins-test }} run: env "${TEST_CASE}=1" HOME="${PWD}" ci/jenkins_tests/entry_point.sh - name: Run CI script shell: bash -e -o pipefail -l {0} if: matrix.jenkins-test == '' env: BAZEL_CACHE_CREDENTIAL_B64: ${{ secrets.BAZEL_CACHE_CREDENTIAL_B64 }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} #LINUX_WHEELS: 1 #MAC_WHEELS: 1 RAY_DEFAULT_BUILD: 1 WINDOWS_WHEELS: 1 run: | . ./ci/travis/ci.sh init . ./ci/travis/ci.sh build . ./ci/travis/ci.sh upload_wheels || true . ./ci/travis/ci.sh test_python . ./ci/travis/ci.sh test_wheels - 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 \ "//:*"