-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.cirrus.yml
39 lines (38 loc) · 1.43 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
freebsd_instance:
image: freebsd-12-2-release-amd64
task:
name: build
only_if: $CIRRUS_BRANCH == 'master' || $CIRRUS_BRANCH =~ 'release/.*' || $CIRRUS_PR != ''
skip: "changesIncludeOnly('docs/*', '.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
user_setup_script: |
# workaround 'pkg: repository meta has wrong version 2'
env ASSUME_ALWAYS_YES=yes pkg bootstrap -f
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/install.sh && git ls-remote https://github.com/rnpgp/ruby-rnp.git HEAD
install_script: |
# 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'