File: main.yml

package info (click to toggle)
rust-errno 0.3.14-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 160 kB
  • sloc: makefile: 4
file content (89 lines) | stat: -rw-r--r-- 2,698 bytes parent folder | download | duplicates (2)
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
81
82
83
84
85
86
87
88
89
on:
  push:
    branches:
      - main
  pull_request:
  schedule:
    - cron: '5 21 * * 5'
  workflow_dispatch:

name: CI

jobs:
  test:
    name: Test
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        rust: [stable, nightly, '1.56']
    steps:
      - name: Checkout repository
        uses: actions/checkout@v5
      - name: Install toolchain
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.rust }}
      - name: Pin to old dependency versions (Rust 1.56 only)
        if: matrix.rust == '1.56'
        run: |
          cargo update -p libc --precise 0.2.163
          cargo update -p windows-sys --precise 0.52.0
      - name: Setup cache
        uses: Swatinem/rust-cache@v2
      - name: Test (no features)
        run: cargo test --no-default-features
      - name: Test (all features)
        run: cargo test --all-features


  wasi:
    name: Test WASI
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v5
      - name: Install toolchain
        uses: dtolnay/rust-toolchain@nightly
        with:
          targets: wasm32-wasip2
      - name: Install wasmtime
        run: |
          curl https://wasmtime.dev/install.sh -sSf | bash
          echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
      - name: Test (no features)
        run: CARGO_TARGET_WASM32_WASIP2_RUNNER=wasmtime cargo test --target wasm32-wasip2 --no-default-features
      - name: Test (all features)
        run: CARGO_TARGET_WASM32_WASIP2_RUNNER=wasmtime cargo test --target wasm32-wasip2 --all-features

  emscripten:
    name: Test Emscripten
    runs-on: ubuntu-latest
    container: emscripten/emsdk:latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v5
      - name: Install toolchain
        uses: dtolnay/rust-toolchain@nightly
        with:
          targets: wasm32-unknown-emscripten
      - name: Test (no features)
        run: CARGO_TARGET_WASM32_UNKNOWN_EMSCRIPTEN_RUNNER=node cargo test --target wasm32-unknown-emscripten --no-default-features
      - name: Test (all features)
        run: CARGO_TARGET_WASM32_UNKNOWN_EMSCRIPTEN_RUNNER=node cargo test --target wasm32-unknown-emscripten --all-features


  lints:
    name: Rustfmt & Clippy
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v5
      - name: Install toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy
      - name: Check formatting
        run: cargo fmt --check
      - name: Check clippy
        run: cargo clippy -- -D warnings