generated from simonthorell/cpp-cmake-googletest
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (29 loc) · 1.06 KB
/
ci.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
name: C++ CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Build the Docker image from your Dockerfile in the .devcontainer directory
- name: Build Docker Image
run: docker build .devcontainer --file .devcontainer/Dockerfile --tag my-dev-container
# Run commands inside the Docker container
- name: Configure CMake
run: docker run --rm -v $PWD:/project -w /project my-dev-container cmake -S . -B build
- name: Build
run: |
docker run --rm -v $PWD:/project -w /project my-dev-container mkdir -p build
docker run --rm -v $PWD:/project -w /project my-dev-container cmake --build build
# - name: Test
# run: docker run --rm --workdir /github/workspace/build my-dev-container ctest -C Debug
# If you want to upload the build artifacts (like executables), you can use this step
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: cpp-mqtt-sqlite
path: build/