Skip to content

install postgres on runner #25

install postgres on runner

install postgres on runner #25

name: Build Windows Worker
on:
push:
branches:
- "alp/build_windows"
paths:
- "backend/**"
- ".github/workflows/build_windows_worker.yml"
# pull_request:
# types: [opened, synchronize, reopened]
# paths:
# - "backend/**"
# - ".github/workflows/backend-test.yml"
env:
CARGO_INCREMENTAL: 0
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
DISABLE_EMBEDDING: true
RUST_LOG: info
jobs:
cargo_build_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install PostgreSQL using Chocolatey
run: |
choco install postgresql --params '/Password:changeme' -y --params-global
- name: Initialize PostgreSQL
run: |
# Initialize PostgreSQL, set the correct paths
$env:PGROOT = "${Env:ProgramFiles}\PostgreSQL\16\bin"
$env:PGDATA = "${Env:ProgramFiles}\PostgreSQL\16\data"
# & $env:PGROOT\pg_ctl.exe initdb -D $env:PGDATA
# & $env:PGROOT\pg_ctl.exe start -D $env:PGDATA -l logfile
$Env:PGPASSWORD='changme'; '\conninfo' | & $Env:PGROOT/psql.exe -Upostgres
- name: cargo build windows
timeout-minutes: 15
run: mkdir frontend/build && cd backend && New-Item -Path . -Name "windmill-api/openapi-deref.yaml" -ItemType "File" -Force && cargo build --release