blob: 0a8e5de6b1f753bafe9223c5a90ef33bcf7bf504 [file] [log] [blame] [edit]
name: CI
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- '*'
- master
# Managed by bors
- auto
# Run nightly checks to detect possible breakage due to upstream rustc changes
schedule:
- cron: '0 0 * * *'
jobs:
build_and_test:
strategy:
fail-fast: false
matrix:
toolchain:
- x86_64-unknown-linux-gnu
- x86_64-apple-darwin
- x86_64-pc-windows-msvc
include:
- toolchain: x86_64-unknown-linux-gnu
builder: ubuntu-latest
os: linux
- toolchain: x86_64-apple-darwin
builder: macos-latest
os: macos
- toolchain: x86_64-pc-windows-msvc
builder: windows-latest
os: windows
env:
CFG_RELEASE_CHANNEL: nightly
CFG_RELEASE: nightly
RUST_BACKTRACE: 1
RLS_TEST_WAIT_FOR_AGES: 1
name: nightly - ${{ matrix.toolchain }}
runs-on: ${{ matrix.builder }}
steps:
- uses: actions/checkout@v2
- name: Setup latest nightly toolchain
run: bash ci/setup-toolchain.sh
if: github.event_name == 'schedule'
- run: rustup component add rust-src rust-analysis rustc-dev llvm-tools-preview
if: github.event_name != 'schedule'
- run: rustc -vV
- run: cargo build -v
- run: cargo test -v
- run: cargo test -v test_tooltip_std -- --ignored
# Test that we don't regress in-process compilation build
- run: cargo test -v --no-default-features
- run: cargo test -v --manifest-path=rls-analysis/Cargo.toml
- run: cargo test -v --manifest-path=rls-data/Cargo.toml
- run: cargo test -v --manifest-path=rls-ipc/Cargo.toml
- run: cargo test -v --manifest-path=rls-rustc/Cargo.toml
- run: cargo test -v --manifest-path=rls-span/Cargo.toml
- run: cargo test -v --manifest-path=rls-vfs/Cargo.toml
style:
name: Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: cargo +stable fmt --manifest-path=Cargo.toml -- --check
- run: cargo +stable fmt --manifest-path=rls-analysis/Cargo.toml -- --check
- run: cargo +stable fmt --manifest-path=rls-data/Cargo.toml -- --check
- run: cargo +stable fmt --manifest-path=rls-ipc/Cargo.toml -- --check
- run: cargo +stable fmt --manifest-path=rls-rustc/Cargo.toml -- --check
- run: cargo +stable fmt --manifest-path=rls-span/Cargo.toml -- --check
- run: cargo +stable fmt --manifest-path=rls-vfs/Cargo.toml -- --check
# https://forge.rust-lang.org/infra/docs/bors.html#adding-a-new-repository-to-bors
build_result:
name: bors build finished
runs-on: ubuntu-latest
needs: ["build_and_test"]
steps:
- name: Mark the job as successful
run: exit 0
if: success()
- name: Mark the job as unsuccessful
run: exit 1
if: "!success()"