Debian Codegraph @

.cirrus.yml

raw symbols SCIP
1 ---
2
3 # Main collection of env. vars to set for all tasks and scripts.
4 env:
5 ####
6 #### Global variables used for all tasks
7 ####
8 GOPATH: "/var/tmp/go"
9 CONMON_SLUG: "github.com/containers/conmon"
10
11 # Overrides default location (/tmp/cirrus) for repo clone (will become $SRC)
12 CIRRUS_WORKING_DIR: "${GOPATH}/src/${CONMON_SLUG}"
13 # Required so $ENVLIB gets loaded and /bin/sh is not used
14 CIRRUS_SHELL: "/bin/bash"
15 # Save a little typing (path relative to $CIRRUS_WORKING_DIR)
16 SCRIPT_BASE: "./contrib/cirrus"
17 # Spoof self as travis, as cirrus has the same test issues as travis does
18 TRAVIS: "true"
19
20 # VM Image built in containers/automation_images
21 IMAGE_SUFFIX: "c20240513t140131z-f40f39d13"
22 FEDORA_CACHE_IMAGE_NAME: "fedora-${IMAGE_SUFFIX}"
23
24 # Container FQIN's
25 FEDORA_CONTAINER_FQIN: "quay.io/libpod/fedora_podman:${IMAGE_SUFFIX}"
26 PRIOR_FEDORA_CONTAINER_FQIN: "quay.io/libpod/prior-fedora_podman:${IMAGE_SUFFIX}"
27
28
29 # Only github users with write-access can define or use encrypted variables
30 # This credential represents a service account with access to manage both VMs
31 # and storage.
32 gcp_credentials: ENCRYPTED[13e51806369f650e6ccc326338deeb3c24052fc0a7be29beef2b96da551aed3200abbb6c6406a936bb4388fb2758405c]
33
34
35 # Default VM to use unless set or modified by task
36 gce_instance:
37 image_project: "libpod-218412"
38 zone: "us-central1-f" # Required by Cirrus for the time being
39 cpu: 2
40 memory: "4Gb"
41 disk: 200 # Required for performance reasons
42 image_name: "${FEDORA_CACHE_IMAGE_NAME}"
43
44
45 # Default timeout for each task
46 timeout_in: '120m'
47
48 # Verify conmon package can be built and installed on Fedora
49 fedora_packaging_task:
50 alias: fedora_packaging
51
52 # Runs within Cirrus's "community cluster"
53 container:
54 cpu: 1
55 memory: 4
56
57 matrix:
58 - name: "Packaging for Fedora"
59 container:
60 image: "${FEDORA_CONTAINER_FQIN}"
61 - name: "Packaging for Fedora N-1"
62 container:
63 image: "${PRIOR_FEDORA_CONTAINER_FQIN}"
64
65 script:
66 - dnf install -y rpm-build golang libseccomp-devel
67 - cd $CIRRUS_WORKING_DIR
68 - make
69 - make -f .rpmbuild/Makefile
70 - rpmbuild --rebuild conmon-*.src.rpm
71 - dnf erase -y conmon
72 - dnf -y install ~/rpmbuild/RPMS/x86_64/conmon*.x86_64.rpm
73 - ls -l /usr/bin/conmon
74
75 timeout_in: '20m'
76
77
78 # Verify calls to bin/config were saved
79 config_task:
80 # Runs within Cirrus's "community cluster"
81 container:
82 image: "${FEDORA_CONTAINER_FQIN}"
83 cpu: 1
84 memory: 4
85
86 script:
87 - dnf install -y make glib2-devel git gcc golang
88 - cd $CIRRUS_WORKING_DIR
89 - make config
90 - ./hack/tree_status.sh
91
92
93 # Verify code was fmt'ed properly
94 fmt_task:
95 # Runs within Cirrus's "community cluster"
96 container:
97 image: "${FEDORA_CONTAINER_FQIN}"
98 cpu: 1
99 memory: 4
100
101 script:
102 - dnf install -y clang clang-tools-extra golang
103 - cd $CIRRUS_WORKING_DIR
104 - make fmt
105 - ./hack/tree_status.sh
106
107
108 # Build the static binary
109 static_binary_task:
110 alias: static_binary
111
112 # Community-maintained task, may fail on occasion. If so, uncomment
113 # the next line and file an issue with details about the failure.
114 # allow_failures: true
115
116 timeout_in: '360m'
117
118 gce_instance:
119 image_name: "${FEDORA_CACHE_IMAGE_NAME}"
120 cpu: 8
121 memory: 12
122 disk: 200
123
124 env:
125 # Do not use 'latest', fixed-version tag for runtime stability.
126 CTR_FQIN: "docker.io/nixos/nix:2.15.0"
127 # Authentication token for pushing the build cache to cachix.
128 # This is critical, it helps to avoid a very lengthy process of
129 # statically building every dependency needed to build conmon.
130 # Assuming the pinned nix dependencies in nix/nixpkgs.json have not
131 # changed, this cache will ensure that only the static conmon binary is
132 # built.
133 CACHIX_AUTH_TOKEN: ENCRYPTED[4c3b8d82b0333abf048c56a71f2559ddb1c9ed38f0c28916eca13f79affa5904cf90c76a5bd8686680c89f41079ef341]
134
135 matrix:
136 - name: "Static amd64 binary"
137 env:
138 TARGET: default.nix
139 - name: "Static arm64 binary"
140 env:
141 TARGET: default-arm64.nix
142 - name: "Static ppc64le binary"
143 env:
144 TARGET: default-ppc64le.nix
145 - name: "Static riscv64 binary"
146 env:
147 TARGET: default-riscv64.nix
148 - name: "Static s390x binary"
149 env:
150 TARGET: default-s390x.nix
151
152 build_script: |
153 set -ex
154 podman run -i --rm \
155 -e CACHIX_AUTH_TOKEN \
156 -v $PWD:$PWD:Z \
157 -w $PWD \
158 $CTR_FQIN \
159 sh -c \
160 "nix-env -iA cachix -f https://cachix.org/api/v1/install && \
161 cachix use conmon && \
162 nix-build nix/$TARGET && \
163 nix-store -qR --include-outputs \$(nix-instantiate nix/$TARGET) | grep -v conmon | cachix push conmon && \
164 cp -R result/bin ."
165
166 binaries_artifacts:
167 path: "bin/conmon"
168
169 # This task is critical. It updates the "last-used by" timestamp stored
170 # in metadata for all VM images. This mechanism functions in tandem with
171 # an out-of-band pruning operation to remove disused VM images.
172 meta_task:
173 name: "VM img. keepalive"
174 alias: meta
175 container:
176 cpu: 2
177 memory: 2
178 image: quay.io/libpod/imgts:latest
179 env:
180 # Space-separated list of images used by this repository state
181 IMGNAMES: >-
182 ${FEDORA_CACHE_IMAGE_NAME}
183 BUILDID: "${CIRRUS_BUILD_ID}"
184 REPOREF: "${CIRRUS_REPO_NAME}"
185 GCPJSON: ENCRYPTED[08de2c74178470b1bc85a107e9962f06dbd11d33c7adf024d3e48ae4399ca5383f9d3ad0e2fd65c3ce12750dd6ef8803]
186 GCPNAME: ENCRYPTED[561ce33a9357e5b8e3fb54739c3af31730c0c3b736792f16a67026a8544379d83ff3c27d6fea1c7797a6ae49b6e58115]
187 GCPPROJECT: libpod-218412
188 clone_script: &noop mkdir -p $CIRRUS_WORKING_DIR
189 script: /usr/local/bin/entrypoint.sh