| 1 |
name: Checks |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: [ "main" ] |
| 6 |
pull_request: |
| 7 |
branches: [ "main" ] |
| 8 |
|
| 9 |
env: |
| 10 |
CARGO_TERM_COLOR: always |
| 11 |
|
| 12 |
jobs: |
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
install-cross: |
| 18 |
runs-on: ubuntu-latest |
| 19 |
steps: |
| 20 |
- uses: XAMPPRocky/get-github-release@v1 |
| 21 |
id: cross |
| 22 |
with: |
| 23 |
owner: cross-rs |
| 24 |
repo: cross |
| 25 |
matches: ${{ matrix.platform }} |
| 26 |
token: ${{ secrets.GITHUB_TOKEN }} |
| 27 |
- uses: actions/upload-artifact@v4 |
| 28 |
with: |
| 29 |
name: cross-${{ matrix.platform }} |
| 30 |
path: ${{ steps.cross.outputs.install_path }} |
| 31 |
strategy: |
| 32 |
matrix: |
| 33 |
platform: [linux-musl] |
| 34 |
|
| 35 |
|
| 36 |
build: |
| 37 |
runs-on: ubuntu-latest |
| 38 |
steps: |
| 39 |
- uses: actions/checkout@v4 |
| 40 |
- uses: actions-rs/toolchain@v1 |
| 41 |
with: |
| 42 |
profile: minimal |
| 43 |
toolchain: stable |
| 44 |
override: true |
| 45 |
- name: Build |
| 46 |
run: cargo build --verbose |
| 47 |
- name: Install request-key for Request/Instantiate flow |
| 48 |
run: | |
| 49 |
cargo build --example request-key --features std |
| 50 |
sudo mv ./target/debug/examples/request-key /sbin/request-key |
| 51 |
- name: Run tests |
| 52 |
run: cargo test --verbose -- --include-ignored |
| 53 |
|
| 54 |
|
| 55 |
clippy: |
| 56 |
runs-on: ubuntu-latest |
| 57 |
steps: |
| 58 |
- uses: actions/checkout@v4 |
| 59 |
- uses: actions-rs/toolchain@v1 |
| 60 |
with: |
| 61 |
profile: minimal |
| 62 |
toolchain: stable |
| 63 |
override: true |
| 64 |
components: clippy |
| 65 |
- name: Run Clippy |
| 66 |
run: cargo clippy --verbose -- --deny "warnings" |
| 67 |
- name: Run RustFmt |
| 68 |
run: cargo fmt -- --check |
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
cross-linux: |
| 75 |
runs-on: ubuntu-latest |
| 76 |
needs: install-cross |
| 77 |
steps: |
| 78 |
- uses: actions/checkout@v4 |
| 79 |
with: |
| 80 |
submodules: 'recursive' |
| 81 |
- uses: dtolnay/rust-toolchain@stable |
| 82 |
with: |
| 83 |
toolchain: stable |
| 84 |
- name: Download Cross |
| 85 |
uses: actions/download-artifact@v4 |
| 86 |
with: |
| 87 |
name: cross-linux-musl |
| 88 |
path: /tmp |
| 89 |
- run: rustup toolchain install ${{ matrix.channel }} |
| 90 |
- run: chmod +x /tmp/cross |
| 91 |
- name: Build |
| 92 |
run: /tmp/cross build --all-features --target ${{ matrix.target }} |
| 93 |
strategy: |
| 94 |
fail-fast: false |
| 95 |
matrix: |
| 96 |
channel: [stable] |
| 97 |
target: |
| 98 |
- aarch64-unknown-linux-musl |
| 99 |
- arm-unknown-linux-musleabihf |
| 100 |
- i686-unknown-linux-musl |
| 101 |
- x86_64-unknown-linux-musl |
| 102 |
- x86_64-unknown-linux-gnu |
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|