File: rust.yml

package info (click to toggle)
rust-human-name 2.0.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 776 kB
  • sloc: makefile: 2
file content (72 lines) | stat: -rw-r--r-- 1,916 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Rust

on: [push]

env:
  CARGO_TERM_COLOR: always

jobs:
  stable:
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
      fail-fast: false
    runs-on: ${{ matrix.os }}

    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Install minimal stable with clippy and rustfmt
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          components: rustfmt, clippy
      - name: Build
        run: cargo build --verbose --release
      - name: Run tests
        run: cargo test --verbose
      - name: Run clippy
        run: cargo clippy --verbose
        if: matrix.os == 'ubuntu-latest'
      - name: Run rustfmt
        run: cargo fmt --check --verbose
        if: matrix.os == 'ubuntu-latest'
      - run: |
         if [ "$RUNNER_OS" == "Linux" ]; then
            echo "artifactName=libhuman_name.so" >> $GITHUB_ENV
         elif [ "$RUNNER_OS" == "Windows" ]; then
            echo "artifactName=human_name.dll" >> $GITHUB_ENV
         elif [ "$RUNNER_OS" == "macOS" ]; then
            echo "artifactName=libhuman_name.dylib" >> $GITHUB_ENV
         else
            echo "Unrecognized OS: $RUNNER_OS"
            exit 1
         fi
        shell: bash
      - run: |
          echo "$RUNNER_OS"
          ls target/release
        shell: bash
      - name: Upload artifact
        uses: actions/upload-artifact@v3
        with:
          name: ${{ env.artifactName }}
          path: target/release/${{ env.artifactName }}
          if-no-files-found: error

  msrv:

    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Install minimum supported Rust version
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: 1.52.1
      - name: Typecheck
        run: cargo check --verbose