File tree Expand file tree Collapse file tree 2 files changed +45
-57
lines changed Expand file tree Collapse file tree 2 files changed +45
-57
lines changed Original file line number Diff line number Diff line change 1
- name : Build and push images
1
+ name : Run benchmark and build images
2
2
3
3
on :
4
4
workflow_dispatch :
5
5
push :
6
- branches :
7
- - master
8
6
9
7
concurrency :
10
8
group : ${{ github.workflow }}-${{ github.sha }}
11
9
cancel-in-progress : true
12
10
13
11
jobs :
14
- build-and-push-base-and-bench-images :
12
+ benchmark :
13
+ name : Run benchmark
14
+ runs-on : ubuntu-latest
15
+ timeout-minutes : 60
16
+ strategy :
17
+ fail-fast : false
18
+ matrix :
19
+ language :
20
+ - " crystal"
21
+ - " go"
22
+ - " nodejs"
23
+ - " php"
24
+ - " python"
25
+ - " ruby"
26
+ env :
27
+ ISHOCON_APP_LANG : ${{ matrix.language }}
28
+ UNAME : ${{ secrets.DOCKER_HUB_USERNAME }}
29
+ steps :
30
+ - uses : actions/checkout@v4
31
+ - name : Replace base image in docker-compose.yml with github actor name
32
+ run : |
33
+ make change-lang
34
+ sed -i 's/ishocon2-app-base/${{ env.UNAME }}\/ishocon2-app-base/g' ./docker-compose.yml
35
+ sed -i 's/ishocon2-bench/${{ env.UNAME }}\/ishocon2-bench/g' ./docker-compose.yml
36
+ sed -i 's/ishocon2-app-${{ env.ISHOCON_APP_LANG }}/${{ env.UNAME }}\/ishocon2-app-${{ env.ISHOCON_APP_LANG }}/g' ./docker-compose.yml
37
+ cat ./docker-compose.yml
38
+ - name : Login to Docker Hub
39
+ uses : docker/login-action@v3
40
+ with :
41
+ username : ${{ env.UNAME }}
42
+ password : ${{ secrets.DOCKER_HUB_TOKEN }}
43
+ - name : Build images
44
+ run : |
45
+ make pull || true
46
+ make build
47
+ timeout-minutes : 20
48
+ - run : make up bench-with-db-init
49
+ timeout-minutes : 10
50
+ - name : Dump docker logs
51
+ uses : jwalton/gh-docker-logs@v2
52
+ if : ${{ always() }}
53
+ build-base-and-bench-images :
15
54
name : Build and push base and bench images
55
+ needs : benchmark
16
56
runs-on : ubuntu-latest
17
57
timeout-minutes : 60
18
58
env :
69
109
name : Build app images
70
110
runs-on : ubuntu-latest
71
111
timeout-minutes : 60
72
- needs : build-and-push- base-and-bench-images
112
+ needs : build-base-and-bench-images
73
113
strategy :
74
114
fail-fast : false
75
115
matrix :
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments