|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + types: [opened, synchronize, reopened] |
| 6 | + push: |
| 7 | + branches: |
| 8 | + - '*' |
| 9 | + - master |
| 10 | + # Managed by bors |
| 11 | + - auto |
| 12 | + # Run nightly checks to detect possible breakage due to upstream rustc changes |
| 13 | + schedule: |
| 14 | + - cron: '0 0 * * *' |
| 15 | + |
| 16 | +jobs: |
| 17 | + build_and_test: |
| 18 | + strategy: |
| 19 | + fail-fast: false |
| 20 | + matrix: |
| 21 | + toolchain: |
| 22 | + - x86_64-unknown-linux-gnu |
| 23 | + - x86_64-apple-darwin |
| 24 | + - x86_64-pc-windows-msvc |
| 25 | + include: |
| 26 | + - toolchain: x86_64-unknown-linux-gnu |
| 27 | + builder: ubuntu-latest |
| 28 | + os: linux |
| 29 | + - toolchain: x86_64-apple-darwin |
| 30 | + builder: macos-latest |
| 31 | + os: macos |
| 32 | + - toolchain: x86_64-pc-windows-msvc |
| 33 | + builder: windows-latest |
| 34 | + os: windows |
| 35 | + env: |
| 36 | + CFG_RELEASE_CHANNEL: nightly |
| 37 | + CFG_RELEASE: nightly |
| 38 | + RUST_BACKTRACE: 1 |
| 39 | + RLS_TEST_WAIT_FOR_AGES: 1 |
| 40 | + |
| 41 | + name: nightly - ${{ matrix.toolchain }} |
| 42 | + runs-on: ${{ matrix.builder }} |
| 43 | + |
| 44 | + steps: |
| 45 | + - uses: actions/checkout@v2 |
| 46 | + - name: Setup latest nightly toolchain |
| 47 | + run: bash ci/setup-toolchain.sh |
| 48 | + if: github.event_name == 'schedule' |
| 49 | + - run: rustup component add rust-src rust-analysis rustc-dev llvm-tools-preview |
| 50 | + - run: rustc -vV |
| 51 | + - run: cargo build -v |
| 52 | + - run: cargo test -v |
| 53 | + - run: cargo test -v test_tooltip_std -- --ignored |
| 54 | + # Test that we don't regress in-process compilation build |
| 55 | + - run: cargo test -v --no-default-features |
| 56 | + - run: cargo test -v --manifest-path=rls-analysis/Cargo.toml |
| 57 | + - run: cargo test -v --manifest-path=rls-data/Cargo.toml |
| 58 | + - run: cargo test -v --manifest-path=rls-ipc/Cargo.toml |
| 59 | + - run: cargo test -v --manifest-path=rls-rustc/Cargo.toml |
| 60 | + - run: cargo test -v --manifest-path=rls-span/Cargo.toml |
| 61 | + - run: cargo test -v --manifest-path=rls-vfs/Cargo.toml |
| 62 | + |
| 63 | + # https://forge.rust-lang.org/infra/docs/bors.html#adding-a-new-repository-to-bors |
| 64 | + build_result: |
| 65 | + name: bors build finished |
| 66 | + runs-on: ubuntu-latest |
| 67 | + needs: ["build_and_test"] |
| 68 | + steps: |
| 69 | + - name: Mark the job as successful |
| 70 | + run: exit 0 |
| 71 | + if: success() |
| 72 | + - name: Mark the job as unsuccessful |
| 73 | + run: exit 1 |
| 74 | + if: "!success()" |
| 75 | + |
0 commit comments