Skip to content

Commit d78bfa6

Browse files
raftariomehcode
authored andcommitted
Add actions build job for cargo-sqlx binaries
1 parent 27c6775 commit d78bfa6

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/sqlx.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,45 @@ jobs:
7676
--manifest-path sqlx-core/Cargo.toml
7777
--features offline,all-databases,all-types
7878
79+
cli:
80+
name: CLI Binaries
81+
runs-on: ${{ matrix.os }}
82+
83+
strategy:
84+
matrix:
85+
os: [ubuntu-latest, windows-latest, macOS-latest]
86+
include:
87+
- os: ubuntu-latest
88+
target: x86_64-unknown-linux-musl
89+
args: --features openssl-vendored
90+
bin: target/debug/cargo-sqlx
91+
- os: windows-latest
92+
target: x86_64-pc-windows-msvc
93+
bin: target/debug/cargo-sqlx.exe
94+
- os: macOS-latest
95+
target: x86_64-apple-darwin
96+
bin: target/debug/cargo-sqlx
97+
98+
steps:
99+
- uses: actions/checkout@v2
100+
101+
- uses: actions-rs/toolchain@v1
102+
with:
103+
profile: minimal
104+
toolchain: stable
105+
target: ${{ matrix.target }}
106+
override: true
107+
108+
- uses: actions-rs/cargo@v1
109+
with:
110+
command: build
111+
args: --manifest-path sqlx-cli/Cargo.toml --bin cargo-sqlx ${{ matrix.args }}
112+
113+
- uses: actions/upload-artifact@v2
114+
with:
115+
name: cargo-sqlx-${{ matrix.target }}
116+
path: ${{ matrix.bin }}
117+
79118
sqlite:
80119
name: SQLite
81120
runs-on: ubuntu-20.04

0 commit comments

Comments
 (0)