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 --no-default-features
37 - run: cargo test
38 - run: cargo run -p systest
39 - run: cargo test -p git2-curl
40 - name: Verify Cargo.lock is up-to-date
41 run: cargo update -p git2 --locked
42
43 rustfmt:
44 name: Rustfmt
45 runs-on: ubuntu-latest
46 steps:
47 - uses: actions/checkout@master
48 - name: Install Rust
49 run: rustup update stable && rustup default stable && rustup component add rustfmt
50 - run: cargo fmt -- --check
51
52 # The success job is here to consolidate the total success/failure state of
53 # all other jobs. This job is then included in the GitHub branch protection
54 # rule which prevents merges unless all other jobs are passing. This makes
55 # it easier to manage the list of jobs via this yml file and to prevent
56 # accidentally adding new jobs without also updating the branch protections.
57 success:
58 name: Success gate
59 if: always()
60 needs:
61 - test
62 - rustfmt
63 runs-on: ubuntu-latest
64 steps:
65 - run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
66 - name: Done
67 run: exit 0