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