-
Notifications
You must be signed in to change notification settings - Fork 79
55 lines (54 loc) · 1.64 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
name: Build and test
on: [workflow_dispatch, pull_request]
jobs:
build:
name: Build
strategy:
matrix:
os: [large-ubuntu-22.04-xxl]
runs-on: ${{ matrix.os }}
steps:
- name: Setup cache
uses: actions/cache@v3
with:
path: cache
key: compile-${{ github.ref }}-${{ github.sha }}
restore-keys: |
compile-${{ github.ref }}-
compile-
- name: Checkout everest-core
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
- name: Setup run scripts
run: |
mkdir scripts
rsync -a source/.ci/build-kit/ scripts
- name: Pull docker container
run: |
docker pull --quiet ghcr.io/everest/build-kit-alpine:latest
docker image tag ghcr.io/everest/build-kit-alpine:latest build-kit
- name: Compile
run: |
docker run \
--volume "$(pwd):/ext" \
--name compile-container \
build-kit run-script compile
- name: Unit tests and install
run: |
docker commit compile-container build-image
docker run \
--volume "$(pwd):/ext" \
--name test-container \
build-image run-script test_and_install
- name: Run integration tests
run: |
docker commit test-container integration-image
pushd source/.ci/e2e
docker-compose run e2e-test-server run-script tests