-
Notifications
You must be signed in to change notification settings - Fork 4.2k
77 lines (71 loc) · 2.42 KB
/
linux-loongarch64.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: linux-loongarch64
on:
push:
branches: [master]
paths:
- '.github/workflows/linux-loongarch64.yml'
- 'toolchains/loongarch64-linux-gnu.toolchain.cmake'
- 'toolchains/loongarch64-unknown-linux-gnu.toolchain.cmake'
- 'CMakeLists.txt'
- 'cmake/**'
- 'src/*'
- 'src/layer/*'
- 'src/layer/loongarch/**'
- 'tests/**'
pull_request:
branches: [master]
paths:
- '.github/workflows/linux-loongarch64.yml'
- 'toolchains/loongarch64-linux-gnu.toolchain.cmake'
- 'toolchains/loongarch64-unknown-linux-gnu.toolchain.cmake'
- 'CMakeLists.txt'
- 'cmake/**'
- 'src/*'
- 'src/layer/*'
- 'src/layer/loongarch/**'
- 'tests/**'
concurrency:
group: linux-loongarch64-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
gcc-loongarch64:
runs-on: [self-hosted, linux, centos]
steps:
- uses: actions/checkout@v4
# - name: cache-qemu
# id: cache-qemu
# uses: actions/cache@v3
# with:
# path: qemu-install
# key: qemu-loongarch64-install-20230524
# - name: checkout-qemu
# if: steps.cache-qemu.outputs.cache-hit != 'true'
# uses: actions/checkout@v4
# with:
# repository: qemu/qemu
# path: qemu
# ref: 1c12355b31046a6b35a4f50c85c4f01afb1bd728
# - name: qemu
# if: steps.cache-qemu.outputs.cache-hit != 'true'
# run: |
# cd qemu
# ./configure --prefix=$GITHUB_WORKSPACE/qemu-install --target-list=loongarch64-linux-user --disable-system
# make -j2
# make install
# - name: loongarch64-toolchain
# run: |
# wget https://github.com/sunhaiyong1978/CLFS-for-LoongArch/releases/download/8.0/loongarch64-clfs-8.0-cross-tools-gcc-full.tar.xz
# tar -xf loongarch64-clfs-8.0-cross-tools-gcc-full.tar.xz
- name: build
run: |
export LOONGARCH64_ROOT_PATH=/data/action/osd/cross-tools
mkdir build && cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/loongarch64-unknown-linux-gnu.toolchain.cmake -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_TESTS=ON ..
cmake --build . -j 4
- name: test
run: |
export PATH=/data/action/osd/qemu-loongson/qemu-install/bin:$PATH
cd build
TESTS_EXECUTABLE_LOADER=qemu-loongarch64 TESTS_EXECUTABLE_LOADER_ARGUMENTS="-L;/data/action/osd/cross-tools/target" ctest --output-on-failure -j 4