File: rust.yml

package info (click to toggle)
silver-platter 0.7.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,564 kB
  • sloc: python: 348; makefile: 33; sh: 1
file content (45 lines) | stat: -rw-r--r-- 1,181 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Rust

on:
  push:
  pull_request:

env:
  CARGO_TERM_COLOR: always

jobs:
  build:

    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest]
      fail-fast: false

    steps:
      - uses: actions/checkout@v5
      - uses: actions-rust-lang/setup-rust-toolchain@v1
        with:
          components: rustfmt
      - name: Install dependencies
        run: |
          sudo apt -y update
          sudo apt -y install devscripts libapt-pkg-dev libtdb-dev libssl-dev pkg-config libgpgme-dev
          cargo install cargo-all-features
      - name: Upgrade pip
        run: python -m pip install --upgrade pip setuptools_rust setuptools
      - name: Install breezy
        run: python -m pip install --upgrade breezy
      # TODO(jelmer): Add proper test isolation so this isn't necessary
      - name: Setup bzr identity
        run: brz whoami "CI <ci@noreply.github.com>"
      - name: Build
        run: cargo build --verbose
        env:
          RUSTFLAGS: -Dwarnings
      - name: Run tests
        run: cargo test-all-features
        env:
          RUSTFLAGS: -Dwarnings
      - name: Check formatting
        run: cargo fmt -- --check