mirror of https://github.com/buster-so/buster.git
ok remove windows and test
This commit is contained in:
parent
9a8297c747
commit
415b964930
|
@ -31,10 +31,10 @@ jobs:
|
||||||
target: aarch64-apple-darwin
|
target: aarch64-apple-darwin
|
||||||
artifact_name: buster-cli-darwin-arm64.tar.gz
|
artifact_name: buster-cli-darwin-arm64.tar.gz
|
||||||
use_tar: true
|
use_tar: true
|
||||||
- os: windows-latest
|
# - os: windows-latest
|
||||||
target: x86_64-pc-windows-msvc
|
# target: x86_64-pc-windows-msvc
|
||||||
artifact_name: buster-cli-windows-x86_64.zip
|
# artifact_name: buster-cli-windows-x86_64.zip
|
||||||
use_tar: false
|
# use_tar: false
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
@ -71,42 +71,6 @@ jobs:
|
||||||
env:
|
env:
|
||||||
HOMEBREW_NO_INSTALL_CLEANUP: 1 # Recommended for CI to speed up
|
HOMEBREW_NO_INSTALL_CLEANUP: 1 # Recommended for CI to speed up
|
||||||
|
|
||||||
- name: Install libpq (Windows)
|
|
||||||
if: runner.os == 'Windows'
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
$ProgressPreference = "SilentlyContinue" # Optional: for cleaner logs
|
|
||||||
|
|
||||||
$PG_VERSION = "16.2.0" # Specify the desired PostgreSQL version
|
|
||||||
$PG_TARGET = "x86_64-pc-windows-msvc"
|
|
||||||
$PG_ARCHIVE_NAME = "postgresql-${PG_VERSION}-${PG_TARGET}.tar.gz"
|
|
||||||
$PG_DOWNLOAD_URL = "https://github.com/theseus-rs/postgresql-binaries/releases/download/v${PG_VERSION}/${PG_ARCHIVE_NAME}"
|
|
||||||
$PG_INSTALL_DIR = "C:/pgsql"
|
|
||||||
|
|
||||||
Write-Host "Downloading PostgreSQL binaries from $PG_DOWNLOAD_URL"
|
|
||||||
Invoke-WebRequest -Uri $PG_DOWNLOAD_URL -OutFile $PG_ARCHIVE_NAME
|
|
||||||
|
|
||||||
Write-Host "Extracting PostgreSQL binaries to $PG_INSTALL_DIR"
|
|
||||||
New-Item -ItemType Directory -Force -Path $PG_INSTALL_DIR
|
|
||||||
tar -xzf $PG_ARCHIVE_NAME -C $PG_INSTALL_DIR --strip-components=1 # Assumes archive has a top-level dir
|
|
||||||
|
|
||||||
Write-Host "Setting up environment variables for libpq"
|
|
||||||
$PG_LIB_PATH = Join-Path $PG_INSTALL_DIR "lib"
|
|
||||||
$PG_BIN_PATH = Join-Path $PG_INSTALL_DIR "bin"
|
|
||||||
|
|
||||||
echo "RUSTFLAGS=-L ${PG_LIB_PATH}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
||||||
echo "PATH=${PG_BIN_PATH};${env:PATH}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
||||||
|
|
||||||
Write-Host "PostgreSQL lib path: $PG_LIB_PATH"
|
|
||||||
Write-Host "PostgreSQL bin path added to PATH: $PG_BIN_PATH"
|
|
||||||
Write-Host "Contents of ${PG_LIB_PATH}:"
|
|
||||||
Get-ChildItem $PG_LIB_PATH
|
|
||||||
Write-Host "Contents of ${PG_BIN_PATH}:"
|
|
||||||
Get-ChildItem $PG_BIN_PATH
|
|
||||||
Write-Host "Updated RUSTFLAGS: $env:RUSTFLAGS"
|
|
||||||
Write-Host "Updated PATH: $env:PATH"
|
|
||||||
|
|
||||||
- name: Configure Cargo for optimized build
|
- name: Configure Cargo for optimized build
|
||||||
run: |
|
run: |
|
||||||
mkdir -p .cargo
|
mkdir -p .cargo
|
||||||
|
@ -131,14 +95,14 @@ jobs:
|
||||||
else
|
else
|
||||||
sha256sum ${{ matrix.artifact_name }} > ${{ matrix.artifact_name }}.sha256
|
sha256sum ${{ matrix.artifact_name }} > ${{ matrix.artifact_name }}.sha256
|
||||||
fi
|
fi
|
||||||
- name: Compress binary (Windows)
|
# - name: Compress binary (Windows)
|
||||||
if: matrix.use_tar == false
|
# if: matrix.use_tar == false
|
||||||
working-directory: ./cli
|
# working-directory: ./cli
|
||||||
shell: pwsh
|
# shell: pwsh
|
||||||
run: |
|
# run: |
|
||||||
cd target/${{ matrix.target }}/release
|
# cd target/${{ matrix.target }}/release
|
||||||
Compress-Archive -Path buster-cli.exe -DestinationPath ${{ matrix.artifact_name }}
|
# Compress-Archive -Path buster-cli.exe -DestinationPath ${{ matrix.artifact_name }}
|
||||||
Get-FileHash -Algorithm SHA256 ${{ matrix.artifact_name }} | Select-Object -ExpandProperty Hash > ${{ matrix.artifact_name }}.sha256
|
# Get-FileHash -Algorithm SHA256 ${{ matrix.artifact_name }} | Select-Object -ExpandProperty Hash > ${{ matrix.artifact_name }}.sha256
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
@ -178,8 +142,8 @@ jobs:
|
||||||
**/buster-cli-darwin-x86_64.tar.gz.sha256
|
**/buster-cli-darwin-x86_64.tar.gz.sha256
|
||||||
**/buster-cli-darwin-arm64.tar.gz
|
**/buster-cli-darwin-arm64.tar.gz
|
||||||
**/buster-cli-darwin-arm64.tar.gz.sha256
|
**/buster-cli-darwin-arm64.tar.gz.sha256
|
||||||
**/buster-cli-windows-x86_64.zip
|
# **/buster-cli-windows-x86_64.zip
|
||||||
**/buster-cli-windows-x86_64.zip.sha256
|
# **/buster-cli-windows-x86_64.zip.sha256
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
|
|
Loading…
Reference in New Issue