Debian Codegraph @

debian/rust-vendor/walkdir/.github/workflows/ci.yml

raw
1 name: ci
2 on:
3 pull_request:
4 branches:
5 - master
6 push:
7 branches:
8 - master
9 schedule:
10 - cron: '00 01 * * *'
11
12 # The section is needed to drop write-all permissions that are granted on
13 # `schedule` event. By specifying any permission explicitly all others are set
14 # to none. By using the principle of least privilege the damage a compromised
15 # workflow can do (because of an injection or compromised third party tool or
16 # action) is restricted. Currently the worklow doesn't need any additional
17 # permission except for pulling the code. Adding labels to issues, commenting
18 # on pull-requests, etc. may need additional permissions:
19 #
20 # Syntax for this section:
21 # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
22 #
23 # Reference for how to assign permissions on a job-by-job basis:
24 # https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
25 #
26 # Reference for available permissions that we can enable if needed:
27 # https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
28 permissions:
29 # to fetch code (actions/checkout)
30 contents: read
31
32 jobs:
33 test:
34 name: test
35 runs-on: ${{ matrix.os }}
36 strategy:
37 fail-fast: false
38 matrix:
39 include:
40 - build: pinned
41 os: ubuntu-latest
42 rust: 1.60.0
43 - build: pinned-win
44 os: windows-latest
45 rust: 1.60.0
46 - build: stable
47 os: ubuntu-latest
48 rust: stable
49 - build: beta
50 os: ubuntu-latest
51 rust: beta
52 - build: nightly
53 os: ubuntu-latest
54 rust: nightly
55 - build: macos
56 os: macos-latest
57 rust: stable
58 - build: win-msvc
59 os: windows-latest
60 rust: stable
61 - build: win-gnu
62 os: windows-latest
63 rust: stable-x86_64-gnu
64 steps:
65 - name: Checkout repository
66 uses: actions/checkout@v4
67 - name: Install Rust
68 uses: dtolnay/rust-toolchain@master
69 with:
70 toolchain: ${{ matrix.rust }}
71 - run: cargo build --verbose
72 - run: cargo doc --verbose
73 - if: startsWith(matrix.build, 'pinned-') == false
74 run: cargo test --verbose
75 - if: matrix.build == 'nightly'
76 run: |
77 set -x
78 cargo generate-lockfile -Z minimal-versions
79 cargo build --verbose
80 cargo test --verbose
81
82 rustfmt:
83 runs-on: ubuntu-latest
84 steps:
85 - name: Checkout repository
86 uses: actions/checkout@v4
87 - name: Install Rust
88 uses: dtolnay/rust-toolchain@master
89 with:
90 toolchain: stable
91 components: rustfmt
92 - name: Check formatting
93 run: |
94 cargo fmt --all -- --check