Add actions build job for cargo-sqlx binaries
@@ -76,6 +76,45 @@ jobs:
--manifest-path sqlx-core/Cargo.toml
--features offline,all-databases,all-types
+ cli:
+ name: CLI Binaries
+ runs-on: ${{ matrix.os }}
+
+ strategy:
+ matrix:
+ os: [ubuntu-latest, windows-latest, macOS-latest]
+ include:
+ - os: ubuntu-latest
+ target: x86_64-unknown-linux-musl
+ args: --features openssl-vendored
+ bin: target/debug/cargo-sqlx
+ - os: windows-latest
+ target: x86_64-pc-windows-msvc
+ bin: target/debug/cargo-sqlx.exe
+ - os: macOS-latest
+ target: x86_64-apple-darwin
+ bin: target/debug/cargo-sqlx
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - uses: actions-rs/toolchain@v1
+ with:
+ profile: minimal
+ toolchain: stable
+ target: ${{ matrix.target }}
+ override: true
+
+ - uses: actions-rs/cargo@v1
+ with:
+ command: build
+ args: --manifest-path sqlx-cli/Cargo.toml --bin cargo-sqlx ${{ matrix.args }}
+
+ - uses: actions/upload-artifact@v2
+ with:
+ name: cargo-sqlx-${{ matrix.target }}
+ path: ${{ matrix.bin }}
+
sqlite:
name: SQLite
runs-on: ubuntu-20.04
