Mercurial > crates > nonstick
comparison .github/workflows/build.yml @ 38:a132009ecc5c
retry
| author | Nigma <magnusgsvend@gmail.com> |
|---|---|
| date | Sun, 24 Jul 2022 02:09:31 +0200 |
| parents | d1f0c1cf3c6e |
| children | 4a0b7b73b70f |
comparison
equal
deleted
inserted
replaced
| 37:09fa82155033 | 38:a132009ecc5c |
|---|---|
| 1 on: | 1 on: |
| 2 pull_request: | 2 push: |
| 3 branches: | 3 branches: |
| 4 - master | 4 - master |
| 5 workflow_call: | 5 workflow_call: |
| 6 | 6 |
| 7 name: Build | 7 name: Build & publish |
| 8 | 8 |
| 9 jobs: | 9 jobs: |
| 10 check: | 10 build: |
| 11 name: Check & Lint | |
| 12 runs-on: ubuntu-latest | |
| 13 steps: | |
| 14 - name: Checkout sources | |
| 15 uses: actions/checkout@v2 | |
| 16 | |
| 17 - name: Install PAM dev files | |
| 18 run: sudo apt-get install -y libpam0g-dev | |
| 19 | |
| 20 - name: Use cargo cache | |
| 21 uses: actions/cache@v2 | |
| 22 with: | |
| 23 path: | | |
| 24 ~/.cargo/bin/ | |
| 25 ~/.cargo/registry/index/ | |
| 26 ~/.cargo/registry/cache/ | |
| 27 ~/.cargo/git/db/ | |
| 28 target/ | |
| 29 key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| 30 | |
| 31 - name: Install stable toolchain | |
| 32 uses: actions-rs/toolchain@v1 | |
| 33 with: | |
| 34 profile: minimal | |
| 35 toolchain: stable | |
| 36 override: true | |
| 37 | |
| 38 - name: Run cargo check | |
| 39 uses: actions-rs/cargo@v1 | |
| 40 with: | |
| 41 command: check | |
| 42 args: --manifest-path pam/Cargo.toml | |
| 43 | |
| 44 - name: Run cargo test | |
| 45 uses: actions-rs/cargo@v1 | |
| 46 with: | |
| 47 command: test | |
| 48 args: --manifest-path pam/Cargo.toml | |
| 49 | |
| 50 - name: Run cargo check on pam-http | |
| 51 uses: actions-rs/cargo@v1 | |
| 52 with: | |
| 53 command: check | |
| 54 args: --manifest-path pam-http/Cargo.toml | |
| 55 | |
| 56 - name: Run cargo check on pam-sober | |
| 57 uses: actions-rs/cargo@v1 | |
| 58 with: | |
| 59 command: check | |
| 60 args: --manifest-path pam-sober/Cargo.toml | |
| 61 | |
| 62 - name: Run cargo fmt | |
| 63 uses: actions-rs/cargo@v1 | |
| 64 with: | |
| 65 command: fmt | |
| 66 args: --manifest-path pam/Cargo.toml --all --check | |
| 67 | |
| 68 - name: Run cargo clippy | |
| 69 uses: actions-rs/cargo@v1 | |
| 70 with: | |
| 71 command: clippy | |
| 72 args: --manifest-path pam/Cargo.toml -- -D warnings | |
| 73 build: | |
| 74 needs: check | 11 needs: check |
| 75 runs-on: ubuntu-latest | 12 runs-on: ubuntu-latest |
| 76 steps: | 13 steps: |
| 77 - name: Use cargo cache | 14 - name: Use cargo cache |
| 78 uses: actions/cache@v2 | 15 uses: actions/cache@v2 |
| 97 registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} | 34 registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} |
| 98 check-repo: ${{ github.event_name == 'push' }} | 35 check-repo: ${{ github.event_name == 'push' }} |
| 99 ignore-unpublished-changes: true | 36 ignore-unpublished-changes: true |
| 100 # Only publish pam module, as pam-http and pam-sober are example projects | 37 # Only publish pam module, as pam-http and pam-sober are example projects |
| 101 args: --package pam-bindings | 38 args: --package pam-bindings |
| 102 |
