-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (61 loc) · 1.88 KB
/
docker-build-test.yaml
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
name: docker-build-test
on:
- pull_request
- push
jobs:
docker-build:
runs-on: [self-hosted, flexxlam]
steps:
- uses: actions/checkout@v3
with:
submodules: true
ref: ${{ github.ref }}
- name: Docker build
run: docker build . -t jmarpledev/flexxlam_sdk:github_action -f docker/Dockerfile --build-arg UID=$(id -u) --build-arg GID=$(id -g)
format-lint:
runs-on: [self-hosted, flexxlam]
needs: docker-build
steps:
- name: format-and-lint
uses: addnab/docker-run-action@v3
with:
image: jmarpledev/flexxlam_sdk:github_action
shell: bash
options: -v ${{ github.workspace }}:/home/user/flexxlam_sdk
run: |
cd ~/flexxlam_sdk && \
export PATH=$PATH:/home/user/.local/bin && \
./run_check.sh all
build-test:
runs-on: [self-hosted, flexxlam]
needs: docker-build
steps:
- name: build-test
uses: addnab/docker-run-action@v3
with:
image: jmarpledev/flexxlam_sdk:github_action
shell: bash
options: -v ${{ github.workspace }}:/home/user/flexxlam_sdk
run: |
rm -rf ~/flexxlam_sdk/build && \
mkdir -p ~/flexxlam_sdk/build && \
cd ~/flexxlam_sdk/build && \
cmake .. && \
make -j
unit-test:
runs-on: [self-hosted, flexxlam]
needs: docker-build
steps:
- name: build-and-unittest
uses: addnab/docker-run-action@v3
with:
image: jmarpledev/flexxlam_sdk:github_action
shell: bash
options: -v ${{ github.workspace }}:/home/user/flexxlam_sdk
run: |
rm -rf ~/flexxlam_sdk/build && \
mkdir -p ~/flexxlam_sdk/build && \
cd ~/flexxlam_sdk/build && \
cmake -Dtest=true .. && \
make -j && \
ctest