Skip to content

Commit 5d4857e

Browse files
committed
setup arm64 unit testing CircleCI (#668)
(cherry picked from commit fb12092)
1 parent d94217f commit 5d4857e

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

.circleci/config.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
version: 2.1
2+
3+
executors:
4+
amd64:
5+
machine:
6+
image: ubuntu-2004:current
7+
resource_class: large
8+
arm64:
9+
machine:
10+
image: ubuntu-2004:current
11+
resource_class: arm.large
12+
13+
jobs:
14+
unit-test:
15+
parameters:
16+
platform:
17+
type: executor
18+
executor: << parameters.platform >>
19+
working_directory: ~/repo
20+
steps:
21+
- checkout
22+
- run:
23+
name: Install Docker Compose
24+
environment:
25+
COMPOSE_VERSION: 'v2.17.1'
26+
command: |
27+
curl -L "https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o ~/docker-compose
28+
chmod +x ~/docker-compose
29+
sudo mv ~/docker-compose /usr/local/bin/docker-compose
30+
- run:
31+
name: Set up databases
32+
command: docker-compose up -d
33+
working_directory: ./storage
34+
- run:
35+
name: Set up dataset
36+
command: |
37+
mkdir -p ~/.gorse/dataset
38+
mkdir -p ~/.gorse/download
39+
wget https://cdn.gorse.io/datasets/ml-100k.zip -P ~/.gorse/download
40+
wget https://cdn.gorse.io/datasets/ml-1m.zip -P ~/.gorse/download
41+
wget https://cdn.gorse.io/datasets/pinterest-20.zip -P ~/.gorse/download
42+
wget https://cdn.gorse.io/datasets/frappe.zip -P ~/.gorse/download
43+
wget https://cdn.gorse.io/datasets/ml-tag.zip -P ~/.gorse/download
44+
wget https://cdn.gorse.io/datasets/criteo.zip -P ~/.gorse/download
45+
unzip ~/.gorse/download/ml-100k.zip -d ~/.gorse/dataset
46+
unzip ~/.gorse/download/ml-1m.zip -d ~/.gorse/dataset
47+
unzip ~/.gorse/download/pinterest-20.zip -d ~/.gorse/dataset
48+
unzip ~/.gorse/download/frappe.zip -d ~/.gorse/dataset
49+
unzip ~/.gorse/download/ml-tag.zip -d ~/.gorse/dataset
50+
unzip ~/.gorse/download/criteo.zip -d ~/.gorse/dataset
51+
- restore_cache:
52+
keys:
53+
- go-mod-v4-{{ checksum "go.sum" }}
54+
- run:
55+
name: Install Dependencies
56+
command: go mod download
57+
- save_cache:
58+
key: go-mod-v4-{{ checksum "go.sum" }}
59+
paths:
60+
- "/go/pkg/mod"
61+
- run:
62+
name: Run tests
63+
command: go test -timeout 20m -v ./...
64+
65+
workflows:
66+
unit-test:
67+
jobs:
68+
- unit-test:
69+
matrix:
70+
parameters:
71+
platform: [amd64, arm64]

0 commit comments

Comments
 (0)