build with clang/libc++ #17
This file contains hidden or 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: Make | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
jobs: | |
make-build: | |
name: Build | |
runs-on: ubuntu-latest | |
env: | |
CC: clang-21 | |
CXX: clang++-21 | |
CXXFLAGS: -stdlib=libc++ | |
LDFLAGS: -stdlib=libc++ | |
steps: | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
build-essential \ | |
pkg-config \ | |
libjwt-dev \ | |
libcurl4-openssl-dev \ | |
libssl-dev \ | |
libreadline-dev \ | |
zlib1g-dev \ | |
libxml2-dev \ | |
libxslt1-dev \ | |
uuid-dev \ | |
flex \ | |
bison | |
wget https://apt.llvm.org/llvm.sh | |
chmod +x llvm.sh | |
sudo ./llvm.sh 21 all | |
sudo apt-get install libc++-21-dev libc++abi-21-dev | |
- name: Checkout PostgreSQL source | |
uses: actions/checkout@v4 | |
with: | |
repository: postgres/postgres | |
ref: REL_18_STABLE | |
path: pg-source | |
- name: Checkout pg_oauth extension | |
uses: actions/checkout@v4 | |
with: | |
path: pg-source/contrib/pg_oauth | |
submodules: true | |
- name: Add pg_oauth to contrib Makefile | |
run: | | |
cd pg-source | |
# Add pg_oauth to the SUBDIRS list in contrib/Makefile | |
sed -i '/^SUBDIRS = /s/$/ pg_oauth/' contrib/Makefile | |
- name: Configure PostgreSQL | |
run: | | |
cd pg-source | |
./configure \ | |
--prefix=/usr/local/pgsql \ | |
--enable-debug \ | |
--enable-cassert | |
- name: Build PostgreSQL with pg_oauth | |
run: | | |
cd pg-source | |
make -j$(nproc) | |
make -j -C contrib/pg_oauth |