-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.cirrus.yml
45 lines (44 loc) · 1.88 KB
/
.cirrus.yml
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
freebsd_instance:
image: freebsd-12-3-release-amd64
task:
name: build
only_if: $CIRRUS_BRANCH == 'master' || $CIRRUS_BRANCH =~ 'release/.*' || $CIRRUS_PR != ''
skip: "!changesInclude('.cirrus.yml') && changesIncludeOnly('/*.sh', '/.*', '/_*', '/vcpkg.txt', 'Brewfile', 'docs/**', '**.adoc', '**.md', '**.nix', 'flake.lock', '.github/**') || $CIRRUS_CHANGE_MESSAGE =~ '.*skip ci.*'"
# increase timeout since we use a single task for building cache and testing
timeout_in: 90m
env:
BUILD_MODE: normal
GPG_VERSION: stable
LOCAL_BUILDS: /home/rnpuser/local-builds
LOCAL_INSTALLS: /home/rnpuser/local-installs
USE_STATIC_DEPENDENCIES: yes
DOWNLOAD_SEXP: yes
user_setup_script: |
# workaround 'pkg: repository meta has wrong version 2'
env ASSUME_ALWAYS_YES=yes pkg bootstrap -f
# FreeBSD 12.2 has sudo 1.9.3.p, while current 1.9.8 has bug which prevents CI to run:
# sudo: (null): option "passprompt_override" does not take a value
# sudo: error initializing audit plugin sudoers_audit
#pkg install -y sudo
# Use bash for the CI scripts
pkg install -y bash
# add rnpuser
pw useradd -n rnpuser -m
printf "\nrnpuser ALL=(ALL) NOPASSWD: ALL\n" > /usr/local/etc/sudoers.d/rnpuser
# change ownership for the cloned repo
chown -R rnpuser:rnpuser "$PWD"
before_install_script: |
su rnpuser -c 'bash ci/install_noncacheable_dependencies.sh'
dependencies_cache:
folder: $LOCAL_INSTALLS
fingerprint_script: sha256 ci/*.sh ci/lib/*.sh && date +"%U" && git ls-remote https://github.com/rnpgp/ruby-rnp.git HEAD
install_script: |
# Currently GnuPG is forced to be built with gcc
pkg install -y gcc
# cirrus cache doesn't seem to retain ownership
mkdir -p "$LOCAL_INSTALLS"
chown -R rnpuser:rnpuser "$LOCAL_INSTALLS"
# install
su rnpuser -c 'bash ci/install.sh'
script: |
su rnpuser -c 'bash ci/main.sh'