ray/.github/workflows/main.yml
mehrdadn 44aded5272
Bazel mirrors (#7385)
* Switch to mirrors.bazel.build where possible

* Switch from .zip to .tar.gz for smaller downloads (it's also the default download on UNIX)

* Use direct GitHub URLs in Bazel files for clarity

* Don't pass patches to local_repository

* Remove github_repository()

* Switch to GitHub actions/checkout@v2 which is faster

* Use faster extraction method for LLVm on Windows

* Move LLVM_VERSION_WINDOWS to the shell script since it's not a CI-specific value

* Change GITHUB_TOKEN to GITHUB

* Don't show timestamps for GitHub Actions

* Factor out some options from GitHub Actions

* Tell Bazel to stay on the same volume in GitHun Actions

* Display progress output when downloading toolchains

Co-authored-by: GitHub Web Flow <noreply@github.com>
2020-03-01 14:04:06 -08:00

91 lines
2.6 KiB
YAML

name: CI
env:
DEBIAN_FRONTEND: noninteractive
on: [push, pull_request]
jobs:
iwyu:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
name: [
ubuntu-clang-iwyu,
]
include:
- name: ubuntu-clang-iwyu
os: ubuntu-latest
compiler: clang
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Setup Bazel
shell: bash
env:
BAZEL_CACHE_CREDENTIAL_B64: ${{ secrets.BAZEL_CACHE_CREDENTIAL_B64 }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./ci/travis/install-bazel.sh
- name: Setup Clang Include-What-You-Use
shell: bash
run: |
sudo apt-get install iwyu
- name: Perform build
continue-on-error: true
shell: bash
env:
CC: ${{ matrix.compiler }}
run: |
# TODO(mehrdadn): Replace this with the same build script as below, once we factor that out
. ./ci/travis/build-helper.sh prep_build_env
bazel --batch build \
--compilation_mode=fastbuild \
--config=iwyu \
--keep_going \
"//:*"
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# Github Actions requires a single row to be added to the build matrix.
# See https://help.github.com/en/articles/workflow-syntax-for-github-actions.
name: [
windows-clang-cl,
]
include:
- name: windows-clang-cl
os: windows-latest
compiler: clang-cl
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Bazel
shell: bash
env:
BAZEL_CACHE_CREDENTIAL_B64: ${{ secrets.BAZEL_CACHE_CREDENTIAL_B64 }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./ci/travis/install-bazel.sh
- name: Install C/C++ toolchains
if: matrix.compiler == 'clang' || matrix.compiler == 'clang-cl'
shell: bash
env:
CC: ${{ matrix.compiler }}
run: ./ci/travis/install-toolchains.sh "${CC%%-*}"
- name: Install MSYS2 (only needed if some shell commands are missing)
if: false && runner.os == 'Windows'
uses: numworks/setup-msys2@v1
with:
update: false
- name: Perform build
shell: bash
run: |
. ./ci/travis/build-helper.sh prep_build_env
bazel --batch build \
--keep_going \
"//:ray_pkg" # TODO(mehrdadn): Should be "//:*", but we get a linking error with _streaming.so