File tree 2 files changed +17
-3
lines changed
2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,13 @@ jobs:
14
14
include :
15
15
- platform : ' macos-latest' # for Arm based macs (M1 and above).
16
16
args : ' --target aarch64-apple-darwin'
17
+ arch : ' arm64'
17
18
- platform : ' macos-latest' # for Intel based macs.
18
19
args : ' --target x86_64-apple-darwin'
20
+ arch : ' x86_64'
19
21
- platform : ' ubuntu-22.04' # for Linux using ubuntu distribution.
20
22
args : ' '
23
+ arch : ' '
21
24
22
25
runs-on : ${{ matrix.platform }}
23
26
steps :
33
36
targets : ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
34
37
- name : install chdb library
35
38
run : sh ./src-tauri/update_libchdb.sh
39
+ env :
40
+ ARCH : ${{ matrix.arch }}
36
41
- name : install frontend dependencies
37
42
run : npm ci
38
43
- uses : tauri-apps/tauri-action@v0
Original file line number Diff line number Diff line change 3
3
cd $( dirname " ${BASH_SOURCE[0]} " )
4
4
5
5
# Get the newest release version
6
- LATEST_RELEASE=$( curl --silent " https://api.github.com/repos/chdb-io/chdb/releases/latest" | grep ' "tag_name":' | sed -E ' s/.*"([^"]+)".*/\1/' )
6
+ RESPONSE=$( curl --silent --fail " https://api.github.com/repos/chdb-io/chdb/releases/latest" )
7
+ if [ $? -ne 0 ]; then
8
+ echo " Failed to fetch from GitHub API"
9
+ exit 1
10
+ fi
11
+ LATEST_RELEASE=$( echo " $RESPONSE " | grep ' "tag_name":' | sed -E ' s/.*"([^"]+)".*/\1/' )
12
+
7
13
8
14
echo " Latest version found: $LATEST_RELEASE "
9
15
16
+ # Set ARCH to uname -m if not already set
17
+ ARCH=${ARCH:- $(uname -m)}
18
+
10
19
# Download the correct version based on the platform
11
20
case " $( uname -s) " in
12
21
Linux)
13
- if [[ $( uname -m ) == " aarch64" ]]; then
22
+ if [[ $ARCH == " aarch64" ]]; then
14
23
PLATFORM=" linux-aarch64-libchdb.tar.gz"
15
24
else
16
25
PLATFORM=" linux-x86_64-libchdb.tar.gz"
17
26
fi
18
27
;;
19
28
Darwin)
20
- if [[ $( uname -m ) == " arm64" ]]; then
29
+ if [[ $ARCH == " arm64" ]]; then
21
30
PLATFORM=" macos-arm64-libchdb.tar.gz"
22
31
else
23
32
PLATFORM=" macos-x86_64-libchdb.tar.gz"
You can’t perform that action at this time.
0 commit comments