Skip to content

Commit 7ecccac

Browse files
committed
ci: fix run command and other things
1 parent 9f03671 commit 7ecccac

File tree

6 files changed

+13
-10
lines changed

6 files changed

+13
-10
lines changed

.github/workflows/benchmark.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,13 @@ jobs:
2626
- "ruby"
2727
steps:
2828
- uses: actions/checkout@v2
29-
- run: sed -i 's/python/'"$ISUCON_APP_LANG"'/g' ./docker-compose.yml && make build
29+
- run: echo 'Run benchmark for ISHOCON2'
30+
- run: |
31+
sed -i 's/python/'"$ISHOCON_APP_LANG"'/g' ./docker-compose.yml
32+
cat ./docker-compose.yml
33+
make build
3034
env:
31-
ISHOCON_APP_LANG: run_${{ matrix.language }}
32-
- run: make up && sleep 10
35+
ISHOCON_APP_LANG: ${{ matrix.language }}
36+
- run: make up && sleep 30
3337
- run: make bench
3438
timeout-minutes: 5

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ up: build
1010
down:
1111
docker compose down
1212

13-
bench: up
13+
bench:
1414
docker exec -i ishocon2-bench-1 sh -c "./benchmark --ip app:443"

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
dockerfile: ./docker/app/python/Dockerfile
77
environment:
88
ISHOCON_APP_LANG: "${ISHOCON_APP_LANG-python}"
9-
command: /home/ishocon/run.sh
9+
command: [/home/ishocon/run.sh]
1010
tty: true
1111
volumes:
1212
- storage_app:/var/lib/mysql

docker/app/entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#!/bin/bash
1+
#!/bin/bash -eux
2+
23
sudo service nginx start
34
sudo service mysql start
45
sudo chown -R mysql:mysql /var/lib/mysql /var/run/mysqld

docker/benchmarker/entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#!/bin/bash
1+
#!/bin/bash -ux
2+
23
service mysql start # なぜか失敗する(調査中)
34
chown -R mysql:mysql /var/lib/mysql /var/run/mysqld
45
service mysql start # 正しく起動

run.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ function run_crystal() {
5050
}
5151

5252
echo "run $app_lang app..."
53-
ls -alt /home/ishocon
54-
ls -alt "/home/ishocon/webapp"
55-
ls -alt "/home/ishocon/webapp/$app_lang"
5653
cd "/home/ishocon/webapp/$app_lang"
5754

5855
"run_$app_lang"

0 commit comments

Comments
 (0)