-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (60 loc) · 2.12 KB
/
test.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
name: test
on: push
env:
# name of the template instance
INSTANCE_NAME: test-deploy
jobs:
debian-10-test:
name: Test on Debian 10
runs-on: ubuntu-latest
container:
image: debian:buster-backports
env:
CC: /usr/bin/clang-8
CXX: /usr/bin/clang++-8
steps:
- name: Checkout code
uses: actions/checkout@v2
# Relative path elements aren't allowed in cache paths.
- name: Get parent directory
id: get-parent
run: echo "::set-output name=parent::$(/usr/bin/dirname $(pwd))"
shell: bash
- name: Cache sbt dependencies
uses: actions/cache@v2
with:
path: |
~/.ivy2/cache
~/.sbt
key: sbt
- name: Cache CMake dependencies
uses: actions/cache@v2
with:
path: ${{ steps.get-parent.outputs.parent }}/test/$INSTANCE_NAME/target/cmake/_deps
key: cmake
- name: Install Linux tools
run: |
apt-get -qq update
apt-get -qq -o=Dpkg::Use-Pty=0 install curl gnupg sudo tree
- name: Install compilation tools
run: |
echo "deb https://dl.bintray.com/sbt/debian /" >/etc/apt/sources.list.d/sbt.list
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | apt-key add
apt-get -qq update
apt-get -qq -o=Dpkg::Use-Pty=0 install doxygen-gui doxygen-doc openjdk-11-jdk swig sbt
apt-get -qq -o=Dpkg::Use-Pty=0 -t buster-backports install cmake-qt-gui cmake-doc clang-8 clang-8-doc libc++1-8 ninja-build
- name: Instantiate the template
run: |
mkdir ../test
cd ../test
sbt -Dsbt.ci=true -Dsbt.supershell=false new file://"$GITHUB_WORKSPACE" --name=$INSTANCE_NAME --package=com.test
- name: Run CMake build
run: |
cd ../test/$INSTANCE_NAME
cmake -S src -B target/cmake -G Ninja
cmake --build target/cmake
(cd target/cmake; ctest -VV)
- name: Let's see the files
run: |
cd ../test/$INSTANCE_NAME
tree -h