-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from theseus-rs/windows-utf8-support
feat: add windows UTF-8 support
- Loading branch information
Showing
2 changed files
with
10 additions
and
61 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -174,7 +174,6 @@ jobs: | |
# MacOS | ||
# | ||
|
||
# Update to use macos-latest-large when available: https://github.com/github/roadmap/issues/819 | ||
- id: macos-arm64 | ||
target: aarch64-apple-darwin | ||
os: macos-14 | ||
|
@@ -210,7 +209,7 @@ jobs: | |
if [ -z "$version" ]; then | ||
# Set default version for non-release builds | ||
version="16.1.0" | ||
version="16.2.0" | ||
fi | ||
root_directory="$(pwd)" | ||
|
@@ -332,69 +331,18 @@ jobs: | |
# Windows | ||
# | ||
|
||
- name: Checkout postgresql source code (Windows) | ||
- name: Download binaries (Windows) | ||
if: ${{ startsWith(matrix.id, 'windows-') }} | ||
run: | | ||
source_directory="$ROOT_DIRECTORY/postgresql-src" | ||
branch=$(echo "$VERSION" | awk -F. '{print "REL_"$1"_"$2}') | ||
git clone --depth 1 --branch $branch -c advice.detachedHead=false https://git.postgresql.org/git/postgresql.git "$source_directory" | ||
echo "SOURCE_DIRECTORY=$source_directory" | tee -a $GITHUB_ENV | ||
- name: Install Perl (Windows) | ||
if: ${{ startsWith(matrix.id, 'windows-') }} | ||
uses: shogo82148/actions-setup-perl@v1 | ||
|
||
- name: Install Python (Windows) | ||
if: ${{ startsWith(matrix.id, 'windows-') }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Install meson and ninja (Windows) | ||
if: ${{ startsWith(matrix.id, 'windows-') }} | ||
run: | | ||
pip install meson ninja | ||
postgresql_version=$(echo "$VERSION" | awk -F. '{print $1"."$2}') | ||
curl https://get.enterprisedb.com/postgresql/postgresql-${postgresql_version}-1-windows-x64-binaries.zip > postgresql.zip | ||
- name: Configure MSVC (Windows) | ||
if: ${{ startsWith(matrix.id, 'windows-') }} | ||
uses: ilammy/[email protected] | ||
|
||
- name: Install dependencies (Windows) | ||
if: ${{ startsWith(matrix.id, 'windows-') }} | ||
run: | | ||
export CYGWIN_INSTALL_DIR="/c/cygwin" | ||
export PACKAGES="bison,core-utils,flex,python3,python3-devel" | ||
curl -O https://cygwin.com/setup-x86_64.exe | ||
./setup-x86_64.exe \ | ||
--quiet-mode \ | ||
--no-desktop \ | ||
--no-shortcuts \ | ||
--local-package-dir "${CYGWIN_INSTALL_DIR}/packages" \ | ||
--packages "${PACKAGES}" \ | ||
--root "${CYGWIN_INSTALL_DIR}" \ | ||
--site https://mirrors.kernel.org/sourceware/cygwin/ | ||
echo "PATH=${PATH}:${CYGWIN_INSTALL_DIR}/bin" | tee -a $GITHUB_ENV | ||
- name: Build (Windows) | ||
- name: Extract binaries (Windows) | ||
if: ${{ startsWith(matrix.id, 'windows-') }} | ||
run: | | ||
echo "PATH (before)=$PATH" | ||
# Move /mingw/bin and /usr/bin to the end of PATH to build with MSVC | ||
export PATH=$(echo $PATH | awk -F: '{print substr($0, index($0, $3))":"$1":"$2}') | ||
echo "PATH (after)=$PATH" | ||
cd "$SOURCE_DIRECTORY" | ||
./configure \ | ||
--prefix "$INSTALL_DIRECTORY" \ | ||
--with-readline \ | ||
--with-template=win32 \ | ||
--without-icu | ||
make | ||
make install | ||
cp "$SOURCE_DIRECTORY/COPYRIGHT" "$INSTALL_DIRECTORY" | ||
cd "$ROOT_DIRECTORY" | ||
unzip postgresql.zip | ||
rm -rf pgsql/doc pgsql/pgAdmin* | ||
mv pgsql "$INSTALL_DIRECTORY" | ||
# | ||
# Package | ||
|
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