@cryptotaxi247 / kubo / commits / 7b9819e52

ci: remove circleci config

galargh committed Mar 2, 2023 at 09:07 UTC 7b9819e5263203eb437dfa4889363ad67f96721e
2 files changed -441
.circleci/config.yml deleted
-37
@@ -1,37 +0,0 @@
1 -version: 2.1
2 -setup: true
3 -orbs:
4 - continuation: circleci/continuation@0.2.0
5 -jobs:
6 - generate-params:
7 - executor: continuation/default
8 - steps:
9 - - checkout
10 - - run:
11 - name: Generate params
12 - # for builds on the ipfs/kubo repo, use 2xlarge for faster builds
13 - # but since this is not available for many contributors, we otherwise use medium
14 - command: |
15 - echo $CIRCLE_REPOSITORY_URL
16 - if [ "$CIRCLE_REPOSITORY_URL" = 'git@github.com:ipfs/kubo.git' ]; then
17 - resource_class=2xlarge
18 - make_jobs=10
19 - else
20 - resource_class=medium
21 - make_jobs=3
22 - fi
23 - cat \<<- EOF > params.json
24 - {
25 - "resource_class": "$resource_class",
26 - "make_jobs": "$make_jobs"
27 - }
28 - EOF
29 - cat params.json
30 - - continuation/continue:
31 - parameters: params.json
32 - configuration_path: .circleci/main.yml
33 -workflows:
34 - version: 2
35 - setup-workflow:
36 - jobs:
37 - - generate-params
.circleci/main.yml deleted
-404
@@ -1,404 +0,0 @@
1 -version: 2.1
2 -
3 -parameters:
4 - resource_class:
5 - type: string
6 - default: medium
7 - make_jobs:
8 - type: string
9 - default: 3
10 -
11 -aliases:
12 - make_out_dirs: &make_out_dirs
13 - run: mkdir -p /tmp/circleci-artifacts /tmp/circleci-workspace /tmp/circleci-test-results/{unit,sharness}
14 - restore_gomod: &restore_gomod
15 - restore_cache:
16 - keys:
17 - - v5-dep-{{ .Branch }}-{{ checksum "~/ipfs/kubo/go.sum" }}-{{ .Environment.CIRCLE_JOB }}
18 - - v5-dep-{{ .Branch }}-{{ checksum "~/ipfs/kubo/go.sum" }}-
19 - - v5-dep-{{ .Branch }}-
20 - - v5-dep-master-
21 - store_gomod: &store_gomod
22 - save_cache:
23 - key: v5-dep-{{ .Branch }}-{{ checksum "~/ipfs/kubo/go.sum" }}-{{ .Environment.CIRCLE_JOB }}
24 - paths:
25 - - ~/go/pkg/mod
26 - - ~/.cache/go-build/
27 -
28 -default_environment: &default_environment
29 - SERVICE: circle-ci
30 - TRAVIS: 1
31 - CIRCLE: 1
32 - CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
33 - CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
34 - GIT_PAGER: cat
35 -
36 -executors:
37 - golang:
38 - docker:
39 - - image: cimg/go:1.19.1
40 - working_directory: ~/ipfs/kubo
41 - environment:
42 - <<: *default_environment
43 - TEST_NO_DOCKER: 1
44 - TEST_NO_FUSE: 1
45 - TEST_VERBOSE: 1
46 - node:
47 - docker:
48 - - image: circleci/node:14
49 - working_directory: ~/ipfs/kubo
50 - environment:
51 - <<: *default_environment
52 - node-browsers:
53 - docker:
54 - - image: circleci/node:16.12.0-browsers
55 - working_directory: ~/ipfs/kubo
56 - environment:
57 - <<: *default_environment
58 - NO_SANDBOX: true
59 - LIBP2P_TCP_REUSEPORT: false
60 - LIBP2P_ALLOW_WEAK_RSA_KEYS: 1
61 - E2E_IPFSD_TYPE: go
62 - dockerizer:
63 - docker:
64 - - image: cimg/go:1.19.1
65 - environment:
66 - IMAGE_NAME: ipfs/kubo
67 - WIP_IMAGE_TAG: wip
68 -
69 -jobs:
70 - gobuild:
71 - executor: golang
72 - resource_class: 2xlarge+
73 - steps:
74 - - checkout
75 - - *make_out_dirs
76 - - *restore_gomod
77 - - run:
78 - command: make cmd/ipfs-try-build
79 - environment:
80 - TEST_NO_FUSE: 0
81 - - run:
82 - command: make cmd/ipfs-try-build
83 - environment:
84 - TEST_NO_FUSE: 1
85 - - *store_gomod
86 - golint:
87 - executor: golang
88 - steps:
89 - - checkout
90 - - *make_out_dirs
91 - - *restore_gomod
92 - - run: |
93 - make -O test_go_lint
94 - - *store_gomod
95 - gotest:
96 - executor: golang
97 - steps:
98 - - checkout
99 - - *make_out_dirs
100 - - *restore_gomod
101 -
102 - - run: |
103 - make -j 1 test/unit/gotest.junit.xml \
104 - && [[ ! $(jq -s -c 'map(select(.Action == "fail")) | .[]' test/unit/gotest.json) ]]
105 - - run:
106 - when: always
107 - command: bash <(curl -s https://codecov.io/bash) -cF unittests -X search -f coverage/unit_tests.coverprofile
108 - - run:
109 - command: |
110 - # we want to first test with the kubo version in the go.mod file
111 - go test -v ./...
112 -
113 - # we also want to test the examples against the current version of kubo
114 - # however, that version might be in a fork so we need to replace the dependency
115 -
116 - # backup the go.mod and go.sum files to restore them after we run the tests
117 - cp go.mod go.mod.bak
118 - cp go.sum go.sum.bak
119 -
120 - # make sure the examples run against the current version of kubo
121 - go mod edit -replace github.com/ipfs/kubo=./../../..
122 - go mod tidy
123 -
124 - go test -v ./...
125 -
126 - # restore the go.mod and go.sum files to their original state
127 - mv go.mod.bak go.mod
128 - mv go.sum.bak go.sum
129 - working_directory: ~/ipfs/kubo/docs/examples/kubo-as-a-library
130 -
131 - - run:
132 - when: always
133 - command: mv "test/unit/gotest.junit.xml" /tmp/circleci-test-results/unit
134 -
135 - - *store_gomod
136 -
137 - - store_test_results:
138 - path: /tmp/circleci-test-results
139 - # Save artifacts
140 - - store_artifacts:
141 - path: /tmp/circleci-artifacts
142 - - store_artifacts:
143 - path: /tmp/circleci-test-results
144 - sharness:
145 - machine:
146 - image: ubuntu-2204:2022.10.1
147 - resource_class: << pipeline.parameters.resource_class >>
148 - working_directory: ~/ipfs/kubo
149 - environment:
150 - <<: *default_environment
151 - TEST_NO_DOCKER: 0
152 - TEST_NO_PLUGIN: 1
153 - TEST_NO_FUSE: 1
154 - TEST_VERBOSE: 1
155 - TEST_JUNIT: 1
156 - TEST_EXPENSIVE: 1
157 - steps:
158 - - run: sudo apt update
159 - - run: |
160 - mkdir ~/localgo && cd ~/localgo
161 - wget https://golang.org/dl/go1.19.1.linux-amd64.tar.gz
162 - tar xfz go1.19.1.linux-amd64.tar.gz
163 - echo "export PATH=$(pwd)/go/bin:\$PATH" >> ~/.bashrc
164 - - run: go version
165 - - run: sudo apt install socat net-tools fish libxml2-utils
166 - - checkout
167 -
168 - - run:
169 - mkdir rb-pinning-service-api &&
170 - cd rb-pinning-service-api &&
171 - git init &&
172 - git remote add origin https://github.com/ipfs-shipyard/rb-pinning-service-api.git &&
173 - git fetch --depth 1 origin 773c3adbb421c551d2d89288abac3e01e1f7c3a8 &&
174 - git checkout FETCH_HEAD
175 - - run:
176 - cd rb-pinning-service-api &&
177 - (for i in {1..3}; do docker-compose pull && break || sleep 5; done) &&
178 - docker-compose up -d
179 -
180 - - *make_out_dirs
181 - - *restore_gomod
182 -
183 - - run:
184 - name: Setup Environment Variables
185 - # we need the docker host IP; all ports exported by child containers can be accessed there.
186 - command: echo "export TEST_DOCKER_HOST=$(ip -4 addr show docker0 | grep -Po 'inet \K[\d.]+')" >> $BASH_ENV
187 - - run:
188 - echo TEST_DOCKER_HOST=$TEST_DOCKER_HOST &&
189 - make -O -j << pipeline.parameters.make_jobs >> test_sharness coverage/sharness_tests.coverprofile test/sharness/test-results/sharness.xml CONTINUE_ON_S_FAILURE=1 TEST_DOCKER_HOST=$TEST_DOCKER_HOST
190 - - run:
191 - when: always
192 - command: bash <(curl -s https://codecov.io/bash) -cF sharness -X search -f coverage/sharness_tests.coverprofile
193 -
194 - - run: mv "test/sharness/test-results/sharness.xml" /tmp/circleci-test-results/sharness
195 - # make sure we fail if there are test failures
196 - - run: find test/sharness/test-results -name 't*-*.sh.*.counts' | test/sharness/lib/sharness/aggregate-results.sh | grep 'failed\s*0'
197 -
198 - - *store_gomod
199 -
200 - - store_test_results:
201 - path: /tmp/circleci-test-results
202 - # Save artifacts
203 - - store_artifacts:
204 - path: /tmp/circleci-artifacts
205 - - store_artifacts:
206 - path: /tmp/circleci-test-results
207 - build:
208 - executor: golang
209 - steps:
210 - - checkout
211 - - *make_out_dirs
212 - - *restore_gomod
213 - - run:
214 - name: Building
215 - command: make build
216 - - run:
217 - name: Storing
218 - command: |
219 - mkdir -p /tmp/circleci-workspace/bin
220 - cp cmd/ipfs/ipfs /tmp/circleci-workspace/bin
221 - - persist_to_workspace:
222 - root: /tmp/circleci-workspace
223 - paths:
224 - - bin/ipfs
225 - - *store_gomod
226 - interop:
227 - docker:
228 - - image: cimg/go:1.19.1-node
229 - parallelism: 4
230 - resource_class: 2xlarge+
231 - steps:
232 - - *make_out_dirs
233 - - attach_workspace:
234 - at: /tmp/circleci-workspace
235 - - restore_cache:
236 - keys:
237 - - v2-interop-{{ .Branch }}-{{ .Revision }}
238 - - v2-interop-{{ .Branch }}-
239 - - v2-interop-
240 - - run:
241 - name: Installing dependencies
242 - command: |
243 - npm init -y
244 - npm install ipfs@^0.66.0
245 - npm install kubo-rpc-client@^3.0.1
246 - npm install ipfs-interop@^10.0.1
247 - npm install mocha-circleci-reporter@0.0.3
248 - working_directory: ~/ipfs/kubo/interop
249 - - run:
250 - name: Running tests
251 - command: |
252 - mkdir -p /tmp/test-results/interop/
253 - export MOCHA_FILE="$(mktemp /tmp/test-results/interop/unit.XXXXXX.xml)"
254 - npx ipfs-interop -- -t node -f $(sed -n -e "s|^import '\(.*\)'$|test/\1|p" node_modules/ipfs-interop/test/node.js | circleci tests split --split-by=timings) -- --reporter mocha-circleci-reporter
255 - working_directory: ~/ipfs/kubo/interop
256 - environment:
257 - LIBP2P_TCP_REUSEPORT: false
258 - LIBP2P_ALLOW_WEAK_RSA_KEYS: 1
259 - IPFS_GO_EXEC: /tmp/circleci-workspace/bin/ipfs
260 - - store_test_results:
261 - path: /tmp/test-results
262 - - save_cache:
263 - key: v2-interop-{{ .Branch }}-{{ .Revision }}
264 - paths:
265 - - ~/ipfs/kubo/interop/node_modules
266 - go-ipfs-api:
267 - executor: golang
268 - steps:
269 - - *make_out_dirs
270 - - attach_workspace:
271 - at: /tmp/circleci-workspace
272 - - run:
273 - name: Cloning
274 - command: |
275 - git clone https://github.com/ipfs/go-ipfs-api.git
276 - git -C go-ipfs-api log -1
277 - - run:
278 - name: Starting the daemon
279 - command: /tmp/circleci-workspace/bin/ipfs daemon --init --enable-namesys-pubsub
280 - background: true
281 - - run:
282 - name: Waiting for the daemon
283 - no_output_timeout: 30s
284 - command: |
285 - while ! /tmp/circleci-workspace/bin/ipfs id --api=/ip4/127.0.0.1/tcp/5001 2>/dev/null; do
286 - sleep 1
287 - done
288 - - restore_cache:
289 - keys:
290 - - v1-go-api-{{ checksum "~/ipfs/kubo/go-ipfs-api/go.sum" }}
291 - - v1-go-api-
292 - - run:
293 - command: go test -count=1 -v ./...
294 - working_directory: ~/ipfs/kubo/go-ipfs-api
295 - - save_cache:
296 - key: v2-go-api-{{ checksum "~/ipfs/kubo/go-ipfs-api/go.sum" }}
297 - paths:
298 - - ~/go/pkg/mod
299 - - ~/.cache/go-build/
300 - - run:
301 - name: Stopping the daemon
302 - command: /tmp/circleci-workspace/bin/ipfs shutdown
303 - go-ipfs-http-client:
304 - executor: golang
305 - steps:
306 - - *make_out_dirs
307 - - attach_workspace:
308 - at: /tmp/circleci-workspace
309 - - run:
310 - name: Cloning
311 - command: |
312 - git clone https://github.com/ipfs/go-ipfs-http-client.git -b bump-for-rcmgr-last-push
313 - git -C go-ipfs-http-client log -1
314 - - restore_cache:
315 - keys:
316 - - v1-http-client-{{ checksum "~/ipfs/kubo/go-ipfs-http-client/go.sum" }}
317 - - v1-http-client-
318 - - run:
319 - name: go test -count=1 -v ./...
320 - command: |
321 - export PATH=/tmp/circleci-workspace/bin:$PATH
322 - go test -count=1 -v ./...
323 - working_directory: ~/ipfs/kubo/go-ipfs-http-client
324 - - save_cache:
325 - key: v1-http-client-{{ checksum "~/ipfs/kubo/go-ipfs-http-client/go.sum" }}
326 - paths:
327 - - ~/go/pkg/mod
328 - - ~/.cache/go-build/
329 - ipfs-webui:
330 - executor: node-browsers
331 - resource_class: 2xlarge+
332 - steps:
333 - - *make_out_dirs
334 - - attach_workspace:
335 - at: /tmp/circleci-workspace
336 - - run:
337 - name: Cloning
338 - command: |
339 - git clone https://github.com/ipfs/ipfs-webui.git
340 - git -C ipfs-webui log -1
341 - - restore_cache:
342 - keys:
343 - - v1-ipfs-webui-{{ checksum "~/ipfs/kubo/ipfs-webui/package-lock.json" }}
344 - - v1-ipfs-webui-
345 - - run:
346 - name: Installing dependencies
347 - command: |
348 - npm ci --prefer-offline --no-audit --progress=false --cache ~/ipfs/kubo/.cache/npm
349 - npx playwright install
350 - working_directory: ~/ipfs/kubo/ipfs-webui
351 - - run:
352 - name: Run ipfs-webui@main build and smoke-test to confirm the upstream repo is not broken
353 - command: |
354 - npm test
355 - working_directory: ~/ipfs/kubo/ipfs-webui
356 - - run:
357 - name: Test ipfs-webui@main E2E against the locally built Kubo binary
358 - command: npm run test:e2e
359 - working_directory: ~/ipfs/kubo/ipfs-webui
360 - environment:
361 - IPFS_GO_EXEC: /tmp/circleci-workspace/bin/ipfs
362 - - save_cache:
363 - key: v1-ipfs-webui-{{ checksum "~/ipfs/kubo/ipfs-webui/package-lock.json" }}
364 - paths:
365 - - ~/.cache/ms-playwright
366 - - ~/ipfs/kubo/.cache/npm
367 - # We only run build as a test here. DockerHub images are built and published
368 - # by GitHub Action now: https://github.com/ipfs/kubo/pull/8467
369 - docker-build:
370 - executor: dockerizer
371 - steps:
372 - - checkout
373 - - setup_remote_docker:
374 - version: "19.03.13"
375 - - run:
376 - name: Build Docker image
377 - command: |
378 - docker build -t $IMAGE_NAME:$WIP_IMAGE_TAG .
379 -
380 -workflows:
381 - version: 2
382 -
383 - # Runs for all branches, but not on tags
384 - # see: https://circleci.com/docs/2.0/workflows/#executing-workflows-for-a-git-tag
385 - test:
386 - jobs:
387 - - gobuild
388 - - golint
389 - - gotest
390 - - sharness
391 - - build
392 - - interop:
393 - requires:
394 - - build
395 - - go-ipfs-api:
396 - requires:
397 - - build
398 - - go-ipfs-http-client:
399 - requires:
400 - - build
401 - - ipfs-webui:
402 - requires:
403 - - build
404 - - docker-build