Skip to content

Commit 0df4642

Browse files
committed
修复cmake install
自动上传CI编译后文件
1 parent 35b3444 commit 0df4642

File tree

4 files changed

+34
-30
lines changed

4 files changed

+34
-30
lines changed

.github/workflows/build_650.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ name: build_650
66
on:
77
# Triggers the workflow on push or pull request events but only for the "main" branch
88
push:
9-
branches: [ "prefill_kvcaches_context" ]
9+
branches: [ "ax-context" ]
1010
pull_request:
11-
branches: [ "prefill_kvcaches_context" ]
11+
branches: [ "ax-context" ]
1212

1313
# Allows you to run this workflow manually from the Actions tab
1414
workflow_dispatch:
@@ -29,16 +29,10 @@ jobs:
2929

3030
# Runs a set of commands using the runners shell
3131
- name: build
32-
run: |
33-
mkdir build
34-
cd build
35-
git clone https://github.com/AXERA-TECH/ax650n_bsp_sdk.git
36-
export ax_bsp=$PWD/ax650n_bsp_sdk/msp/out/
37-
echo $ax_bsp
38-
wget https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz
39-
tar -xf gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz
40-
export PATH=$PATH:gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin/
41-
aarch64-none-linux-gnu-gcc -v
42-
cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/aarch64-none-linux-gnu.toolchain.cmake -DBSP_MSP_DIR=${ax_bsp}/ ..
43-
make -j8
44-
make install
32+
run: sh ./build.sh
33+
34+
- name: Upload x86 artifact
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: build-ax650-3.6.2-ax-context
38+
path: build/install/

CMakeLists.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,4 @@ endfunction()
6363
build_exec(main src/main.cpp)
6464
build_exec(main_api src/main_api.cpp)
6565

66-
file(GLOB RUN_SCRIPT "${CMAKE_SOURCE_DIR}/scripts/*.py" "${CMAKE_SOURCE_DIR}/scripts/*.sh")
67-
install(FILES ${RUN_SCRIPT} DESTINATION bin/)
68-
69-
file(GLOB LLAMA3_TOKENIZER "${CMAKE_SOURCE_DIR}/scripts/llama3_tokenizer/*")
70-
install(FILES ${LLAMA3_TOKENIZER} DESTINATION bin/llama3_tokenizer/)
71-
72-
# add_executable(fp32_to_bf16 tools/fp32_to_bf16.cpp)
66+
install(DIRECTORY ${CMAKE_SOURCE_DIR}/scripts/ DESTINATION bin/scripts)

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@
4343
- [Qwen2.5-7B-Instruct](https://huggingface.co/AXERA-TECH/Qwen2.5-7B-Instruct)
4444
- [Qwen2.5-1.5B-Instruct](https://huggingface.co/AXERA-TECH/Qwen2.5-1.5B-Instruct)
4545

46+
## CI Status
47+
48+
| Architecture | Status |Download|
49+
|--------------|--------|--------|
50+
| x86 | ![Build](https://github.com/AXERA-TECH/ax-llm/actions/workflows/build.yml/badge.svg?branch=ax-context&label=ax650&job=build) |[download](https://nightly.link/AXERA-TECH/ax-llm/workflows/build/ax-context/build-ax650-3.6.2-ax-context.zip) |
51+
4652
## 源码编译
4753

4854
- clone 本项目

build.sh

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,23 @@
22

33
# BSP_MSP_DIR 这个变量使用*绝对路径*指定到 SDK 的msp/out目录,如下所示(根据自己的目录修改)
44
# 绝对路径 绝对路径 绝对路径
5-
BSP_MSP_DIR=$PWD/bsp_msp_out/msp/out/
5+
6+
# build_dir 修改为自己想要的编译目录名称
7+
build_dir=build_test
8+
echo "build dir: ${build_dir}"
9+
mkdir ${build_dir}
10+
cd ${build_dir}
11+
12+
bsp_url="https://github.com/ZHEQIUSHUI/assets/releases/download/ax_3.6.2/msp_3.6.2.zip"
13+
if [ ! -d "msp_3.6.2" ]; then
14+
echo "Downloading bsp from ${bsp_url}"
15+
if [ ! -f "msp_3.6.2.zip" ]; then
16+
wget ${bsp_url}
17+
fi
18+
unzip msp_3.6.2.zip
19+
fi
20+
21+
BSP_MSP_DIR=$PWD/msp_3.6.2/out/
622
echo "bsp dir: ${BSP_MSP_DIR}"
723
# 下面会简单判断 BSP 路径是否正确
824
if [ ! -d "${BSP_MSP_DIR}" ]; then
@@ -15,12 +31,6 @@ if [ ! -f "${BSP_MSP_DIR}/lib/libax_sys.so" ]; then
1531
exit 1
1632
fi
1733

18-
# build_dir 修改为自己想要的编译目录名称
19-
build_dir=build
20-
echo "build dir: ${build_dir}"
21-
mkdir ${build_dir}
22-
cd ${build_dir}
23-
2434
# 下载失败可以使用其他方式下载并放到在 $build_dir 目录,参考如下命令解压
2535
URL="https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz"
2636
FOLDER="gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu"
@@ -50,6 +60,6 @@ if [ $? -ne 0 ]; then
5060
fi
5161

5262
# 开始编译
53-
cmake -DBSP_MSP_DIR=${BSP_MSP_DIR} -DCMAKE_TOOLCHAIN_FILE=../toolchains/aarch64-none-linux-gnu.toolchain.cmake ..
63+
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./install -DBSP_MSP_DIR=${BSP_MSP_DIR} -DCMAKE_TOOLCHAIN_FILE=../toolchains/aarch64-none-linux-gnu.toolchain.cmake ..
5464
make -j16
5565
make install

0 commit comments

Comments
 (0)