-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (40 loc) · 1.18 KB
/
docker-cmake-build.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
name: "Configure and build"
on:
push:
branches: ["main", "optiv0"]
pull_request:
branches: ["main"]
jobs:
build-container:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build container
run: docker build -t ghcr.io/ibois-epfl/tslam:latest ${{ github.workspace }}
- name: Push
run: docker push ghcr.io/ibois-epfl/tslam:latest
configure-and-build:
needs: build-container
runs-on: ubuntu-latest
container:
image: ghcr.io/ibois-epfl/tslam:latest
steps:
- uses: actions/checkout@v3
- name: Configure
run: cmake -B build -DTSLAM_USE_OWN_EIGEN3:BOOL=OFF .
- uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: configure-artifacts
path: build/
retention-days: 1
- name: Build
run: cmake --build build
- name: Test
run: ctest --test-dir build --output-on_failure