forked from latchset/jose
-
Notifications
You must be signed in to change notification settings - Fork 0
126 lines (110 loc) · 3.21 KB
/
build.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
---
name: build
on: [push, pull_request]
jobs:
linux:
runs-on: ubuntu-latest
continue-on-error: ${{ ! matrix.stable }}
strategy:
matrix:
compiler:
- gcc
- clang
os:
- fedora:latest
- quay.io/centos/centos:stream9
- quay.io/centos/centos:stream8
- debian:testing
- debian:latest
- ubuntu:rolling
- ubuntu:jammy
- ubuntu:focal
stable:: [true]
include:
- compiler: gcc
os: quay.io/fedora/fedora:rawhide
stable: false
- compiler: clang
os: quay.io/fedora/fedora:rawhide
stable: false
- compiler: gcc
os: ubuntu:devel
stable: false
- compiler: clang
os: ubuntu:devel
stable: false
- compiler: gcc
os: centos:7
stable: true
steps:
- uses: actions/checkout@v3
- name: Show OS information
run: |
cat /etc/os-release 2>/dev/null || echo /etc/os-release not available
- name: Install build dependencies
run: bash .github/workflows/install-dependencies
- name: Build jose
run: |
mkdir -p build && cd build
export ninja=$(command -v ninja)
[ -z "${ninja}" ] && export ninja=$(command -v ninja-build)
meson setup .. || cat meson-logs/meson-log.txt >&2
${ninja}
- name: Run tests
run: |
cd build
if ! meson test; then
cat meson-logs/testlog.txt >&2
exit -1
fi
- name: Show full test logs
run: |
if [ -r build/meson-logs/testlog.txt ]; then
cat build/meson-logs/testlog.txt >&2
else
echo "No test log available" >&2
fi
container:
image: ${{matrix.os}}
env:
DISTRO: ${{matrix.os}}
CC: ${{ matrix.compiler }}
osx:
runs-on: macos-latest
strategy:
matrix:
compiler:
- gcc
- clang
steps:
- uses: actions/checkout@v3
- name: Show OS information
run: |
cat /etc/os-release 2>/dev/null || echo /etc/os-release not available
- name: Install build dependencies
run: bash .github/workflows/install-dependencies
- name: Build jose
run: |
mkdir -p build && cd build
export ninja=$(command -v ninja)
[ -z "${ninja}" ] && export ninja=$(command -v ninja-build)
CFLAGS=-I$(brew --prefix openssl)/include LDFLAGS=-L$(brew --prefix openssl)/lib PKG_CONFIG_PATH=$(brew --prefix openssl)/lib/pkgconfig meson setup .. || cat meson-logs/meson-log.txt >&2
${ninja}
- name: Run tests
run: |
cd build
if ! meson test; then
cat meson-logs/testlog.txt >&2
exit -1
fi
- name: Show full test logs
run: |
if [ -r build/meson-logs/testlog.txt ]; then
cat build/meson-logs/testlog.txt >&2
else
echo "No test log available" >&2
fi
env:
DISTRO: osx:macos-latest
CC: ${{ matrix.compiler }}
# vim:set ts=2 sw=2 et: