-
Notifications
You must be signed in to change notification settings - Fork 10
128 lines (108 loc) · 5.42 KB
/
main.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
116
117
118
119
120
121
122
123
124
125
126
127
128
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
strategy:
matrix:
config:
# Linux (amd64, Xenial, GCC, OpenSSL)
- platform: 'ubuntu-latest'
container: 'ghcr.io/libgit2/libgit2/xenial:latest'
env: { CC: 'gcc', CMAKE_OPTIONS: '-DCRYPT=openssl -DUNICODE=builtin', LEAK_CHECK: 'valgrind' }
# Linux (amd64, Xenial, GCC, mbedTLS)
- platform: 'ubuntu-latest'
container: 'ghcr.io/libgit2/libgit2/xenial:latest'
env: { CC: 'gcc', CMAKE_OPTIONS: '-DCRYPT=mbedtls -DUNICODE=iconv', LEAK_CHECK: 'valgrind' }
# Linux (amd64, Xenial, Clang, OpenSSL)
- platform: 'ubuntu-latest'
container: 'ghcr.io/libgit2/libgit2/xenial:latest'
env: { CC: 'clang', CMAKE_OPTIONS: '-DCRYPT=openssl -DUNICODE=iconv', LEAK_CHECK: 'valgrind' }
# Linux (amd64, Xenial, Clang, OpenSSL Dynamic)
- platform: 'ubuntu-latest'
container: 'ghcr.io/libgit2/libgit2/xenial:latest'
env: { CC: 'clang', CMAKE_OPTIONS: '-DCRYPT=openssl-dynamic -DUNICODE=iconv', LEAK_CHECK: 'valgrind' }
# Linux (amd64, Xenial, Clang, mbedTLS)
- platform: 'ubuntu-latest'
container: 'ghcr.io/libgit2/libgit2/xenial:latest'
env: { CC: 'clang', CMAKE_OPTIONS: '-DCRYPT=mbedtls -DUNICODE=builtin', LEAK_CHECK: 'valgrind' }
# Linux (x86, Bionic, gcc, OpenSSL)
- platform: 'ubuntu-latest'
container: 'ghcr.io/libgit2/libgit2/bionic-x86:latest'
qemu: true
env: { CC: 'gcc', CMAKE_GENERATOR: 'Ninja', CMAKE_OPTIONS: '-DCRYPT=openssl -DUNICODE=builtin', LEAK_CHECK: 'valgrind' }
# Linux (x86, Bionic, gcc, OpenSSL Dynamic)
- platform: 'ubuntu-latest'
container: 'ghcr.io/libgit2/libgit2/bionic-x86:latest'
qemu: true
env: { CC: 'gcc', CMAKE_GENERATOR: 'Ninja', CMAKE_OPTIONS: '-DCRYPT=openssl-dynamic -DUNICODE=builtin', LEAK_CHECK: 'valgrind' }
# Linux (x86, Bionic, clang, OpenSSL)
- platform: 'ubuntu-latest'
container: 'ghcr.io/libgit2/libgit2/bionic-x86:latest'
qemu: true
env: { CC: 'clang', CMAKE_GENERATOR: 'Ninja', CMAKE_OPTIONS: '-DCRYPT=openssl -DUNICODE=iconv', LEAK_CHECK: 'valgrind' }
# Linux (arm32, Bionic, gcc, OpenSSL)
- platform: 'ubuntu-latest'
container: 'ghcr.io/libgit2/libgit2/bionic-arm32:latest'
qemu: true
env: { CC: 'gcc', CMAKE_GENERATOR: 'Ninja', CMAKE_OPTIONS: '-DCRYPT=openssl -DUNICODE=builtin' }
# Linux (arm32, Bionic, gcc, OpenSSL Dynamic)
- platform: 'ubuntu-latest'
container: 'ghcr.io/libgit2/libgit2/bionic-arm32:latest'
qemu: true
env: { CC: 'gcc', CMAKE_GENERATOR: 'Ninja', CMAKE_OPTIONS: '-DCRYPT=openssl-dynamic -DUNICODE=builtin' }
# Linux (arm64, Bionic, gcc, OpenSSL)
- platform: 'ubuntu-latest'
container: 'ghcr.io/libgit2/libgit2/bionic-arm64:latest'
qemu: true
env: { CC: 'gcc', CMAKE_GENERATOR: 'Ninja', CMAKE_OPTIONS: '-DCRYPT=openssl -DUNICODE=builtin' }
# Linux (arm64, Bionic, gcc, OpenSSL Dynamic)
- platform: 'ubuntu-latest'
container: 'ghcr.io/libgit2/libgit2/bionic-arm64:latest'
qemu: true
env: { CC: 'gcc', CMAKE_GENERATOR: 'Ninja', CMAKE_OPTIONS: '-DCRYPT=openssl-dynamic -DUNICODE=builtin' }
# Linux (amd64, CentOS 7, gcc, OpenSSL)
- platform: 'ubuntu-latest'
container: 'ghcr.io/libgit2/libgit2/centos7:latest'
qemu: true
env: { CC: 'gcc', CMAKE_OPTIONS: '-DCRYPT=openssl -DUNICODE=builtin' }
# Linux (arm64, CentOS 7, gcc, OpenSSL Dynamic)
- platform: 'ubuntu-latest'
container: 'ghcr.io/libgit2/libgit2/centos7:latest'
qemu: true
env: { CC: 'gcc', CMAKE_OPTIONS: '-DCRYPT=openssl-dynamic -DUNICODE=builtin' }
# Linux (amd64, CentOS 8, gcc, OpenSSL)
- platform: 'ubuntu-latest'
container: 'ghcr.io/libgit2/libgit2/centos8:latest'
qemu: true
env: { CC: 'gcc', CMAKE_OPTIONS: '-DCRYPT=openssl -DUNICODE=builtin' }
# Linux (arm64, CentOS 8, gcc, OpenSSL Dynamic)
- platform: 'ubuntu-latest'
container: 'ghcr.io/libgit2/libgit2/centos8:latest'
qemu: true
env: { CC: 'gcc', CMAKE_OPTIONS: '-DCRYPT=openssl-dynamic -DUNICODE=builtin' }
# macOS
- platform: 'macos-latest'
container: ''
env: { LEAK_CHECK: 'leaks' }
fail-fast: false
runs-on: ${{ matrix.config.platform }}
steps:
- uses: actions/checkout@v4
- name: Set up build environment
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
if: matrix.config.qemu == true
- name: Build and test
env: ${{ matrix.config.env }}
run: |
if [ -n "${{ matrix.config.container }}" ]; then
docker run -v $(pwd):/src -w /src -e CC -e CMAKE_GENERATOR -e CMAKE_OPTIONS -e PKG_CONFIG_PATH -e SKIP_SSH_TESTS -e SKIP_NEGOTIATE_TESTS ${{ matrix.config.container }} /bin/bash -c "mkdir build && cd build && ../ci/build.sh && ../ci/test.sh"
else
mkdir build && cd build
../ci/build.sh
../ci/test.sh
fi