Debian Codegraph @

.github/workflows/main.yml

raw
1 name: CI
2 on:
3 pull_request:
4 merge_group:
5
6 jobs:
7 test:
8 name: Test
9 runs-on: ${{ matrix.os }}
10 strategy:
11 matrix:
12 build: [stable, beta, nightly, macos, windows]
13 include:
14 - build: stable
15 os: ubuntu-latest
16 rust: stable
17 - build: beta
18 os: ubuntu-latest
19 rust: beta
20 - build: nightly
21 os: ubuntu-latest
22 rust: nightly
23 - build: macos
24 os: macos-latest
25 rust: stable
26 - build: windows
27 os: windows-latest
28 rust: stable
29 steps:
30 - uses: actions/checkout@master
31 with:
32 submodules: true
33 - name: Install Rust (rustup)
34 run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
35 shell: bash
36 - run: cargo test --locked
37 - run: cargo test --features https,ssh
38 # Single-threaded: libgit2's builtin SHA256 is not thread-safe.
39 # See https://github.com/rust-lang/git2-rs/issues/1255.
40 - run: cargo test --features unstable-sha256 -- --test-threads=1
41 - run: cargo test --features https,ssh,unstable-sha256
42 - run: cargo test -p git2-curl
43 - run: cargo run -p systest
44 - run: cargo run -p systest --features unstable-sha256
45
46 rustfmt:
47 name: Rustfmt
48 runs-on: ubuntu-latest
49 steps:
50 - uses: actions/checkout@master
51 - name: Install Rust
52 run: rustup update stable && rustup default stable && rustup component add rustfmt
53 - run: cargo fmt -- --check
54
55 # The success job is here to consolidate the total success/failure state of
56 # all other jobs. This job is then included in the GitHub branch protection
57 # rule which prevents merges unless all other jobs are passing. This makes
58 # it easier to manage the list of jobs via this yml file and to prevent
59 # accidentally adding new jobs without also updating the branch protections.
60 success:
61 name: Success gate
62 if: always()
63 needs:
64 - test
65 - rustfmt
66 runs-on: ubuntu-latest
67 steps:
68 - run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
69 - name: Done
70 run: exit 0