Repository navigation
53 lines (48 loc) · 1.95 KB
/
Copy pathfreebsd.yml
File metadata and controls
53 lines (48 loc) · 1.95 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
name: FreeBSD
on:
push:
branches: [master]
pull_request:
schedule:
# Monday morning, so a new nginx release that breaks the module shows
# up here and not in somebody's build
- cron: '7 6 * * 1'
workflow_dispatch:
permissions:
contents: read
jobs:
freebsd:
name: build and test in a virtual machine
runs-on: ubuntu-latest
timeout-minutes: 25
# every other workflow measures Linux, and the port this module is
# packaged in is a FreeBSD one
steps:
- uses: actions/checkout@v7
- name: Build and run the suite in a FreeBSD virtual machine
uses: vmactions/freebsd-vm@v1.5.9
with:
release: '14'
prepare: |
# curl and perl are not in base; the sample library is built
# with the base clang, and the module needs no extra library
pkg install -y git pcre2 curl perl5
run: |
. .github/versions.env
ci/build.sh "$NGINX_VERSION" "$HOME/nginx"
# the VM runs as root, so nginx would drop its workers to the
# built-in "nobody", which cannot read the test tree or the
# sample library; pin the workers to root
TEST_NGINX_GLOBALS="user root wheel;" \
TEST_NGINX_NO_SHUFFLE=1 \
TEST_NGINX_BINARY="$HOME/nginx/sbin/nginx" prove -r t/
# a loaded library call end to end
ci/link.sh "$HOME/nginx/sbin/nginx"
# www/nginx ships this module as a loadable object, so that is
# the build the package is made of and it is built here too
ci/build.sh "$NGINX_VERSION" "$HOME/nginx-dyn" dynamic
so=$HOME/nginx-dyn/modules/ngx_http_link_func_module.so
LINK_LOAD_MODULE=$so ci/link.sh "$HOME/nginx-dyn/sbin/nginx"
TEST_NGINX_GLOBALS="user root wheel; load_module $so;" \
TEST_NGINX_NO_SHUFFLE=1 \
TEST_NGINX_BINARY="$HOME/nginx-dyn/sbin/nginx" prove -r t/