v / .github / workflows / freebsd_ci.yml
149 lines · 138 sloc · 4.65 KB · eca96b530eeb5d34c5badc10e007f49ef5429ef4
Raw
1name: CI FreeBSD
2
3on:
4 workflow_dispatch:
5 push:
6 branches:
7 - master
8 paths-ignore:
9 - '**.md'
10 - '**.yml'
11 - 'cmd/tools/**'
12 - '!**/freebsd_ci.yml'
13 - '!ci/freebsd_ci.vsh'
14 - '!cmd/tools/builders/**.v'
15 pull_request:
16 paths-ignore:
17 - '**.md'
18 - '**.yml'
19 - 'cmd/tools/**'
20 - '!**/freebsd_ci.yml'
21 - '!ci/freebsd_ci.vsh'
22 - '!cmd/tools/builders/**.v'
23
24### See https://github.com/cross-platform-actions/action
25### for a description of the used fields here
26
27jobs:
28 tcc-freebsd:
29 runs-on: ubuntu-latest
30 timeout-minutes: 20
31 steps:
32 - uses: actions/checkout@v6
33
34 - name: Start FreeBSD VM for tcc
35 id: vm-freebsd-tcc
36 uses: cross-platform-actions/[email protected]
37 with:
38 operating_system: freebsd
39 version: '15.0'
40 memory: 4G
41 shell: sh
42 sync_files: runner-to-vm
43
44 - name: Tests on FreeBSD with tcc
45 id: tests-freebsd-tcc
46 shell: cpa.sh {0}
47 run: |
48 sudo pkg install -y git sqlite3 gmake boehm-gc-threaded libiconv
49 # Install DB packages needed to build examples
50 sudo pkg install -y mariadb118-client postgresql18-client
51 # Install packages needed by Sokol to build examples
52 sudo pkg install -y alsa-lib libglvnd libXi libXcursor
53 # Mandatory: hostname not set in VM => some tests fail
54 sudo hostname -s freebsd-ci
55 echo "::group::OS infos"
56 uname -a
57 echo "::endgroup::"
58 echo "::group::Build V"
59 git config --global --add safe.directory .
60 gmake
61 sudo ./v symlink
62 export VTEST_SHOW_LONGEST_BY_RUNTIME=3
63 export VTEST_SHOW_LONGEST_BY_COMPTIME=3
64 export VTEST_SHOW_LONGEST_BY_TOTALTIME=3
65 export VFLAGS='-cc tcc -no-retry-compilation'
66 echo "::endgroup::"
67 ./v run ci/freebsd_ci.vsh all
68
69 clang-freebsd:
70 runs-on: ubuntu-latest
71 timeout-minutes: 20
72 steps:
73 - uses: actions/checkout@v6
74
75 - name: Start FreeBSD VM for clang
76 id: vm-freebsd-clang
77 uses: cross-platform-actions/[email protected]
78 with:
79 operating_system: freebsd
80 version: '15.0'
81 memory: 4G
82 shell: sh
83 sync_files: runner-to-vm
84
85 - name: Tests on FreeBSD with clang
86 id: tests-freebsd-clang
87 shell: cpa.sh {0}
88 run: |
89 sudo pkg install -y git sqlite3 gmake boehm-gc-threaded libiconv
90 # Install DB packages needed to build examples
91 sudo pkg install -y mariadb118-client postgresql18-client
92 # Install packages needed by Sokol to build examples
93 sudo pkg install -y alsa-lib libglvnd libXi libXcursor
94 # Mandatory: hostname not set in VM => some tests fail
95 sudo hostname -s freebsd-ci
96 echo "::group::OS infos"
97 uname -a
98 echo "::endgroup::"
99 echo "::group::Build V"
100 git config --global --add safe.directory .
101 gmake
102 sudo ./v symlink
103 export VTEST_SHOW_LONGEST_BY_RUNTIME=3
104 export VTEST_SHOW_LONGEST_BY_COMPTIME=3
105 export VTEST_SHOW_LONGEST_BY_TOTALTIME=3
106 export VFLAGS='-cc clang'
107 echo "::endgroup::"
108 ./v run ci/freebsd_ci.vsh all
109
110 gcc-freebsd:
111 runs-on: ubuntu-latest
112 timeout-minutes: 30
113 steps:
114 - uses: actions/checkout@v6
115
116 - name: Start FreeBSD VM for gcc
117 id: vm-freebsd-gcc
118 uses: cross-platform-actions/[email protected]
119 with:
120 operating_system: freebsd
121 version: '15.0'
122 memory: 4G
123 shell: sh
124 sync_files: runner-to-vm
125
126 - name: Tests on FreeBSD with gcc
127 id: tests-freebsd-gcc
128 shell: cpa.sh {0}
129 run: |
130 sudo pkg install -y git sqlite3 gmake boehm-gc-threaded libiconv gcc
131 # Install DB packages needed to build examples
132 sudo pkg install -y mariadb118-client postgresql18-client
133 # Install packages needed by Sokol to build examples
134 sudo pkg install -y alsa-lib libglvnd libXi libXcursor
135 # Mandatory: hostname not set in VM => some tests fail
136 sudo hostname -s freebsd-ci
137 echo "::group::OS infos"
138 uname -a
139 echo "::endgroup::"
140 echo "::group::Build V"
141 git config --global --add safe.directory .
142 gmake
143 sudo ./v symlink
144 export VTEST_SHOW_LONGEST_BY_RUNTIME=3
145 export VTEST_SHOW_LONGEST_BY_COMPTIME=3
146 export VTEST_SHOW_LONGEST_BY_TOTALTIME=3
147 export VFLAGS='-cc gcc'
148 echo "::endgroup::"
149 ./v run ci/freebsd_ci.vsh all
150