File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : NetBSD CI
2+
3+ on :
4+ push :
5+ branches : [ main, adaptiveDt ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ netbsd :
11+ name : NetBSD 10.0 Build
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - uses : actions/checkout@v4
16+
17+ - name : Install QEMU
18+ run : |
19+ sudo apt-get update
20+ sudo apt-get install -y qemu-system-x86 qemu-utils
21+
22+ - name : Download preinstalled NetBSD image
23+ run : |
24+ wget https://cdn.netbsd.org/pub/NetBSD/images/10.0/NetBSD-10.0-amd64.qcow2.gz
25+ gunzip NetBSD-10.0-amd64.qcow2.gz
26+ mv NetBSD-10.0-amd64.qcow2 netbsd.qcow2
27+
28+ - name : Start NetBSD VM
29+ run : |
30+ qemu-system-x86_64 \
31+ -m 2G \
32+ -drive file=netbsd.qcow2,format=qcow2 \
33+ -nic user,hostfwd=tcp::2222-:22 \
34+ -nographic &
35+ sleep 20
36+
37+ - name : Install dependencies inside NetBSD
38+ run : |
39+ ssh -o StrictHostKeyChecking=no -p 2222 root@localhost "
40+ pkgin -y update &&
41+ pkgin -y install clang libomp cmake gmake hdf5
42+ "
43+
44+ - name : Copy source into VM
45+ run : |
46+ scp -P 2222 -o StrictHostKeyChecking=no -r . root@localhost:/root/src
47+
48+ - name : Build inside NetBSD
49+ run : |
50+ ssh -p 2222 -o StrictHostKeyChecking=no root@localhost "
51+ cd /root/src &&
52+ export CC=clang &&
53+ export CXX=clang++ &&
54+ cmake -B build -S . -DCMAKE_BUILD_TYPE=Release &&
55+ cmake --build build -- -j4 &&
56+ cd build &&
57+ ctest --output-on-failure
58+ "
You can’t perform that action at this time.
0 commit comments