44 lines
1.4 KiB
YAML
44 lines
1.4 KiB
YAML
---
|
|
name: checks
|
|
on:
|
|
- push
|
|
- pull_request
|
|
|
|
jobs:
|
|
build:
|
|
container:
|
|
image: focs.ji.sjtu.edu.cn:5000/gitea/runner-images:ubuntu-latest
|
|
volumes:
|
|
- /home/ta/.ssh:/root/.ssh
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: https://gitea.com/BoYanZh/checkout@focs
|
|
- name: Setup Go 1.23.1
|
|
uses: https://gitea.com/actions/setup-go@v3
|
|
with:
|
|
go-version: 1.23.1
|
|
- name: Sanity Check
|
|
run: |
|
|
ls -lha
|
|
whoami
|
|
- name: Install & Run go-judge
|
|
run: |
|
|
cd /tmp
|
|
wget https://ghp.ci/https://github.com/criyle/go-judge/releases/download/v1.8.5/go-judge_1.8.5_linux_amd64.deb
|
|
dpkg -i go-judge_1.8.5_linux_amd64.deb
|
|
rm go-judge_1.8.5_linux_amd64.deb
|
|
go-judge -grpc-addr 0.0.0.0:5051 -enable-grpc -enable-debug -enable-metrics &
|
|
cd -
|
|
- name: Display Go version
|
|
run: go version
|
|
- name: Prepare
|
|
run: |
|
|
go env -w GOPROXY=https://goproxy.cn,direct
|
|
chown -R root:root /root/.ssh
|
|
- name: Build
|
|
run: make build
|
|
- name: Test
|
|
run: |
|
|
make prepare-test
|
|
make test
|