Debian Codegraph @

.github/workflows/sqlx-cli.yml

raw symbols SCIP
1 name: SQLx CLI
2
3 on:
4 pull_request:
5 push:
6 branches:
7 - main
8 - "*-dev"
9
10 jobs:
11 check:
12 name: Check
13 runs-on: ubuntu-latest
14
15 steps:
16 - uses: actions/checkout@v4
17
18 - run: |
19 rustup update
20 rustup component add clippy
21 rustup toolchain install beta
22 rustup component add --toolchain beta clippy
23
24 - uses: Swatinem/rust-cache@v2
25
26 - run: cargo clippy --manifest-path sqlx-cli/Cargo.toml -- -D warnings
27
28 # Run beta for new warnings but don't break the build.
29 # Use a subdirectory of `target` to avoid clobbering the cache.
30 - run: >
31 cargo +beta clippy
32 --manifest-path sqlx-cli/Cargo.toml
33 --target-dir target/beta/
34
35 test:
36 name: Test
37 runs-on: ${{ matrix.os }}
38
39 strategy:
40 matrix:
41 # Note: macOS-latest uses M1 Silicon (ARM64)
42 os:
43 - ubuntu-latest
44 # FIXME: migrations tests fail on Windows for whatever reason
45 # - windows-latest
46 - macOS-13
47 - macOS-latest
48
49 steps:
50 - uses: actions/checkout@v4
51
52 - uses: Swatinem/rust-cache@v2
53 with:
54 key: ${{ runner.os }}-test
55
56 - run: cargo test --manifest-path sqlx-cli/Cargo.toml
57
58 build:
59 name: Build
60 runs-on: ${{ matrix.os }}
61
62 strategy:
63 matrix:
64 # Note: macOS-latest uses M1 Silicon (ARM64)
65 os:
66 - ubuntu-latest
67 - windows-latest
68 - macOS-13
69 - macOS-latest
70 include:
71 - os: ubuntu-latest
72 target: x86_64-unknown-linux-musl
73 args: --features openssl-vendored
74 bin: target/debug/cargo-sqlx
75 - os: windows-latest
76 target: x86_64-pc-windows-msvc
77 bin: target/debug/cargo-sqlx.exe
78 - os: macOS-13
79 target: x86_64-apple-darwin
80 bin: target/debug/cargo-sqlx
81 - os: macOS-latest
82 target: aarch64-apple-darwin
83 bin: target/debug/cargo-sqlx
84
85 steps:
86 - uses: actions/checkout@v4
87
88 - name: Use latest Rust
89 run: rustup override set stable
90
91 - uses: Swatinem/rust-cache@v2
92 with:
93 key: ${{ runner.os }}-cli
94
95 - run: cargo build --manifest-path sqlx-cli/Cargo.toml --bin cargo-sqlx ${{ matrix.args }}
96
97 - uses: actions/upload-artifact@v4
98 with:
99 name: cargo-sqlx-${{ matrix.target }}
100 path: ${{ matrix.bin }}