-
Notifications
You must be signed in to change notification settings - Fork 4
57 lines (54 loc) · 1.59 KB
/
tests.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
name: tests
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
jobs:
test-cpp:
runs-on: ubuntu-latest
steps:
- name: test on remote server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
envs: GITHUB_REPOSITORY,COMMIT_SHA
script: |
mkdir -p /tmp/ci/$GITHUB_REPOSITORY
cd /tmp/ci/$GITHUB_REPOSITORY
git clone https://github.com/$GITHUB_REPOSITORY.git $COMMIT_SHA
cd $COMMIT_SHA
git checkout $COMMIT_SHA
cmake -H. -Bbuild
make -C build tests
pushd build/test/bin/
./tests
popd
script_stop: true
test-java:
needs: [test-cpp]
runs-on: ubuntu-latest
env:
JAVA_DIR: build/java/bin
steps:
- name: test on remote server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
envs: GITHUB_REPOSITORY,COMMIT_SHA,JAVA_DIR
script: |
cd /tmp/ci/$GITHUB_REPOSITORY/$COMMIT_SHA
make -C build JNITestClasses
cp -R examples/kernels $JAVA_DIR
pushd $JAVA_DIR
java -Djava.library.path=../../ -jar src/junit-platform-console-standalone-1.5.2.jar --class-path . --scan-class-path
popd
script_stop: true