forked from modelbox-ai/modelbox
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (58 loc) · 1.53 KB
/
merge-request-ascend.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
name: Merge Request Ascend
on:
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ubuntu-latest
container:
image: modelbox/modelbox-develop-mindspore_1.9.0-cann_6.0.1-ubuntu-x86_64
steps:
- uses: actions/checkout@v3
- run: apt update
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
maven-version: '3.6.2'
cache: 'maven'
- name: Set up Maven
uses: stCarolas/setup-maven@v4.4
with:
maven-version: 3.8.2
- uses: actions/cache@v1
with:
path: /root/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('src/java/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ubuntu-latest-x86_64
max-size: 512M
- name: Remove old modelbox
continue-on-error: true
run: |
dpkg -r $(dpkg -l|grep modelbox|awk '{print $2}')
- name: Configure CMake
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DWITH_WEBUI=off -DCLANG_TIDY=on -DCLANG_TIDY_AS_ERROR=on -DWITH_JAVA=on
- name: Build
working-directory: build
run: |
make package -j8
- name: Test
working-directory: build
run: |
make build-test -j8
unset LD_LIBRARY_PATH
make unittest