-
Notifications
You must be signed in to change notification settings - Fork 133
140 lines (130 loc) · 4.07 KB
/
Copy pathbuild.yml
File metadata and controls
140 lines (130 loc) · 4.07 KB
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
name: C/C++ CI
on:
push:
pull_request:
branches: [ "master" ]
jobs:
linux:
strategy:
matrix:
os: [ubuntu-24.04, ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: install dependencies
run: sudo apt install -y pkg-config
- name: autoconf
run: autoreconf -vif
- name: configure
run: ./configure
- name: make
run: make
- name: make check
run: make check
- name: make distcheck
run: make distcheck
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: install dependencies
run: brew install pkg-config libtool autoconf automake groff
- name: configure
run: LSOF_INCLUDE=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include ./Configure -n darwin
- name: make
run: make -j 2
- name: test
run: bash ./check.bash darwin
- name: autotools build
run: |
git clean -fdx .
autoreconf -vif
./configure
make
DESTDIR=$PWD/prefix make install
make check
- name: dist build and test
run: |
make dist
mkdir temp
cd temp
tar xvf ../lsof-*.tar.gz
cd lsof-*
./configure
make
DESTDIR=$PWD/prefix make install
make check
freebsd:
strategy:
fail-fast: false
matrix:
release: ["15.1", "14.3"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: build and test in a FreeBSD vm
uses: vmactions/freebsd-vm@v1
with:
release: ${{ matrix.release }}
usesh: true
copyback: false
prepare: |
pkg install -y bash git autoconf automake libtool groff pkgconf
run: |
set -e
src=$(pwd)
# Both build paths cut "struct lock_owner" out of the kernel sources
# (configure.ac: HEADER_GENERATE lockf_owner.h), and the release
# image ships an empty /usr/src, so configure stops with
# configure: error: can't read /kern/kern_lockf.c
# unless the sources are there. Unpack just usr/src/sys out of the
# release source set; that is ~15s and about 580MB on disk.
rel=$(uname -r | sed 's/-p[0-9]*$//')
fetch -o /tmp/src.txz "https://download.freebsd.org/releases/$(uname -m)/${rel}/src.txz"
tar -xf /tmp/src.txz -C / usr/src/sys
# autotools build, out of tree so the source tree stays pristine for
# the legacy Configure run below
autoreconf -vif
mkdir /tmp/build
cd /tmp/build
"$src"/configure
make
make check || { cat test-suite.log; exit 1; }
cd "$src"
# legacy Configure, the path .cirrus.yml used to cover
./Configure -n freebsd
make
bash ./check.bash freebsd
openbsd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: build and test in an OpenBSD vm
uses: vmactions/openbsd-vm@v1
with:
release: "7.9"
usesh: true
copyback: false
prepare: |
pkg_add -I bash git libtool groff autoconf-2.72p0 automake-1.18.1
run: |
set -e
src=$(pwd)
export AUTOCONF_VERSION=2.72
export AUTOMAKE_VERSION=1.18
# autotools path: build only. "make check" additionally fails
# tests/LTbasic2 here with "opened regular file wasn't found";
# that test is not part of the legacy suite below and is left
# for a separate fix. libtool has to come from packages -- the
# base /usr/bin/libtool is a different program and aclocal
# cannot find LT_INIT without the package's m4 files.
autoreconf -vif
mkdir /tmp/build
cd /tmp/build
"$src"/configure
make
cd "$src"
# legacy Configure, the path .builds/openbsd.yml covered
./Configure -n openbsd
make
bash ./check.bash openbsd