-
Notifications
You must be signed in to change notification settings - Fork 42
159 lines (137 loc) · 4.46 KB
/
ci.yml
File metadata and controls
159 lines (137 loc) · 4.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
name: CI
on:
push:
pull_request:
jobs:
build-netbsd:
runs-on: ubuntu-latest
name: build • netbsd ${{ matrix.release }}
defaults:
run:
shell: netbsd {0}
strategy:
fail-fast: false
matrix:
# Test all supported releases.
# See https://www.netbsd.org/releases/.
include:
- release: 9.4
capnproto-cppflags: 'CPPFLAGS="-DKJ_NO_EXCEPTIONS=0 -DKJ_USE_KQUEUE=0"'
- release: 10.1
capnproto-cppflags: 'CPPFLAGS="-DKJ_NO_EXCEPTIONS=0"'
steps:
- uses: actions/checkout@v6
- name: Start NetBSD VM
uses: vmactions/netbsd-vm@v1
with:
release: ${{ matrix.release }}
# The installed compiler version must match the CXX variable
# defined in `ci/configs/netbsd.bash`.
prepare: |
pkg_add cmake ninja-build gcc14
# capnproto prerequisites.
# See the following "Install capnproto" step.
run: |
set -e
pkg_add digest libtool-base mktools pkgconf cwrappers
pkg_admin -K /usr/pkg/pkgdb fetch-pkg-vulnerabilities
cd /usr
cvs -danoncvs@anoncvs.NetBSD.org:/cvsroot checkout -P \
pkgsrc/devel/capnproto \
pkgsrc/devel/libtool-base \
pkgsrc/devel/pkgconf \
pkgsrc/devel/zlib \
`# gcc15 is referenced here because the pkgsrc framework requires lang/gcc15/version.mk to exist` \
`# during the "make install" step below, even though we compile our project with gcc14.` \
pkgsrc/lang/gcc15 \
pkgsrc/mk \
pkgsrc/pkgtools \
pkgsrc/security/openssl \
pkgsrc/sysutils/install-sh/files
sync: 'rsync'
copyback: false
- name: Install capnproto
run: |
cd /usr/pkgsrc/devel/capnproto/
unset PKG_PATH
make ${{ matrix.capnproto-cppflags }} install
- name: Run CI script
run: |
cd ${{ github.workspace }}
CI_CONFIG="ci/configs/netbsd.bash" bash ci/scripts/ci.sh
build-openbsd:
runs-on: ubuntu-latest
name: build • openbsd
defaults:
run:
shell: openbsd {0}
steps:
- uses: actions/checkout@v5
- name: Start OpenBSD VM
uses: vmactions/openbsd-vm@v1
with:
prepare: |
pkg_add -v cmake ninja bash capnproto
sync: 'rsync'
copyback: false
- name: Run CI script
run: |
cd ${{ github.workspace }}
CI_CONFIG="ci/configs/openbsd.bash" bash ci/scripts/ci.sh
build-freebsd:
runs-on: ubuntu-latest
name: build • freebsd
defaults:
run:
shell: freebsd {0}
steps:
- uses: actions/checkout@v5
- name: Start FreeBSD VM
uses: vmactions/freebsd-vm@v1
with:
prepare: |
pkg install -y cmake ninja bash capnproto
sync: 'rsync'
copyback: false
- name: Run CI script
run: |
cd ${{ github.workspace }}
CI_CONFIG="ci/configs/freebsd.bash" bash ci/scripts/ci.sh
build-macos:
runs-on: macos-latest
name: build • macos
steps:
- uses: actions/checkout@v5
- name: Install dependencies
env:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
run: |
brew install --quiet ninja capnp
- name: Run CI script
run: |
CI_CONFIG="ci/configs/macos.bash" bash ci/scripts/ci.sh
build:
runs-on: ubuntu-latest
env:
NIX_EXTRA_CONFIG_ACT: |
sandbox = false
filter-syscalls = false
strategy:
fail-fast: false
matrix:
config: [default, llvm, gnu32, sanitize, olddeps]
name: build • ${{ matrix.config }}
steps:
- uses: actions/checkout@v5
- name: Install Nix
uses: cachix/install-nix-action@v31 # 2025-05-27, from https://github.com/cachix/install-nix-action/tags
with:
nix_path: nixpkgs=channel:nixos-25.05 # latest release
# Act executes inside an unprivileged container (Docker or Podman),
# so KVM support isn't available.
enable_kvm: "${{ github.actor != 'nektos/act' }}"
extra_nix_config: ${{ github.actor == 'nektos/act' && env.NIX_EXTRA_CONFIG_ACT || '' }}
- name: Run CI script
env:
CI_CONFIG: ci/configs/${{ matrix.config }}.bash
run: ci/scripts/run.sh