1+ name : iPDbOSX
2+ on :
3+ workflow_call :
4+ inputs :
5+ override_git_describe :
6+ type : string
7+ git_ref :
8+ type : string
9+ skip_tests :
10+ type : string
11+ run_all :
12+ type : string
13+ workflow_dispatch :
14+ inputs :
15+ override_git_describe :
16+ type : string
17+ git_ref :
18+ type : string
19+ skip_tests :
20+ type : string
21+ run_all :
22+ type : string
23+ push :
24+ branches-ignore :
25+ - ' main'
26+ - ' feature'
27+ - ' v*.*-*'
28+ paths-ignore :
29+ - ' **.md'
30+ - ' tools/**'
31+ - ' !tools/shell/**'
32+ - ' .github/patches/duckdb-wasm/**'
33+ - ' .github/workflows/**'
34+ - ' !.github/workflows/iPDbOSX.yml'
35+
36+
37+ concurrency :
38+ group : osx-${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }}-${{ inputs.override_git_describe }}
39+ cancel-in-progress : true
40+
41+ env :
42+ GH_TOKEN : ${{ secrets.GH_TOKEN }}
43+ OVERRIDE_GIT_DESCRIBE : ${{ inputs.override_git_describe }}
44+
45+ jobs :
46+ xcode-release :
47+ # Builds binaries for osx_arm64 and osx_amd64
48+ name : OSX Release
49+ runs-on : macos-14
50+ env :
51+ EXTENSION_CONFIGS : ' ${GITHUB_WORKSPACE}/.github/config/bundled_extensions.cmake'
52+ ENABLE_EXTENSION_AUTOLOADING : 1
53+ ENABLE_EXTENSION_AUTOINSTALL : 1
54+ OSX_BUILD_UNIVERSAL : 1
55+ GEN : ninja
56+ ENABLE_LLM_API : 1
57+
58+ steps :
59+ - uses : actions/checkout@v4
60+ with :
61+ fetch-depth : 0
62+ ref : ${{ inputs.git_ref }}
63+
64+ - uses : actions/setup-python@v5
65+ with :
66+ python-version : ' 3.12'
67+
68+ - name : Install Ninja
69+ run : brew install ninja
70+
71+ - name : Install OpenSSL
72+ run : brew install openssl
73+
74+ - name : Setup Ccache
75+ uses : hendrikmuhs/ccache-action@main
76+ with :
77+ key : ${{ github.job }}
78+ save : ${{ github.ref == 'refs/heads/main' || github.repository != 'duckdb/ipdb' }}
79+
80+ - name : Install pytest
81+ run : |
82+ python -m pip install pytest
83+
84+ - name : Check environment variables
85+ env :
86+ LDFLAGS : " -L$(brew --prefix openssl@3)/lib"
87+ CPPFLAGS : " -I$(brew --prefix openssl@3)/include"
88+ PKG_CONFIG_PATH : " $(brew --prefix openssl@3)/lib/pkgconfig"
89+ run : |
90+ echo "LDFLAGS=$LDFLAGS"
91+ echo "CPPFLAGS=$CPPFLAGS"
92+ echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH"
93+
94+ - name : Build
95+ shell : bash
96+ run : |
97+ OPENSSL_PREFIX=$(brew --prefix openssl@3)
98+ export LDFLAGS="-L${OPENSSL_PREFIX}/lib"
99+ export CPPFLAGS="-I${OPENSSL_PREFIX}/include"
100+ export PKG_CONFIG_PATH="${OPENSSL_PREFIX}/lib/pkgconfig"
101+ echo "LDFLAGS=$LDFLAGS"
102+ echo "CPPFLAGS=$CPPFLAGS"
103+ echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH"
104+ make
105+
106+ - name : Print platform
107+ shell : bash
108+ run : ./build/release/ipdb -c "PRAGMA platform;"
109+
110+ # from https://docs.github.com/en/actions/deployment/deploying-xcode-applications/installing-an-apple-certificate-on-macos-runners-for-xcode-development
111+ # - name: Sign Binaries
112+ # shell: bash
113+ # env:
114+ # BUILD_CERTIFICATE_BASE64: ${{ secrets.OSX_CODESIGN_BUILD_CERTIFICATE_BASE64 }}
115+ # P12_PASSWORD: ${{ secrets.OSX_CODESIGN_P12_PASSWORD }}
116+ # KEYCHAIN_PASSWORD: ${{ secrets.OSX_CODESIGN_KEYCHAIN_PASSWORD }}
117+ # run: |
118+ # if [[ "$GITHUB_REPOSITORY" = "duckdb/duckdb" ]] ; then
119+ # . scripts/osx_import_codesign_certificate.sh
120+
121+ # codesign --all-architectures --force --sign "Developer ID Application: Stichting DuckDB Foundation" build/release/duckdb
122+ # codesign --all-architectures --force --sign "Developer ID Application: Stichting DuckDB Foundation" build/release/src/libduckdb*.dylib
123+ # fi
124+
125+ - name : Deploy
126+ shell : bash
127+ env :
128+ AWS_ACCESS_KEY_ID : ${{ secrets.S3_DUCKDB_STAGING_ID }}
129+ AWS_SECRET_ACCESS_KEY : ${{ secrets.S3_DUCKDB_STAGING_KEY }}
130+ run : |
131+ python scripts/amalgamation.py
132+ zip -j ipdb_cli-osx-universal.zip build/release/ipdb
133+
134+ - uses : actions/upload-artifact@v4
135+ with :
136+ name : duckdb-binaries-osx
137+ path : |
138+ duckdb_cli-osx-universal.zip
139+
140+
0 commit comments