-
Notifications
You must be signed in to change notification settings - Fork 16
56 lines (50 loc) · 1.78 KB
/
build-test-virtual.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
44
45
46
47
48
49
50
51
52
53
54
55
56
name: "Build/test (virtual)"
on: [push]
env:
REGISTRY: scittoss.azurecr.io
IMAGE_NAME: test-scitt-vim
TAG: ${{ github.sha }}
jobs:
build-test:
runs-on: ubuntu-20.04
defaults:
run:
shell: bash
container:
image: mcr.microsoft.com/ccf/app/dev:3.0.12-virtual
env:
# Helps to distinguish between CI and local builds.
SCITT_CI: 1
# Additional CMake flags.
PLATFORM: virtual
CMAKE_BUILD_TYPE: Debug
ENABLE_PREFIX_TREE: ON
ENABLE_CLANG_TIDY: ON
# These make CI print all the errors, rather than stopping early.
CXXFLAGS: -ferror-limit=0
NINJA_FLAGS: -k 0
steps:
- name: Checkout repository with tags
uses: actions/checkout@v3
with:
fetch-depth: 0
# Work-around for https://github.com/actions/runner/issues/2033
- name: Work around git safe.directory in container
run: chown -R $(id -u):$(id -g) $PWD
- run: apt-get update && apt-get install -y libcurl4-openssl-dev faketime clang-tidy-10
- run: ./scripts/ci-checks.sh
- run: ./build.sh
- run: ./run_unit_tests.sh
- run: ./run_functional_tests.sh --enable-prefix-tree --enable-faketime
- name: Checkout code
uses: actions/checkout@v2
- name: Login to Azure Container Registry
uses: azure/docker-login@v1
with:
login-server: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build Docker image
run: docker build -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} .
- name: Push Docker image to Azure Container Registry
run: docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}