| 1 | name: CI OpenBSD |
| 2 | |
| 3 | on: |
| 4 | workflow_dispatch: |
| 5 | push: |
| 6 | branches: |
| 7 | - master |
| 8 | paths-ignore: |
| 9 | - '**.md' |
| 10 | - '**.yml' |
| 11 | - 'cmd/tools/**' |
| 12 | - '!**/openbsd_ci.yml' |
| 13 | - '!ci/openbsd_ci.vsh' |
| 14 | - '!cmd/tools/builders/**.v' |
| 15 | pull_request: |
| 16 | paths-ignore: |
| 17 | - '**.md' |
| 18 | - '**.yml' |
| 19 | - 'cmd/tools/**' |
| 20 | - '!**/openbsd_ci.yml' |
| 21 | - '!ci/openbsd_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 | |
| 27 | jobs: |
| 28 | tcc-openbsd: |
| 29 | runs-on: ubuntu-latest |
| 30 | timeout-minutes: 30 |
| 31 | steps: |
| 32 | - uses: actions/checkout@v6 |
| 33 | |
| 34 | - name: Start OpenBSD VM for tcc |
| 35 | id: vm-openbsd-tcc |
| 36 | uses: cross-platform-actions/[email protected] |
| 37 | with: |
| 38 | operating_system: openbsd |
| 39 | version: '7.8' |
| 40 | memory: 4G |
| 41 | sync_files: runner-to-vm |
| 42 | |
| 43 | - name: Tests on OpenBSD with tcc |
| 44 | id: tests-openbsd-tcc |
| 45 | shell: cpa.sh {0} |
| 46 | run: | |
| 47 | sudo pkg_add git sqlite3 gmake boehm-gc libiconv |
| 48 | # Install packages needed to build examples |
| 49 | sudo pkg_add mariadb-client postgresql-client |
| 50 | # Mandatory: hostname not set in VM => some tests fail |
| 51 | sudo hostname -s openbsd-ci |
| 52 | echo "::group::OS infos" |
| 53 | uname -a |
| 54 | echo "::endgroup::" |
| 55 | echo "::group::Build V" |
| 56 | git config --global --add safe.directory . |
| 57 | gmake |
| 58 | sudo ./v symlink |
| 59 | export VTEST_SHOW_LONGEST_BY_RUNTIME=3 |
| 60 | export VTEST_SHOW_LONGEST_BY_COMPTIME=3 |
| 61 | export VTEST_SHOW_LONGEST_BY_TOTALTIME=3 |
| 62 | export VFLAGS='-cc tcc -no-retry-compilation' |
| 63 | echo "::endgroup::" |
| 64 | ./v run ci/openbsd_ci.vsh all |
| 65 | |
| 66 | clang-openbsd: |
| 67 | runs-on: ubuntu-latest |
| 68 | timeout-minutes: 30 |
| 69 | steps: |
| 70 | - uses: actions/checkout@v6 |
| 71 | |
| 72 | - name: Start OpenBSD VM for clang |
| 73 | id: vm-openbsd-clang |
| 74 | uses: cross-platform-actions/[email protected] |
| 75 | with: |
| 76 | operating_system: openbsd |
| 77 | version: '7.8' |
| 78 | memory: 4G |
| 79 | sync_files: runner-to-vm |
| 80 | |
| 81 | - name: Tests on OpenBSD with clang |
| 82 | id: tests-openbsd-clang |
| 83 | shell: cpa.sh {0} |
| 84 | run: | |
| 85 | sudo pkg_add git sqlite3 gmake boehm-gc libiconv |
| 86 | # Install packages needed to build examples |
| 87 | sudo pkg_add mariadb-client postgresql-client |
| 88 | # Mandatory: hostname not set in VM => some tests fail |
| 89 | sudo hostname -s openbsd-ci |
| 90 | echo "::group::OS infos" |
| 91 | uname -a |
| 92 | clang -v |
| 93 | echo "::endgroup::" |
| 94 | echo "::group::Build V" |
| 95 | git config --global --add safe.directory . |
| 96 | gmake |
| 97 | sudo ./v symlink |
| 98 | export VTEST_SHOW_LONGEST_BY_RUNTIME=3 |
| 99 | export VTEST_SHOW_LONGEST_BY_COMPTIME=3 |
| 100 | export VTEST_SHOW_LONGEST_BY_TOTALTIME=3 |
| 101 | export VFLAGS='-cc clang' |
| 102 | echo "::endgroup::" |
| 103 | ./v run ci/openbsd_ci.vsh all |
| 104 | |