Skip to content

Commit 6633a47

Browse files
committed
gh actions: add build and test workflow on FreeBSD.
1 parent 0ec945c commit 6633a47

File tree

1 file changed

+92
-0
lines changed

1 file changed

+92
-0
lines changed
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: autotools-freebsd
2+
3+
on:
4+
push:
5+
branches: [ "master", "devel",
6+
"citest",
7+
"citest-autotools",
8+
"citest-autotools-freebsd" ]
9+
tags:
10+
- '**'
11+
pull_request:
12+
branches: [ "master", "devel" ]
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Start FreeBSD VM
20+
id: freebsdvm
21+
uses: vmactions/freebsd-vm@v1
22+
with:
23+
usesh: true
24+
sync: nfs
25+
prepare: |
26+
pkg update
27+
pkg install -y check
28+
run: |
29+
pwd
30+
ls -lah
31+
whoami
32+
env
33+
freebsd-version
34+
sysctl hw.model
35+
sysctl hw.ncpu
36+
sysctl hw.physmem
37+
sysctl hw.usermem
38+
# - name: install prereq.
39+
# shell: freebsd {0}
40+
# run: sudo pkg update ; sudo pkg install -y check
41+
- name: debug env
42+
shell: freebsd {0}
43+
run: |
44+
pwd
45+
ls -la
46+
- name: autogen
47+
shell: freebsd {0}
48+
run: ./autogen.sh
49+
- name: configure
50+
shell: freebsd {0}
51+
run: ./configure
52+
- name: make
53+
shell: freebsd {0}
54+
run: make
55+
- name: make check
56+
shell: freebsd {0}
57+
run: make check
58+
- name: make distcheck
59+
shell: freebsd {0}
60+
run: make distcheck
61+
- name: make install
62+
shell: freebsd {0}
63+
run: sudo make install
64+
- name: check installation
65+
shell: freebsd {0}
66+
run: find /usr/local -iname '*adf*'
67+
- name: update ldconfig
68+
shell: freebsd {0}
69+
run: sudo ldconfig
70+
- name: test installed command-line utils
71+
shell: freebsd {0}
72+
run: ./tests/examples/test_all_examples.sh /usr/local/bin
73+
- name: test installed command-line utils (2)
74+
shell: freebsd {0}
75+
run: |
76+
cat tests/config.sh.in_cmake | \
77+
sed -e 's@\${PROJECT_BINARY_DIR}@'"$GITHUB_WORKSPACE"'@' \
78+
-e 's@\${PROJECT_SOURCE_DIR}@'"$GITHUB_WORKSPACE"'@' \
79+
> tests/config.sh
80+
cat tests/config.sh
81+
./tests/examples2/run_all_tests.sh /usr/local/bin
82+
- name: store logs from failed tests
83+
if: failure()
84+
uses: actions/upload-artifact@v4
85+
with:
86+
name: freebsd_autotools_logs_failed_tests
87+
path: |
88+
tests/*.log
89+
tests/examples/*.log
90+
tests/examples2/*.log
91+
tests/regr/*.log
92+
tests/unit/*.log

0 commit comments

Comments
 (0)