| 1 | name: Rust |
| 2 | |
| 3 | on: [push, pull_request] |
| 4 | |
| 5 | jobs: |
| 6 | build: |
| 7 | runs-on: ubuntu-latest |
| 8 | steps: |
| 9 | - uses: actions/checkout@v4 |
| 10 | - name: Install latest stable |
| 11 | uses: dtolnay/rust-toolchain@master |
| 12 | with: |
| 13 | toolchain: stable |
| 14 | components: clippy |
| 15 | - name: check nostd |
| 16 | run: cargo check --no-default-features |
| 17 | - name: test nostd |
| 18 | run: cargo test --no-default-features |
| 19 | - name: check constrandom |
| 20 | run: cargo check --no-default-features --features compile-time-rng |
| 21 | - name: test constrandom |
| 22 | run: cargo test --no-default-features --features compile-time-rng |
| 23 | - name: check fixed-seed |
| 24 | run: cargo check --no-default-features --features std |
| 25 | - name: check |
| 26 | run: cargo check |
| 27 | - name: test |
| 28 | run: cargo test |
| 29 | nightly: |
| 30 | name: nightly |
| 31 | runs-on: ubuntu-latest |
| 32 | env: |
| 33 | RUSTFLAGS: -C target-cpu=native |
| 34 | steps: |
| 35 | - uses: actions/checkout@v4 |
| 36 | - name: Install latest nightly |
| 37 | uses: dtolnay/rust-toolchain@master |
| 38 | with: |
| 39 | toolchain: nightly |
| 40 | components: clippy |
| 41 | - name: check nightly |
| 42 | run: cargo check -Z msrv-policy |
| 43 | - name: test nightly |
| 44 | run: cargo test |
| 45 | - name: check serde |
| 46 | run: cargo check --features serde |
| 47 | - name: test serde |
| 48 | run: cargo test --features serde |
| 49 | linux_arm7: |
| 50 | name: Linux ARMv7 |
| 51 | runs-on: ubuntu-latest |
| 52 | steps: |
| 53 | - uses: actions/checkout@v4 |
| 54 | - uses: dtolnay/rust-toolchain@master |
| 55 | with: |
| 56 | toolchain: stable |
| 57 | targets: armv7-unknown-linux-gnueabihf |
| 58 | - run: cargo check --target armv7-unknown-linux-gnueabihf |
| 59 | - name: Install 1.72.0 |
| 60 | uses: dtolnay/rust-toolchain@master |
| 61 | with: |
| 62 | toolchain: 1.72.0 |
| 63 | targets: armv7-unknown-linux-gnueabihf |
| 64 | - run: cargo +1.72.0 check --target armv7-unknown-linux-gnueabihf |
| 65 | aarch64-apple-darwin: |
| 66 | name: Aarch64 Apple Darwin |
| 67 | runs-on: macos-latest |
| 68 | steps: |
| 69 | - uses: actions/checkout@v4 |
| 70 | - uses: dtolnay/rust-toolchain@master |
| 71 | with: |
| 72 | toolchain: stable |
| 73 | targets: aarch64-apple-darwin |
| 74 | - run: cargo check --target aarch64-apple-darwin |
| 75 | - run: cargo test |
| 76 | - run: cargo test --no-default-features --features compile-time-rng |
| 77 | - name: Install 1.72.0 |
| 78 | uses: dtolnay/rust-toolchain@master |
| 79 | with: |
| 80 | toolchain: 1.72.0 |
| 81 | targets: aarch64-apple-darwin |
| 82 | - run: cargo +1.72.0 check --target aarch64-apple-darwin |
| 83 | i686-unknown-linux-gnu: |
| 84 | name: Linux i686 |
| 85 | runs-on: ubuntu-latest |
| 86 | steps: |
| 87 | - uses: actions/checkout@v4 |
| 88 | - uses: dtolnay/rust-toolchain@master |
| 89 | with: |
| 90 | toolchain: stable |
| 91 | targets: i686-unknown-linux-gnu |
| 92 | - name: Install cross compile tools |
| 93 | run: sudo apt-get install -y gcc-multilib libc6-i386 libc6-dev-i386 |
| 94 | - run: cargo check --target i686-unknown-linux-gnu |
| 95 | - run: cargo test --target i686-unknown-linux-gnu |
| 96 | - name: check constrandom |
| 97 | run: cargo check --no-default-features --features compile-time-rng --target i686-unknown-linux-gnu |
| 98 | - name: Install 1.72.0 |
| 99 | uses: dtolnay/rust-toolchain@master |
| 100 | with: |
| 101 | toolchain: 1.72.0 |
| 102 | targets: i686-unknown-linux-gnu |
| 103 | - run: cargo +1.72.0 check --target i686-unknown-linux-gnu |
| 104 | - name: check constrandom |
| 105 | run: cargo +1.72.0 check --no-default-features --features compile-time-rng --target i686-unknown-linux-gnu |
| 106 | x86_64-unknown-linux-gnu: |
| 107 | name: Linux x86_64 |
| 108 | runs-on: ubuntu-latest |
| 109 | env: |
| 110 | RUSTFLAGS: -C target-cpu=skylake -C target-feature=+aes |
| 111 | steps: |
| 112 | - uses: actions/checkout@v4 |
| 113 | - uses: dtolnay/rust-toolchain@master |
| 114 | with: |
| 115 | toolchain: nightly |
| 116 | targets: x86_64-unknown-linux-gnu |
| 117 | - run: cargo check --target x86_64-unknown-linux-gnu |
| 118 | - run: cargo test --target x86_64-unknown-linux-gnu |
| 119 | - name: check constrandom |
| 120 | run: cargo check --no-default-features --features compile-time-rng --target x86_64-unknown-linux-gnu |
| 121 | - name: Install 1.72.0 |
| 122 | uses: dtolnay/rust-toolchain@master |
| 123 | with: |
| 124 | toolchain: 1.72.0 |
| 125 | - run: cargo +1.72.0 check --target x86_64-unknown-linux-gnu |
| 126 | - name: check constrandom |
| 127 | run: cargo +1.72.0 check --no-default-features --features compile-time-rng --target x86_64-unknown-linux-gnu |
| 128 | thumbv6m: |
| 129 | name: thumbv6m |
| 130 | runs-on: ubuntu-latest |
| 131 | steps: |
| 132 | - uses: actions/checkout@v4 |
| 133 | - uses: dtolnay/rust-toolchain@master |
| 134 | with: |
| 135 | toolchain: stable |
| 136 | targets: thumbv6m-none-eabi |
| 137 | - run: cargo check --target thumbv6m-none-eabi --no-default-features |
| 138 | wasm32-unknown-unknown: |
| 139 | name: wasm |
| 140 | runs-on: ubuntu-latest |
| 141 | steps: |
| 142 | - uses: actions/checkout@v4 |
| 143 | - uses: dtolnay/rust-toolchain@master |
| 144 | with: |
| 145 | toolchain: stable |
| 146 | targets: wasm32-unknown-unknown |
| 147 | - run: cargo check --target wasm32-unknown-unknown --no-default-features |
| 148 | no_std: |
| 149 | name: no-std build |
| 150 | runs-on: ubuntu-latest |
| 151 | steps: |
| 152 | - uses: actions/checkout@v4 |
| 153 | - uses: dtolnay/rust-toolchain@master |
| 154 | with: |
| 155 | toolchain: nightly |
| 156 | - run: cargo build --manifest-path=no_std_test/Cargo.toml |