-
Notifications
You must be signed in to change notification settings - Fork 1
/
.cirrus.yml
109 lines (91 loc) · 4.14 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
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
# Copyright (c) 2023 [Ribose Inc](https://www.ribose.com).
# All rights reserved.
# This file is a part of metanorma
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# cirrus-ci allows very limited resources for the free tier
# an attempt to execute all tests causes 2-4 hours ci run
# so we will just keep two flavors for testing
# it is hardcoded in .cirrus.star script
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# This setting affects (is supposed to affect) the script in .cirrus.star
#env:
# public-only: "true"
task:
name: linux_aarch64
only_if: $CIRRUS_BRANCH == 'main' || $CIRRUS_PR != '' || $CIRRUS_TAG != ''
arm_container:
# Needs ~10 Gb to package metanorma and Cirrus-ci allows 4GB per CPU only
image: ubuntu:20.04
cpu: 3
memory: 12G
env:
CMAKE_VERSION: 3.26.5
CC: clang-12
CXX: clang++-12
DEBIAN_FRONTEND: noninteractive
BUNDLE_BUILD__SASSC: --enable-static-stdlib
CACHE_VER: "05"
install_script: |
apt-get -y update
apt-get -y install sudo git curl build-essential pkg-config bison flex autoconf \
binutils-dev libevent-dev acl-dev libfmt-dev libjemalloc-dev libiberty-dev \
libdouble-conversion-dev liblz4-dev liblzma-dev libssl-dev libunwind-dev \
libboost-filesystem-dev libboost-program-options-dev libboost-system-dev \
libboost-iostreams-dev libboost-date-time-dev libboost-context-dev \
libboost-regex-dev libboost-thread-dev libbrotli-dev libdwarf-dev libelf-dev \
libgoogle-glog-dev libffi-dev libgdbm-dev libyaml-dev libncurses-dev \
libreadline-dev libutfcpp-dev libncurses-dev libreadline-dev gcc-10 g++-10 \
clang-12 clang++-12 ruby-dev ruby-bundler
pre_setup_script: |
cat common.env >> $CIRRUS_ENV
setup_cmake_script: |
mkdir -p cmake-install
pushd cmake-install
curl -L -o cmake.sh \
https://github.com/Kitware/CMake/releases/download/v"$CMAKE_VERSION"/cmake-"$CMAKE_VERSION"-linux-aarch64.sh
sudo sh cmake.sh --skip-license --prefix="/usr/local"
popd
tebako_cache:
folder: $TEBAKO_PREFIX/$DEPS
reupload_on_changes: "false"
fingerprint_script:
- echo $CIRRUS_OS
- cat common.env
- echo $CACHE_VER
tebako_setup_script: |
sudo gem install tebako
package_metanorma_script: |
make build/bin/metanorma-linux-gnu-aarch64
mv -T build/bin/metanorma-linux-gnu-aarch64 build/bin/metanorma-linux-aarch64
pre_upload_caches_script: |
rm -rf $TEBAKO_PREFIX/$DEPS/src/_ruby_*
upload_caches:
- tebako
verify_packaging_script: |
build/bin/metanorma-linux-aarch64 --tebako-extract extracted_source_filesystem
diff -r extracted_source_filesystem $TEBAKO_PREFIX/o/s
smoke_test_script: |
build/bin/metanorma-linux-aarch64 help
metanorma_linux_aarch64_artifacts:
path: build/bin/metanorma-linux-aarch64