-
Notifications
You must be signed in to change notification settings - Fork 2
148 lines (141 loc) · 4.68 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: Main
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: dependencies
run: sudo apt-get --yes install cppcheck
- name: autogen
run: ./autogen.sh
- name: configure
run: ./configure --enable-checks-cppcheck
- name: check
run: make check
test:
runs-on: ubuntu-latest
strategy:
matrix:
assert: ['--disable-assert', '--enable-assert']
cc: ['gcc', 'clang', 'tcc']
opt: ['', '-O0', '-O3']
steps:
- uses: actions/checkout@v2
- name: dependencies
run: sudo apt-get --yes install clang tcc
- name: autogen
run: ./autogen.sh
- name: configure
run: ./configure ${{matrix.assert}} --enable-fixtures --enable-checks --enable-checks-pthreads --enable-checks-python CC='${{matrix.cc}}' CFLAGS='${{matrix.opt}}'
- name: make
run: make
- name: check
run: make check || (./make/test-suite-log && false)
- name: install
run: sudo make install
cross:
runs-on: ubuntu-22.04 # jammy, because it's in ".github/sources.list"
strategy:
matrix:
cross:
- arch: 'aarch64'
apt_arch: 'arm64'
apt_pkgs: 'crossbuild-essential-arm64'
cprefix: 'aarch64-linux-gnu-'
- arch: 'i386'
apt_arch: 'i386'
apt_pkgs: 'crossbuild-essential-i386'
cprefix: 'i686-linux-gnu-'
- arch: 'riscv64'
apt_arch: 'riscv64'
apt_pkgs: 'crossbuild-essential-riscv64'
cprefix: 'riscv64-linux-gnu-'
steps:
- uses: actions/checkout@v2
- name: apt sources
run: sudo cp .github/sources.list /etc/apt/sources.list
- name: apt upgrade
run: sudo apt-get --yes update && (sudo apt-get --yes upgrade || sudo apt-get --yes -f install)
- name: dependencies
run: sudo apt-get --yes install binfmt-support qemu qemu-user-static ${{matrix.cross.apt_pkgs}}
- name: dpkg arch
run: sudo dpkg --add-architecture ${{matrix.cross.apt_arch}}
- name: apt update
run: sudo apt-get --yes update
- name: cross dependencies
run: sudo apt-get --yes install libc6:${{matrix.cross.apt_arch}}
- name: autogen
run: ./autogen.sh
- name: configure
run: ./configure --host='${{matrix.cross.arch}}-unknown-elf' --enable-checks --enable-checks-pthreads --enable-checks-python CC='${{matrix.cross.cprefix}}gcc'
- name: make
run: make
- name: check
run: make check || (./make/test-suite-log && false)
- name: install
run: sudo make install
cond:
runs-on: ubuntu-latest
strategy:
matrix:
packages:
- without: 'all'
- without: 'io'
- without: 'ntoa'
dependencies: '--without-printf --without-units'
- without: 'printf'
- without: 'memmap'
steps:
- uses: actions/checkout@v2
- name: autogen
run: ./autogen.sh
- name: configure
run: ./configure --enable-checks --enable-checks-pthreads --enable-checks-python --without-${{matrix.packages.without}} ${{matrix.packages.dependencies}}
- name: make
run: make
- name: check
run: make check || (./make/test-suite-log && false)
- name: install
run: sudo make install
freestanding:
runs-on: ubuntu-latest
strategy:
matrix:
assert: ['--disable-assert', '--enable-assert']
steps:
- uses: actions/checkout@v2
- name: apt update
run: sudo apt-get --yes update
- name: dependencies
run: sudo apt-get --yes install crossbuild-essential-i386
- name: autogen
run: ./autogen.sh
- name: configure
run: ./configure --host='i386-elf' ${{matrix.assert}} --enable-freestanding CC="$(which i686-linux-gnu-gcc)"
- name: make
run: make
dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: autogen
run: ./autogen.sh
- name: configure dist
run: ./configure
- name: dist
run: make dist
- name: extract
run: tar -xzf "libkernaux-$(cat VERSION).tar.gz"
- name: configure
run: cd "libkernaux-$(cat VERSION)" && ./configure --enable-checks --enable-checks-pthreads --enable-checks-python
- name: make
run: cd "libkernaux-$(cat VERSION)" && make
- name: check
run: cd "libkernaux-$(cat VERSION)" && make check || (./make/test-suite-log && false)
- name: install
run: cd "libkernaux-$(cat VERSION)" && sudo make install