generated from microsoft/ccf-app-template
-
Notifications
You must be signed in to change notification settings - Fork 6
115 lines (86 loc) · 2.68 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: "CI"
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
DOCKER_BUILDKIT: 1 # https://docs.docker.com/develop/develop-images/build_enhancements/
jobs:
build-and-test:
runs-on: ubuntu-20.04
container: mcr.microsoft.com/ccf/app/dev:4.0.7-virtual
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Make sure github workspace is git safe
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Build app
run: make build-virtual
- name: Install go
run: curl -L -o go1.19.1.linux-amd64.tar.gz https://go.dev/dl/go1.19.1.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.19.1.linux-amd64.tar.gz
- name: Install pip
run: sudo apt-get update && sudo apt install -y python3-pip
- name: Upgrade pip
run: pip3 install --upgrade pip
- name: Test app
run: make tests
- name: Test app (etcd integration tests)
run: export PATH=$PATH:/usr/local/go/bin && make test-virtual
continue-on-error: true
build-docker-virtual:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build container
run: docker build -t lskv:latest-virtual -f Dockerfile.virtual .
build-docker-sgx:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build container
run: docker build -t lskv:latest-sgx -f Dockerfile.sgx .
checks:
runs-on: ubuntu-latest
container: ccfmsrc.azurecr.io/ccf/ci:16-08-2023-1-virtual-clang15
steps:
- name: Make sure github workspace is git safe
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run checks
run: ./scripts/ci-checks.sh
check-issues:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check issues
run: ./scripts/check-issues.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
nix:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install nix
uses: cachix/install-nix-action@v18
- name: Run ci checks
run: nix build .#ci-check-all -L