@@ -79,61 +79,37 @@ jobs:
7979 brew install ca-certificates lz4 mpdecimal readline sqlite xz z3 zstd
8080 brew install openssl@3 || echo "OpenSSL install failed, continuing..."
8181 brew install --ignore-dependencies llvm@19
82- brew install git ninja libtool gettext binutils grep findutils nasm
83- # brew install gcc || echo "GCC install failed, continuing..."
84- # brew install ccache || echo "ccache installation failed, continuing without it"
82+ brew install git ninja libtool gettext binutils grep findutils nasm lld@19 libiconv
8583 brew install go
8684 cd /usr/local/opt/ && sudo rm -f llvm && sudo ln -sf llvm@19 llvm
87- export PATH=$(brew --prefix llvm@19)/bin:$PATH
85+ export PATH=$(brew --prefix llvm@19)/bin:$(brew --prefix lld@19)/bin:$ PATH
8886 which clang++
8987 clang++ --version
88+ which wasm-ld || echo "wasm-ld not found in PATH"
9089 which go
9190 go version
92- ccache -s || echo "ccache not available yet"
93- - name : Scan SQLite vulnerabilities with grype
91+ ccache -s | echo "ccache not available yet"
92+ - name : Upgrade Rust toolchain
9493 run : |
95- # Install grype
96- curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b /usr/local/bin
97-
98- # Update grype vulnerability database
99- grype db update
100-
101- # Check SQLite vulnerabilities in Homebrew packages
102- echo "Scanning SQLite packages for vulnerabilities..."
103- GRYPE_RAW_OUTPUT=$(grype dir:/opt/homebrew --scope all-layers 2>/dev/null || true)
104- echo "Raw grype output:"
105- echo "$GRYPE_RAW_OUTPUT"
106-
107- SQLITE_SCAN_OUTPUT=$(echo "$GRYPE_RAW_OUTPUT" | grep -i sqlite || true)
108-
109- if [ -n "$SQLITE_SCAN_OUTPUT" ]; then
110- echo "❌ SQLite vulnerabilities found in packages! Build should be reviewed."
111- echo "SQLite vulnerability details:"
112- echo "$SQLITE_SCAN_OUTPUT"
113- exit 1
114- else
115- echo "✅ No SQLite vulnerabilities found"
116- fi
117- continue-on-error : false
94+ rustup toolchain install nightly-2025-07-07
95+ rustup default nightly-2025-07-07
96+ rustup component add rust-src
97+ rustc --version
98+ cargo --version
11899 - uses : actions/checkout@v3
119100 with :
120101 fetch-depth : 0
121102 - name : Update submodules
122103 run : |
123104 git submodule update --init --recursive --jobs 4
124- # - name: ccache
125- # uses: hendrikmuhs/[email protected] 126- # with:
127- # key: macos-13-xlarge
128- # max-size: 5G
129- # append-timestamp: true
130105 - name : Run chdb/build.sh
131106 timeout-minutes : 600
132107 run : |
133108 export PATH="$HOME/.pyenv/bin:$PATH"
134109 eval "$(pyenv init -)"
110+ source ~/.cargo/env
135111 pyenv shell 3.8
136- export PATH=$(brew --prefix llvm@19)/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin
112+ export PATH=$(brew --prefix llvm@19)/bin:$(brew --prefix lld@19)/bin: /usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin
137113 export CC=$(brew --prefix llvm@19)/bin/clang
138114 export CXX=$(brew --prefix llvm@19)/bin/clang++
139115 bash gen_manifest.sh
@@ -143,9 +119,10 @@ jobs:
143119 - name : Run chdb/build/build_static_lib.sh
144120 timeout-minutes : 600
145121 run : |
146- export PATH=$HOME/.pyenv/bin:$(brew --prefix llvm@19)/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin
122+ export PATH=$HOME/.pyenv/bin:$(brew --prefix llvm@19)/bin:$(brew --prefix lld@19)/bin: /usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin
147123 export CC=$(brew --prefix llvm@19)/bin/clang
148124 export CXX=$(brew --prefix llvm@19)/bin/clang++
125+ source ~/.cargo/env
149126 eval "$(pyenv init -)"
150127 pyenv shell 3.8
151128 bash ./chdb/build/build_static_lib.sh
@@ -168,28 +145,23 @@ jobs:
168145 - name : Scan chdb libraries with grype
169146 run : |
170147 echo "Scanning chdb libraries for vulnerabilities..."
171-
172148 # Files to scan
173149 FILES_TO_SCAN=""
174150 [ -f libchdb.so ] && FILES_TO_SCAN="$FILES_TO_SCAN libchdb.so"
175151 [ -f libchdb.a ] && FILES_TO_SCAN="$FILES_TO_SCAN libchdb.a"
176152 FILES_TO_SCAN="$FILES_TO_SCAN $(find chdb/ \( -name "*.dylib" -o -name "*.so" \) 2>/dev/null || true)"
177-
178153 SQLITE_VULNERABILITIES_FOUND=false
179-
180154 for file in $FILES_TO_SCAN; do
181155 if [ -f "$file" ]; then
182156 echo "=== Scanning $file ==="
183157 SCAN_OUTPUT=$(grype "$file" 2>/dev/null || true)
184158 echo "$SCAN_OUTPUT"
185-
186159 if echo "$SCAN_OUTPUT" | grep -qi sqlite; then
187160 echo "❌ SQLite vulnerability found in $file"
188161 SQLITE_VULNERABILITIES_FOUND=true
189162 fi
190163 fi
191164 done
192-
193165 if [ "$SQLITE_VULNERABILITIES_FOUND" = true ]; then
194166 echo "❌ SQLite vulnerabilities detected in chdb libraries!"
195167 exit 1
@@ -200,26 +172,11 @@ jobs:
200172 - name : Run libchdb stub in examples dir
201173 run : |
202174 bash -x ./examples/runStub.sh
203- # - name: Keep killall ccache and wait for ccache to finish
204- # if: always()
205- # run: |
206- # sleep 60
207- # while ps -ef | grep ccache | grep -v grep; do \
208- # killall ccache || true; \
209- # sleep 10; \
210- # done
211- # - name: Check ccache statistics
212- # run: |
213- # ccache -s || echo "ccache not available"
214- # ls -lh chdb
215- # df -h
216- # env:
217- # CIBW_ENVIRONMENT_MACOS: "PATH=$(brew --prefix llvm@19)/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin CC=$(brew --prefix llvm@19)/bin/clang CXX=$(brew --prefix llvm@19)/bin/clang++"
218175 - name : Build wheels
219176 run : |
220177 export PATH="$HOME/.pyenv/bin:$PATH"
221178 eval "$(pyenv init -)"
222- export PATH=$(brew --prefix llvm@19)/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin
179+ export PATH=$(brew --prefix llvm@19)/bin:$(brew --prefix lld@19)/bin: /usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin
223180 export CC=$(brew --prefix llvm@19)/bin/clang
224181 export CXX=$(brew --prefix llvm@19)/bin/clang++
225182 pyenv shell 3.8
0 commit comments