install postgres on runner #22
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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:PGDATA = "${Env:ProgramFiles}\PostgreSQL\16\data"" | |
& $env:PGROOT\pg_ctl.exe initdb -D $env:PGDAT& $env:PGROOT\pg_ctl.exe initdb -D $env:PGDATAA | |
& $env:PGROOT\pg_ctl.exe start -D $env:PGDATA -l logfile | |
- 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 | |