File tree 5 files changed +37
-31
lines changed
5 files changed +37
-31
lines changed Original file line number Diff line number Diff line change @@ -11,14 +11,16 @@ jobs:
11
11
- name : Checkout
12
12
uses : actions/checkout@v4
13
13
14
+ - uses : extractions/setup-just@v1
15
+
14
16
- name : Login to Docker Hub
15
17
run : |
16
18
docker login \
17
19
-u ${{ secrets.DOCKER_USERNAME }} \
18
20
-p ${{ secrets.DOCKER_PASSWORD }}
19
21
20
22
- name : Download CSVs
21
- run : make download
23
+ run : just download
22
24
23
25
- name : Build Docker image
24
26
run : docker build -t extrawurst/ip2country:latest -f Dockerfile .
Original file line number Diff line number Diff line change @@ -12,21 +12,23 @@ jobs:
12
12
- name : Checkout
13
13
uses : actions/checkout@v4
14
14
15
+ - uses : extractions/setup-just@v1
16
+
15
17
- name : Install Protoc
16
18
uses : arduino/setup-protoc@v3
17
19
with :
18
20
repo-token : ${{ secrets.GITHUB_TOKEN }}
19
21
20
22
- name : check
21
- run : make check
23
+ run : just check
22
24
23
- - name : Build Docker image
24
- run : docker build -t extrawurst/ip2country:latest -f Dockerfile .
25
+ - name : build
26
+ run : just build
25
27
26
28
- name : benchmark-iai
27
29
run : |
28
30
sudo apt-get update -y && sudo apt-get install -y valgrind
29
- cd ip2country-bench && make bench-inside-docker
31
+ cd ip2country-bench && just bench-inside-docker
30
32
31
33
- name : benchmark
32
34
run : cargo bench
Load Diff This file was deleted.
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ BASE_URL := " https://cdn.jsdelivr.net/npm/@ip-location-db/geo-whois-asn-country"
2
+ IP4_FILE := " geo-whois-asn-country-ipv4-num.csv"
3
+ IP6_FILE := " geo-whois-asn-country-ipv6-num.csv"
4
+
5
+ download :
6
+ curl " {{ BASE_URL}} /{{ IP4_FILE}} " > ip2country-service/ {{ IP4_FILE}}
7
+ curl " {{ BASE_URL}} /{{ IP6_FILE}} " > ip2country-service/ {{ IP6_FILE}}
8
+ cp ip2country-service/ {{ IP4_FILE}} ip2country-grpc/ {{ IP4_FILE}}
9
+ cp ip2country-service/ {{ IP6_FILE}} ip2country-grpc/ {{ IP6_FILE}}
10
+
11
+ docker-local :
12
+ docker build -t extrawurst/ ip2country:latest -f Dockerfile.local .
13
+
14
+ docker-local-grpc :
15
+ docker build -t extrawurst/ ip2country-grpc:latest -f Dockerfile.grpc.local .
16
+
17
+ docker-run :
18
+ docker run -it -p 5000 :5000 extrawurst/ ip2country:latest
19
+
20
+ test :
21
+ # run this once the container runs locally (see above)
22
+ xh 0.0.0.0 :5000 / 172.217.16.78
23
+
24
+ build :
25
+ cargo build -p ip2country-service --release
26
+
27
+ check :
28
+ cargo clippy --workspace
You can’t perform that action at this time.
0 commit comments