~ruther/avr-device

ref: 2f8be35ad4267b9de64b996320ece3a60dec3e17 avr-device/.github/workflows/ci.yml -rw-r--r-- 2.4 KiB
2f8be35a — Rahix Mention tool versions in README 3 years ago
                                                                                
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
73
74
75
76
77
78
79
80
name: Continuous Integration

on:
  - push
  - pull_request

jobs:
  ci:
    name: "Test-build avr-device with all targets and runtime enabled"
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Install Stable Rust
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: false
      - name: Install Nightly Rust
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: nightly-2021-01-07
          override: true
          components: rustfmt

      # Python Dependencies
      - name: Install Python dependencies
        run: |
          pip3 install --user setuptools wheel
          pip3 install --user svdtools
      - name: Put pip binary directory into path
        run: echo "$HOME/.local/bin" >> $GITHUB_PATH

      # Rust Dependencies
      - name: Cache Cargo installed binaries
        uses: actions/cache@v1
        id: cache-cargo
        with:
          path: ~/cargo-bin
          key: rust-tools-001
      - name: Install svd2rust
        if: steps.cache-cargo.outputs.cache-hit != 'true'
        run: |
          mkdir svd2rust
          cd svd2rust
          git init
          git remote add origin https://github.com/rust-embedded/svd2rust.git
          git fetch origin 56be78729279eeebef65110c13be8d96c0b9270f
          git checkout FETCH_HEAD
          cargo +stable install --path .
      - name: Install cargo-form
        if: steps.cache-cargo.outputs.cache-hit != 'true'
        uses: actions-rs/install@v0.1
        with:
          crate: form
          version: 0.7.0
      - name: Install atdf2svd
        if: steps.cache-cargo.outputs.cache-hit != 'true'
        uses: actions-rs/install@v0.1
        with:
          crate: atdf2svd
          version: 0.2.0
      - name: Copy tools to cache directory
        if: steps.cache-cargo.outputs.cache-hit != 'true'
        run: |
          mkdir ~/cargo-bin
          cp ~/.cargo/bin/svd2rust ~/cargo-bin
          cp ~/.cargo/bin/form ~/cargo-bin
          cp ~/.cargo/bin/atdf2svd ~/cargo-bin
      - name: Put new cargo binary directory into path
        run: echo "$HOME/cargo-bin" >> $GITHUB_PATH

      # Actual test run
      - name: Generate chip description sources
        run: make RUSTUP_TOOLCHAIN=nightly-2021-01-07
      - name: Test-compile the crate
        run: cargo check --all-features
Do not follow this link