JOJ3/.drone.yml
张佳澈520370910044 cc08f1e19d
Some checks failed
continuous-integration/drone/push Build is failing
fix(.drone.yml): fixing .drone.yml
2024-06-10 12:54:49 +08:00

42 lines
1.1 KiB
YAML

---
kind: pipeline
type: ssh
name: CI
server:
host: 111.186.59.59
user: drone
ssh_key:
from_secret: joj3-test
environment:
- 'export ORIG_HOME=$(grep ^${USER}: /etc/passwd |cut -d : -f 6)'
- PATH=$PATH:$ORIG_HOME/.local/bin
steps:
- name: prepare
commands:
- go env -w GOPROXY=https://goproxy.cn,direct
- whoami
- pwd
- env
- go version
- go env
- git status -v
- git log -1
- name: build
commands:
- make
- name: test
commands:
- make prepare-test
- make test
- name: scoreboard
commands:
- if echo "${DRONE_REPO_NAME}" | grep -q '-'; then SUBMITTER_NAME=$(echo "{DRONE_REPO_NAME}" | cut -d'-' -f1); else SUBMITTER_NAME={DRONE_REPO_NAME};
fi
- mkdir repo
- cp $ORIG_HOME/.config/ci/teapot.env .env && joint-teapot JOJ3-scoreboard "score.json" $SUBMITTER_NAME "" "JOJ3-examples" "JOJ3_dev.csv"
- cat joint-teapot.log
- name: store
commands:
- cp build/joj3 /home/drone/.local/bin/joj3