mirror of
https://github.com/wassname/ray.git
synced 2026-07-13 17:45:08 +08:00
Factor out Travis 'install' sections for use with GitHub Actions (#7988)
This commit is contained in:
@@ -17,7 +17,7 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v1
|
||||
with:
|
||||
fetch-depth: 1
|
||||
fetch-depth: 0
|
||||
- name: Run Jenkins Tests
|
||||
shell: bash -e -o pipefail -l {0}
|
||||
env:
|
||||
|
||||
+15
-25
@@ -11,48 +11,38 @@ jobs:
|
||||
matrix:
|
||||
# Useful info: https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
||||
include:
|
||||
- name: ubuntu-clang
|
||||
- name: ubuntu
|
||||
os: ubuntu-16.04
|
||||
compiler: clang
|
||||
- name: windows-clang
|
||||
- name: windows
|
||||
os: windows-2019
|
||||
compiler: clang-cl
|
||||
- name: macos-clang
|
||||
- name: macos
|
||||
os: macos-10.15
|
||||
compiler: clang
|
||||
env:
|
||||
PYTHON: 3.6
|
||||
steps:
|
||||
- name: Configure Git
|
||||
- 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).
|
||||
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:
|
||||
fetch-depth: 1
|
||||
- name: Setup Bazel
|
||||
# we need full history to diff against the original for linting etc.
|
||||
fetch-depth: 0
|
||||
- name: Run CI script
|
||||
shell: bash -e -o pipefail -l {0}
|
||||
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
|
||||
shell: bash -e -o pipefail -l {0}
|
||||
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 -e -o pipefail -l {0}
|
||||
run: |
|
||||
bazel build \
|
||||
--keep_going \
|
||||
"//:*"
|
||||
. ./ci/travis/ci.sh init
|
||||
. ./ci/travis/ci.sh build
|
||||
- name: Run Clang Include-What-You-Use
|
||||
continue-on-error: true
|
||||
if: runner.os == 'Linux'
|
||||
|
||||
Reference in New Issue
Block a user