-
Notifications
You must be signed in to change notification settings - Fork 48
57 lines (56 loc) · 1.61 KB
/
build_and_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
name: Build and test libocpp
on:
pull_request: {}
workflow_dispatch:
inputs:
runner:
description: Which runner to use
type: choice
default: 'ubuntu-22.04'
required: true
options:
- 'ubuntu-22.04'
- 'large-ubuntu-22.04-xxl'
jobs:
lint:
name: Lint
runs-on: ${{ inputs.runner || 'ubuntu-22.04' }}
steps:
- name: Checkout libocpp
uses: actions/checkout@v3
with:
path: source
- name: Run clang-format
uses: everest/everest-ci/github-actions/[email protected]
with:
source-dir: source
extensions: hpp,cpp
exclude: cache
install_and_test:
name: Install and test
runs-on: ${{ inputs.runner || 'ubuntu-22.04' }}
steps:
- name: Checkout libocpp
uses: actions/checkout@v3
with:
path: source
- name: Setup run scripts
run: |
mkdir scripts
rsync -a source/.ci/build-kit/ scripts
- name: Pull docker container
run: |
docker pull --platform=linux/x86_64 --quiet ghcr.io/everest/everest-ci/build-kit-base:latest
docker image tag ghcr.io/everest/everest-ci/build-kit-base:latest build-kit
- name: Run install with tests
run: |
docker run \
--volume "$(pwd):/ext" \
--name test-container \
build-kit run-script install_and_test
- name: Archive test results
if: always()
uses: actions/upload-artifact@v3
with:
name: ctest-report
path: ${{ github.workspace }}/ctest-report