Skip to content

Commit e0d9793

Browse files
committed
[Build] Test Linux CLI generation on Debian 12
1 parent 31ccca7 commit e0d9793

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

‎.github/workflows/compatibility.yaml‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,18 @@ jobs:
5151
git rev-parse HEAD > artifacts/source-sha.txt
5252
cd artifacts
5353
zip "prisma-cli-$TARGET.zip" "prisma-cli-$TARGET" source-sha.txt
54+
- name: Test x86 binary on Debian 12 with an empty engine cache
55+
if: matrix.target == 'x86_64-unknown-linux-gnu'
56+
run: |
57+
cp artifacts/prisma-cli-x86_64-unknown-linux-gnu tests/compatibility/prisma
58+
docker run --rm -v "$PWD/tests/compatibility:/work" debian:bookworm-slim sh -ec '
59+
apt-get update -qq
60+
apt-get install -y -qq ca-certificates openssl rustfmt
61+
export PATH=/work:$PATH
62+
export DATABASE_URL=postgresql://postgres@localhost:5432/postgres
63+
prisma generate --schema /work/schema.prisma
64+
test -s /work/prisma.rs
65+
'
5466
- uses: actions/upload-artifact@v4
5567
with:
5668
name: prisma-cli-${{ matrix.target }}-${{ github.sha }}

‎tests/compatibility/schema.prisma‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
generator client {
2+
provider = "prisma"
3+
output = "./prisma.rs"
4+
}
5+
6+
datasource db {
7+
provider = "postgresql"
8+
url = env("DATABASE_URL")
9+
}
10+
11+
enum State {
12+
pending
13+
complete
14+
}
15+
16+
model Item {
17+
id String @id @default(uuid()) @db.Uuid
18+
state State @default(pending)
19+
labels String[]
20+
metadata Json
21+
createdAt DateTime @default(now())
22+
}

0 commit comments

Comments
 (0)