1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

ci,pg,net.openssl: fix pkgconfig paths for macos-12

This commit is contained in:
Delyan Angelov 2023-01-12 15:21:59 +02:00
parent 148d57827c
commit 33191e4538
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
3 changed files with 45 additions and 31 deletions

View File

@ -164,7 +164,7 @@ jobs:
timeout-minutes: 121 timeout-minutes: 121
env: env:
VFLAGS: -cc clang VFLAGS: -cc clang
PKG_CONFIG_PATH: /usr/local/opt/openssl@3/lib/pkgconfig:/opt/homebrew/opt/openssl@3/lib/pkgconfig:/opt/homebrew/lib/pkgconfig PKG_CONFIG_PATH: /usr/local/opt/pkgconfig:/usr/local/opt/libpq/lib/pkgconfig:/usr/local/opt/openssl@3/lib/pkgconfig:/opt/homebrew/lib/pkgconfig:/opt/homebrew/opt/libpq/lib/pkgconfig:/opt/homebrew/opt/openssl@3/lib/pkgconfig
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/setup-node@v1 - uses: actions/setup-node@v1
@ -172,9 +172,10 @@ jobs:
node-version: 12.x node-version: 12.x
- name: Install dependencies - name: Install dependencies
run: | run: |
brew install libpq postgresql openssl
export LIBRARY_PATH="$LIBRARY_PATH:/usr/local/opt/openssl/lib/"
echo "PKG_CONFIG_PATH is '$PKG_CONFIG_PATH'" echo "PKG_CONFIG_PATH is '$PKG_CONFIG_PATH'"
brew install libpq openssl
export LIBRARY_PATH="$LIBRARY_PATH:/usr/local/opt/openssl/lib/"
echo "LIBRARY_PATH is '$LIBRARY_PATH'"
- name: Build V - name: Build V
run: make -j4 && ./v -cg -cstrict -o v cmd/v run: make -j4 && ./v -cg -cstrict -o v cmd/v
- name: Run sanitizers - name: Run sanitizers
@ -185,6 +186,8 @@ jobs:
run: ./v -o v2 cmd/v && ./v2 -o v3 cmd/v run: ./v -o v2 cmd/v && ./v2 -o v3 cmd/v
- name: Test symlink - name: Test symlink
run: ./v symlink run: ./v symlink
- name: Build vpm
run: git clone --depth 1 https://github.com/vlang/vpm && cd vpm && ../v . && cd ..
# - name: Set up pg database # - name: Set up pg database
# run: | # run: |
# pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start # pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
@ -238,8 +241,6 @@ jobs:
ln -s $(pwd) ~/.vmodules/ui ln -s $(pwd) ~/.vmodules/ui
../v examples/rectangles.v ../v examples/rectangles.v
## ../v run examples/build_examples.vsh ## ../v run examples/build_examples.vsh
- name: Build vpm
run: git clone --depth 1 https://github.com/vlang/vpm && cd vpm && ../v . && cd ..
- name: V self compilation with -usecache - name: V self compilation with -usecache
run: | run: |
unset VFLAGS unset VFLAGS

View File

@ -8,25 +8,28 @@ module openssl
#flag linux -I/usr/local/include/openssl #flag linux -I/usr/local/include/openssl
#flag linux -L/usr/local/lib #flag linux -L/usr/local/lib
$if $pkgconfig('openssl') { $if $pkgconfig('openssl') {
#pkgconfig openssl #pkgconfig --cflags --libs openssl
} $else {
#flag windows -l libssl -l libcrypto
#flag -lssl -lcrypto
#flag linux -ldl -lpthread
// MacPorts
#flag darwin -I/opt/local/include
#flag darwin -L/opt/local/lib
// Brew
#flag darwin -I/usr/local/opt/openssl/include
#flag darwin -L/usr/local/opt/openssl/lib
// brew on macos-12 (ci runner)
#flag darwin -I/usr/local/opt/openssl@3/include
#flag darwin -L/usr/local/opt/openssl@3/lib
// Brew arm64
#flag darwin -I /opt/homebrew/opt/openssl/include
#flag darwin -L /opt/homebrew/opt/openssl/lib
// Procursus
#flag darwin -I/opt/procursus/include
#flag darwin -L/opt/procursus/lib
} }
#flag windows -l libssl -l libcrypto
#flag -lssl -lcrypto
#flag linux -ldl -lpthread
// MacPorts
#flag darwin -I/opt/local/include
#flag darwin -L/opt/local/lib
// Brew
#flag darwin -I/usr/local/opt/openssl/include
#flag darwin -L/usr/local/opt/openssl/lib
// Brew arm64
#flag darwin -I /opt/homebrew/opt/openssl/include
#flag darwin -L /opt/homebrew/opt/openssl/lib
// Procursus
#flag darwin -I/opt/procursus/include
#flag darwin -L/opt/procursus/lib
//
#include <openssl/rand.h> # Please install OpenSSL development headers #include <openssl/rand.h> # Please install OpenSSL development headers
#include <openssl/ssl.h> #include <openssl/ssl.h>
#include <openssl/err.h> #include <openssl/err.h>

View File

@ -2,17 +2,27 @@ module pg
import io import io
#flag -lpq $if $pkgconfig('libpq') {
#flag linux -I/usr/include/postgresql #pkgconfig --cflags --libs libpq
#flag darwin -I/opt/local/include/postgresql11 } $else {
#flag darwin -I/opt/homebrew/include #flag -lpq
#flag darwin -L/opt/homebrew/lib #flag linux -I/usr/include/postgresql
#flag darwin -I/opt/homebrew/opt/libpq/include #flag darwin -I/opt/local/include/postgresql11
#flag darwin -L/opt/homebrew/opt/libpq/lib #flag darwin -L/opt/local/lib/postgresql11
#flag windows -I @VEXEROOT/thirdparty/pg/include #flag darwin -I/usr/local/opt/libpq/include
#flag windows -L @VEXEROOT/thirdparty/pg/win64 #flag darwin -L/usr/local/opt/libpq/lib
#flag darwin -I/opt/homebrew/include
#flag darwin -L/opt/homebrew/lib
#flag darwin -I/opt/homebrew/opt/libpq/include
#flag darwin -L/opt/homebrew/opt/libpq/lib
#flag windows -I @VEXEROOT/thirdparty/pg/include
#flag windows -L @VEXEROOT/thirdparty/pg/win64
}
// PostgreSQL Source Code // PostgreSQL Source Code
// https://doxygen.postgresql.org/libpq-fe_8h.html // https://doxygen.postgresql.org/libpq-fe_8h.html